With some PayPal accounts purchase return to cart page after payment
-
Hello, I noticed that with some PayPal account the purchase is not working as expected.
After paying with PayPal, it immediately returns to the cart page instead of processing the payment.I tried to reproduce it locally to allow debug it (use breakpoints) and after investigation I found this:
I found link to the code:
It seems that
BILLINGAGREEMENTACCEPTEDSTATUS
is0
and this cause the condition to befalse
.
This cause it to go to linewp_safe_redirect( wc_get_cart_url() );
Is there a way to handle it?
I also don’t know whyBILLINGAGREEMENTACCEPTEDSTATUS
is0
. We did not find where to set it up.
Anyway, in worse case it should allow to process it as onetime payment and not subscription (if there is no way for customer to accept automatic payments)Thanks.
- You must be logged in to reply to this topic.