autoreturn url not working after sum days

sunggon
Contributor
Contributor

Hellow,

I'am newbi on paypal.

 

now I am working for auto return in sandbox.

somedays worked from the day start.

(I did autoreturn to On, and registered Return URL , and Payment Data Transfer to ON, so worked)

but now , don't to to return after payment . I didn't change anything in config.

So I setted again, and again.

But url never changed for return url.

 

just It was on paypal result page 

 

"Your payment was completed. To continue shopping, please return to the merchant."

 

if you know why it is, please teach me.

 

thank you.

 

 

 

 

Login to Me Too
19 REPLIES 19

samhighfield
Contributor
Contributor

I had the same problem where the return url was no longer working since a few days ago.

I added this line to my non-hosted button and the return url worked again:

 

<input type="hidden" name="return" value="https://www.mywebsite.com/success.html">

 

Obviously change: https://www.mywebsite.com/success.html

to your website return url

Login to Me Too

Molly9730
Contributor
Contributor

Thanks samhighfield.  I do have that line of code (see my sample above) and it's not working. However, my buttons are hosted, and you said yours are non-hosted. I looked into non-hosted buttons and it looks like they're not very secure. I'm not sure if it's worth switching to non-hosted buttons, or if I should just wait for PayPal to (hopefully) fix the problem. They have not given me an ETA.

Login to Me Too

Danuk1
Contributor
Contributor

Thank you samhighfield ... your solution works perfectly for me.

Login to Me Too

decomplexity
Contributor
Contributor

Suggestion worked for me also, thank you.

Same problem, but until now has happened intermittently since August (which is even stranger!).

I have a non-hosted button, and the PayPal seller profile is set to use Auto-return and PDT. The PDT URL  does the usual call-back validation, checks for CURL errors and then SUCCESS or FAIL. It then issues a header("Location: " . success) or failure to link to  payment confirmation or failure pages for the user. All very standard.

I have never needed to use a <input type="hidden" name="return" ..> since the Auto-return and PDT code did it for me.

But I have always used a cancel_return.

 

However, my auto-returns and thence PDT have stopped now working altogether. When a payment completes, PayPal displays the Return to Merchant button, and the link on that button is that I have set for the CANCEL_RETURN!!!  

 

So I tried adding a <input type="hidden" name="return"…> specifying the PDT URL (i.e. the code, not just the URL of a “Success” page) and set <input type="hidden" name="rm" value="2"> to get all the payment variables via POST, and everything suddenly worked.

 

Something somewhere in PayPal is not recognising that Auto-return is set in the seller profile.     

Login to Me Too

Harmsen
Contributor
Contributor

Samhighfield:

 

I had the exact same problem and was told by Paypal Support after a lengthy exchange that it was a known bug that their engineers were STILL working on, but Paypal Support failed to mention your workaround which worked for me because my buttons are "non-hosted" (or more technically generated by my php).   I REPORTED YOU TO PAYPAL AS A HERO.   I suspect the bug was introduced by Paypal engineers around September 2018 when Paypal switched from using HTTP 1.0 for postbacks to HTTP 1.1 for postbacks: that change caught many people off gurard as well but is an easy fix/improvement.   It's almost certainly a very simple bug so I have no idea why it is taking Paypal so long to fix it - but thanks to you it is no longer my problem.

Login to Me Too

sam_highfield
Contributor
Contributor
Harmsen, you’ve made my WHOLE WEEK with that message! Thanks very much for going to the effort of reporting that this worked, it is odd that the PayPal support didn’t come up with a solution themselves, as you’d think this is a very widespread and serious problem. Glad it worked for you!
Login to Me Too

sam_highfield
Contributor
Contributor
Harmsen, you’ve made my WHOLE WEEK with that message! Thanks very much for going to the effort of reporting that this worked, it is odd that the PayPal support didn’t come up with a solution themselves, as you’d think this is a very widespread and serious problem. Glad it worked for you!
Login to Me Too

Molly9730
Contributor
Contributor

PayPal notified me today that this problem is fixed for hosted buttons.  I've tested it, and PayPal does correctly send my customers back to my website and successfully trigger my PDT at the end of a purchase.  

 

However, the Continue Shopping button is still not working correctly.  I send a shopping_url via a form with a hidden button, but this appears to be ignored by PayPal.  Instead when I click Continue Shopping PayPal appears to take me back to the previous page, which is the form submit page.  

 

I've notified PayPal Tech Support that the Continue Shopping button still isn't working correctly for me.

Login to Me Too

decomplexity
Contributor
Contributor

Many thanks Molly9730.

Did they make any comment about auto-return for non-hosted buttons ? - or perhaps they are assuming that the <return> workaround will do for the time being.

Whatever the root cause (and it would be nice to know from them what it was!), it would seem odd that PayPal's solution would not apply to both hosted and non-hosted. 

Login to Me Too

Molly9730
Contributor
Contributor

I didn't get any information from them about why the return to my website after purchase wasn't working, or what the fix was - they only said that it was fixed (which it is).

 

I did hear back from them about the "Continue Shopping" button not working.  This was their response:

 

"Based on the HTML I can see in the source code you added those variables outside of the encrypted variable.  Right now all of the transactional information that we are going to use to process this payment is in the encrypted variable.  It seems this variables were added after the fact and they are being ignored.
 
To fix this you will need to recreate the buttons in your PayPal account and add any additional variables you are going to use as you are making the button and not after the fact. "
 
So I learned that all the values I was sending via my form were no longer being used by PayPal (he was right that these were in my form created by PHP and not specified for each hosted button), so I had to edit each of my hosted buttons directly instead of creating the form on the fly in PHP.
 

For each of my hosted buttons, I chose edit button, then for "Step 3: Customize advanced Features  I checked the "Add advanced variables" checkbox and inserted this line:

shopping_url=<URL for my shopping page>

 

That worked.

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.