Paypal Return Value Question
How can I manipulate the code so that the return value is sent to my thank you page (www.website.com/thankyou.php) instead of the root homepage, while keeping everything else intact? The code 开发者_运维百科to my paypal return value is listed below.
<input type="hidden" name="return"
value="<?=$cfg->wwwroot."registration-confirmed-".base64_encode(serialize(array($user->id, 1)))?>">
You should use PDT (Payment Data Transfer) for this purpose.
This reference should be helpful. There are instructions on activating PDT at the bottom of the page.
Once you've setup PDT, simply change your input's name from 'return' to 'custom'.
In your code, which reads PDT data (thankyou.php), issue a redirect to 'custom' value that you'll get from Paypal PDT data. Example PHP script for PDT is here.
精彩评论