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

HTA-UK
Contributor
Contributor

I am also getting the same issue.

Using sandbox for testing purposes.

I'm in the UK, is this country specific?

Login to Me Too

atkulp
Contributor
Contributor

I'm in the US, so doesn't appear to be region-specific.

 

Can anyone at PayPal actually respond?

Login to Me Too

HTA-UK
Contributor
Contributor

Has PayPal resolved this error yet please?

 

Has anyone had any success in getting this working again?

 

Many thanks

Login to Me Too

thief2
Contributor
Contributor

Hey.

 

Something has been changed as it now works for me in the Sandbox Environment.

 

Someone from PayPal must have been looking at this and made some changes.

 

My code is the same and now it works!!!

 

I suggest trying it now and see if it works for you.

Login to Me Too

HTA-UK
Contributor
Contributor

@thief2 Hey thanks for the reply.

 

Can confirm that all is well.

 

All working as before - thanks PayPal.

 

With kind regards to all HTA-UK

Login to Me Too

Strateges
Contributor
Contributor

It works here aswell (Website in France working with Woocommerce).

I did not change anything, I assume someone at Paypal fixed it.

Login to Me Too

KjellM
Contributor
Contributor

I am seeing this problem in my staging environment since a few days.

 

KjellM_0-1665435143723.png

Translates to: "Your payment was successful. Return to the merchant to complete the purchase"... but the button leads to my cancel endpoint instead of the success endpoint.

 

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.