php - 将变量传入和传出 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 更新为“付费”。
有人对这个有经验么?:/
解决方案
您可以使用支付交易变量将“自定义”变量传递给 Paypal:
然后您可以指定一个“返回”网址和一个返回方法“rm”,以使用结帐页面变量获取上述“自定义”变量:
推荐阅读
- javascript - 使用 @babel/standalone 时 JavaScript 堆内存不足
- ios - 调试信息“DWARF”和崩溃日志
- javascript - 如何添加指向 Google GeoChart 地图的链接?
- javascript - MongoDB 的聚合函数有问题,得到错误消息不明白为什么
- typescript - 打字稿:如何将字符串转换为类型
- python - 如何平均熊猫数据框中的前瞻性数据
- javascript - 日历调度程序类似控件以指定值范围
- url-rewriting - 在 NetCore 2 重写中间件中修改 RewriteContext Host
- php - PHP - 如何重构代码以便我不必为每个表单实例复制和粘贴它?
- git - git 和 sourcetree user.name 混淆