贝宝返回链接 [英] Paypal return link

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

问题描述

我的网站上有贝宝付款.我使用IPN来处理付款

I have site with paypal payments. I use IPN for processing payments

我希望访问者在贝宝付款后返回到特定页面

I want to visitors return to specific page after paypal payment

我放在篮子里

<input type="hidden" name="return" value="http://site.com/basket/thank-you?param=value">

在某些情况下,对参数=值可能是特定的

Pair param=value could be specific in some cases

但是付款后,访问者只能看到贝宝感谢您的订单"页面:( 访客可以使用此页面上的返回链接,但他们不会这样做:)

But after payment visitors only see paypal "Thanks for your order" page :( Visitors could use return link on this page, but they wouldn't do it :)

我知道可以在PayPal商家帐户中设置自动退回->个人资料->销售首选项->网站付款首选项->网站付款的自动退回

I know that it is possible to set auto return in PayPal merchant account-->profile-->Selling Preferences-->Website Payment Preferences-->Auto Return for Website Payments

但是我应该只设置一个网址.因此,我必须使用Cookie或会话来捕获用户的语言. 为什么会这样呢?为什么返回链接隐藏字段无效?是否可以在没有PDT的情况下获得退货功能?

But there I should set only one url. So I have to use cookies or session to catch users language. Why is it so? Why return link hidden field doesn't work? Is it possible to get return functionality without PDT?

推荐答案

像您一样使用Payments Standard时,即使启用了自动退货,也永远无法保证用户将其退回给您.例如,他们可以在自动返回之前简单地关闭浏览器.根本不是很可靠.

When using Payments Standard like you are, users are never guaranteed to make it back to your return even with Auto-Return enabled. They could simply close the browser before the auto-return happens, for example. It's not very reliable at all.

如果您想确保用户返回到您的应用程序流,则可以使用快速结帐.这涉及3个API调用, SetExpressCheckout GetExpressCheckoutDetails DoExpressCheckoutPayment .

If you want to make sure users get back to your app flow then you can use Express Checkout. This involves 3 API calls, SetExpressCheckout, GetExpressCheckoutDetails, and DoExpressCheckoutPayment.

登录,查看并同意付款后,用户将被发送回您在SetExpressCheckout中指定的ReturnURL.此时,您可以调用GetExpressCheckoutDetails以获取付款人详细信息(可选),然后使用DoExpressCheckoutPayment完成所有操作.

After signing in, review and agreeing to the payment, the user will be sent back to the ReturnURL you specify in SetExpressCheckout. At this point you can call GetExpressCheckoutDetails to obtain payer details (optional) and then finalize everything using DoExpressCheckoutPayment.

我还建议您将数据保存到您的数据库中,或者使用会话变量作为URL参数的反对,因为Express Checkout是在您自己的服务器上而不是在PayPal上进行的,因此可以轻松访问.

I would also recommend saving data to your database or using session variables as oppose to URL parameters, which will be easily accessible since Express Checkout takes place on your own server instead of PayPal's.

这篇关于贝宝返回链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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