简体   繁体   English

在PayPal之间传递变量

[英]Passing Variables to and from PayPal

I need to pass a variable to PayPal when someone checks out and have it pass it back when the payment is completed. 当有人结帐时,我需要将变量传递给PayPal,并在付款完成后将其传递回。 Basically I need to direct the user to PayPal to pay, then, after they pay have PayPal tell me in the return url who paid so I can update their subscription in the database. 基本上,我需要将用户定向到PayPal进行支付,然后,在他们付款后,请PayPal在返回网址中告诉我谁付款了,这样我就可以在数据库中更新他们的订阅。

Right now, after someone registers they are directed to https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EF3UGS6GMWP56 and then after they pay, they are directed to https://culturehog.com/success 现在,在有人注册后,他们将被定向到https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EF3UGS6GMWP56 ,然后在他们付款后,将被定向到https://culturehog.com /成功

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

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

Then I can have the PHP update user 467 in the database to "paid." 然后,我可以使数据库中的PHP更新用户467为“已付费”。

Does anyone have any experience with this? 有人对这个有经验么? :/ :/

You can pass a "custom" variable to Paypal using Payment Transaction Variables: 您可以使用“付款交易变量”将“自定义”变量传递给Paypal:

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

And then you can specify a "return" url and an return method "rm" to get your above "custom" variable back using Checkout Page Variables: 然后,您可以指定一个“返回” URL和一个返回方法“ rm”,以使用Checkout页面变量将上述“自定义”变量取回:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM