Every payment returning to cancel URL and PAYMENT_ALREADY_DONE (sandbox)

atkulp
Contributor
Contributor

I'm uploading a cart of one or more items for payment.  After paying, the user sees "Your payment was completed.  To continue shopping, please return to the merchant" with the "Return to Merchant" button.   Upon clicking, the user is taken to the cancel_return URL rather than the return URL.  This worked last year (it's a site for an annual event).  This is in Sandbox.  I'm afraid to try it in production while this is happening.

 

Form payload:

cmd: _cart
upload: 1
no_shipping: 1
currency_code: USD
business: [business email]
item_name_1: Item Name
item_number_1: 3ac53ba1-7fe6-43e6-b06a-407566896faa
amount_1: 50
shopping_url: https://site.com/checkout?source=paypal
return: https://site.com/checkout?source=paypal&a=paid
cancel_return: https://site.com/checkout?source=paypal&a=cancel

 

Response:

After successfully clicking the payment button, the user is directed to the completion page

atkulp_0-1643078881439.png

I noticed that the actual URL at the moment reflects an error:

https://www.sandbox.paypal.com/webapps/hermes?token={TOKEN}&useraction=commit&rm=2&mfid={IDENTIFIER}.../checkout/genericError?code=PAYMENT_ALREADY_DONE

 

Upon clicking the button, they are taken to my "cancel_return" URL.  If I look at the business transactions, it reflects a successful payment, and my IPN endpoint correctly receives and records the payment details.  What's happening here?

Login to Me Too
16 REPLIES 16

Druid-77
Contributor
Contributor

I have the same problem.

Login to Me Too

developer_cts
Contributor
Contributor

I am facing the same issue.

Login to Me Too

dany0
Contributor
Contributor

Same here, it redirects to cancel_return url

Login to Me Too

atkulp
Contributor
Contributor

Can we get a response from PayPal?  This is clearly not one-off.  That said, I've tested my code on production and it works as expected.  It's just an issue with sandbox.

Login to Me Too

developer_cts
Contributor
Contributor

I am getting the issue with both production and sandbox mode. Please guide how to fix this.

Login to Me Too

Druid-77
Contributor
Contributor

Yes, my production and sandbox mode doesn't work too

Login to Me Too

thief2
Contributor
Contributor

I am getting the same issue.

 

For me this is when using sandbox for testing purposes.

Login to Me Too

Strateges
Contributor
Contributor

Same problem here with a WooCommerce.

Login to Me Too

rams007
New Community Member

same things happens to me

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.