handling errors and purchase approval