贝宝按钮-添加变量以返回URL [英] Paypal Button - Adding Variable to return URL

查看:67
本文介绍了贝宝按钮-添加变量以返回URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试向网站添加一个简单的PayPal按钮.我要做的是设置按钮以包含需要选择的选项".这不是问题,我已经创建了按钮,并显示了选项选择框.

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.

我想做的是返回我自己域上的URL,但是让URL包含从付款之前选择的下拉框中选择的选项.

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.

所以我从mydomain.com开始,选择一个选项,付款后将其重定向回mydomain.com/complete.php?option=theoption

so I start at mydomain.com , select an option and after finishing payment have it redirect back to mydomain.com/complete.php?option=theoption

这可能吗?

推荐答案

在php中,您可以在按钮中添加此隐藏的输入

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 ?>">

其中$ theoption是要附加在返回URL上的选项的值. 请注意,您必须禁用付款审核,以便Paypal会自动重定向回您的网站

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

这篇关于贝宝按钮-添加变量以返回URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆