1 (edited by ashmax 2011-10-10 14:44:43)

Topic: Prevent sending the order out before the customer has paid

With the current system, the restaurant will receive an order from a customer before they have even paid for the food? Im sure it needs to be the other way round.


If the customer cancels the order or doesn’t go through with it for some reason "hasnt paid", the restaurant still receives the order for the food, this error occurs when the customer chooses the "pay by card option".

If the customer chooses the "pay on delivery", then cancels, the restaurant still gets an order through by email or sms, the restaurant then has to rely on the customer to phone and cancel the order or Vice versa, which is fine.


Payment has to be confirmed first when paying by card, before the restaurant receives the order, by email/sms from the customer, making sure that the customer has paid for the food . This way the restaurant knows that they have been securely paid for the order and there is no need to check the resadmin or phone the customer to confirm if they have paid or not, they can simply complete and deliver the order.

Please try and come up with a solution to fix this please, as I dont think many restaurants will be happy with this.

I did try and post this into the "phpFood discussions" but it restricts the amount of words you can write.

Many Thanks

Re: Prevent sending the order out before the customer has paid

Hello Ash,

This is because of payment gateway.
If your gateway accept like paypal pro, you have this option

The proceses shoulb be like below ;

- phpfood resquest payment with card details
- gateway must response immediatly
- phpfood create order after payment is ok

if you have an api like that, you can do whatever you want.

Best Regards