paypal返回商户问题

发布于 2024-09-04 21:53:39 字数 258 浏览 1 评论 0原文

我使用贝宝标准作为我的支付网关。
我的问题是,在 Paypal 标准付款方式中,

我的代码如下:

当用户单击 Paypal 的“返回商家”按钮时,用户将返回带有订单数据的网站,并且在该页面上我的订单条目将被插入我的数据库。

因此,当有人付款但没有点击返回商家链接时,我的问题就会出现。

因此,在这种情况下,客户得到报酬,但由于没有条目,我的数据库无法正常工作。

希望我对大家都清楚。

谢谢 阿维纳什

I am using paypal standard as my payment gateway.
My problem is that, in Paypal Standard payment method,

I have done my code as below:

When user click on return to merchant button from paypal then user return to the site with order data , and on that page my order entry will be inserted in my DB.

So my problem occur when someone pays but don't click on return to merchant link.

So in this case customer gets paid, but due to no entry my DB its not working proper.

Hope I am clear to all.

Thanks
Avinash

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

笑饮青盏花 2024-09-11 21:53:39

您必须设置一个回调 IPN,以便在结账完成时侦听 PayPal 的响应。然后该脚本可以处理数据输入部分。 PayPal 及其开发者网络是一个很好的起点。

正如您已经注意到的那样,您的解决方案不是最优的并且容易出错(任何依赖于某些用户行为的东西都在某种程度上)。

You have to set up a callback IPN that listens for PayPal's response when the check out has been completed. This script can then handle the data entry portion. A great place to start is PayPal and its developer network.

Your solution, as you already noticed, is sub-optimal and error-prone (anything that relies on certain user behavior is to some extend).

冰火雁神 2024-09-11 21:53:39

使用侦听器消化 IPN 与您在 PDT 成功/返回页面上执行的操作几乎相同,因此我通常只执行这两个操作。仅拥有 IPN 将确保数据完整性,但由于拥有一个 PDT 成功页面很不错,其中包含一些逻辑,欢迎用户回来并通过分解消息来确保他们的交易成功,因此您不妨只执行您的操作订单处理也在那里。只需跟踪事务 ID,这样就不会重复处理任何内容。

Digesting the IPN with a listener is pretty much the same as what you would be doing on your PDT success/return page so I usually just do both. Having just the IPN will ensure data integrity but since its nice to have a PDT success page that has some logic in it that welcomes the user back and ensures them that their transaction was successful by breaking down the message, you might as well just do your order processing there as well. Just keep track of the transaction IDs so nothing gets processed twice.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文