使用 Paypal 立即购买和 IPN 付款
我的网站上有一项功能,我想在用户付费后启用该功能。我正在使用 Paypal 立即购买按钮和即时付款通知。当用户点击“立即购买”按钮时,用户将被带到 paypal 网站进行支付,交易完成后,我的 jsp 文件会通过 IPN 异步调用接收到该调用。 我的问题是,如果用户在我的网站上订阅和在 paypal 网站上付款时使用不同的电子邮件 ID,我如何跟踪哪个用户已付款。
I have a feature on my website which I want to enable after user pays for it. I am using Paypal buy now button and Instant Payment Notification. When user clicks on buy now button, user is taken to paypal website to pay and by IPN asynchronous call is received by my jsp file when transaction is complete.
My question is how can I keep track which user has paid if the user uses different email ids while subscribing on my website and while paying on paypal website.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用“自定义”参数。您可以在初始请求中将此信息发送给 PayPal,它将与 PayPal 的 IPN POST 中的所有其他数据一起返回给您。
对于网站付款标准,请使用:
对于 Express Checkout 或 Website Payments Pro,请使用:
CUSTOM=xxxxxxxxx
它将在 IPN POST 数据中以“CUSTOM=xxxxxxxxx”的形式返回。
Use the "custom" parameter. You can send this along in the initial request to PayPal, and it will be returned to you along with all other data in the IPN POST from PayPal.
For Website Payments Standard, use:
<input type="hidden" name="custom" value="your custom data here">
For Express Checkout or Website Payments Pro, use:
CUSTOM=xxxxxxxxx
It will be returned as "CUSTOM=xxxxxxxxx" in the IPN POST data.