首页 > 解决方案 > 将变量传入和传出 PayPal

问题描述

我需要在有人结帐时将变量传递给 PayPal,并在付款完成时将其传回。基本上我需要引导用户到 PayPal 付款,然后,在他们付款后,让 PayPal 在返回 url 中告诉我谁付款,这样我就可以在数据库中更新他们的订阅。

现在,在有人注册后,他们被定向到https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EF3UGS6GMWP56,然后在他们付款后,他们被定向到https://culturehog.com /成功

我需要更多类似的东西: https ://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EF3UGS6GMWP56?USER=467

和: https ://culturehog.com/success?USER=467

然后我可以让 PHP 将数据库中的用户 467 更新为“付费”。

有人对这个有经验么?:/

标签: phpurlpaypal

解决方案


您可以使用支付交易变量将“自定义”变量传递给 Paypal:

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#payment-transaction-variables

然后您可以指定一个“返回”网址和一个返回方法“rm”,以使用结帐页面变量获取上述“自定义”变量:

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#paypal-checkout-page-variables


推荐阅读