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

查看:23
本文介绍了Paypal 按钮 - 添加变量以返回 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 的选项的值.请注意,您必须禁用付款审核,以便贝宝自动重定向回您的网站

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

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

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