开发者

Paypal Button - Adding Variable to return URL

开发者 https://www.devze.com 2023-02-21 17:42 出处:网络
I am trying to add a simple PayPal button to a website. What I am wanted to do is set up the button to include \"options\" that need to be selected. This is not a problem, I have the button created an

I am trying to add a simple PayPal button to a website. What I am wanted to do is set up the button to include "options" that need to be selected. This is not a problem, I have the button created and the option select box shows.

What I want to do is return to a URL on my own domain, but have the URL include the selected option from the drop down box that was selected before payment.

so I start at mydomain.com , select an option and after finishing payment have it redirect back to my开发者_运维问答domain.com/complete.php?option=theoption

is this possible?


in php you can add this hidden input in your button

<INPUT TYPE="hidden" NAME="return" value="<?php echo 'mydomain.com/complete.php?option='.$theoption ?>">

where $theoption is the value of theoption that you want to be appended on the return url. Take note that you have to disable payment review so that paypal will automatically redirect back to you website

0

精彩评论

暂无评论...
验证码 换一张
取 消