Random Paypal failures, goes direct to cancel url
I've got my shop process working well and have tested it in the Paypal sandbox environment. I'm now trying to use a live Paypal account but I get occasional random failures where it goes direct to the cancel url without even trying to connect to Paypal.
It's an intermittent problem that has been plaguing me for weeks, but I think I've finally determined that if I refresh the page where I'm selecting payment method (Paypal or bank transfer) then the Paypal process fails. If I go back with items still in the cart and try again (re-entering address details) it fails again. But if I clear everything (using perch_member_log_out() and perch_shop_empty_cart() ), then it works again. [Edit: Even that is inconsistent.. it fails sometimes, but not others]
I'm not sure what is going on but I assume it must be something that is cached and causing the process to drop out. Can anyone shed any light on this? I can't go live with this until I can trust it to work every time, whatever the customer does. Thanks.