Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

PayPal glitch

We are using paypal hosted buttons (have been for a long time).

We had to make some changes, now things don't work. Of course Paypal takes their money.

We specify the return location on our site where we want paypal to go back to when it's finished.

The code for the hosted button is:
	<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="3FPLZZ79QQXRC">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="http://www.backflowtestreport.com/ppreturn.php?fr=f&ag=Friendswood&tp=A&uid=">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Open in new window


Note the form variable named return. The return goes to ppreturn.php but NONE of the query string variables are passed (ft, ag, tp & uid). Our site is now https (rather than http as coded in the form), could that make it fail? I am doubtful as it does go to ppreturn.php.

Does paypal still support this mechanism (using a variable called "return" to specify where to go back to)?
Avatar of Andrew Angell
Andrew Angell
Flag of United States of America image

You can't edit hosted buttons directly like that.  It sounds like when you built the button you set it up to use that return URL, but now you're trying to adjust it directly in the code.  You need to adjust things in the saved button in the PayPal account.
Avatar of Richard Korts

ASKER

I seriously doubt that is the case. If that were true, why did I previously have other query string variables there & why did I use a form variable named return if I didn't need to? Current PayPal docs mention the use of a return variable.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Angell
Andrew Angell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I got around this nonsense by using php $_SESSION variables to pass forward the info I need.
I'm taking for granted this works, I don't have time for re-inventing the wheel.

Thanks for your responses.