Paypal API 问题 - 我可以使用返回网址来验证付款吗

发布于 2024-09-11 01:35:15 字数 387 浏览 0 评论 0原文

我正在尝试创建一个简单的贝宝购买系统。通过一些教程,似乎我需要使用 IPN(即时付款通知)系统来跟踪订单是否已付款。

使用 return url 变量并传入订单 id 是否足够?例如,类似于 return="http://mysite.com/paid?id=5&pass=xyS2y"

变量 - PayPal HTML 变量

I'm trying to create a simple paypal purchase system. Going through a few tutorials, it seems like I need to use the IPN (Instant Payment Notification) system to keep track of whether the order is paid.

Is it sufficient to use the return url variable instead, and pass in the order id? For example, something like return="http://mysite.com/paid?id=5&pass=xyS2y"

The variables - PayPal HTML Variables

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

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

发布评论

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

评论(1

蒲公英的约定 2024-09-18 01:35:39

否 - 用户付款后可能不会返回您的网站。

如果您确实收到 PayPal 退货,您仍然需要像处理 IPN 一样对其进行验证,以确认付款已完成、金额正确、商品正确、收款人帐户(您)正确、客户正确,以获得正确的订单参考号、正确的货币、正确的运费金额等。您对此验证的需求可能会有所不同,具体取决于您所接受的付款的复杂程度(例如,如果只是捐赠,则与其他付款相比,处理量会较少)比如说多个产品订单)。

您还需要确保稍后获得 IPN 时不会重复处理订单。

No - the user might not return to your site after payment.

If you do get a PayPal return you still need to validate it just as you would for IPN in order to confirm payment went through, for the correct amount, for the correct items, for the correct payee account (you), for the correct customer, for the correct order reference, in the correct currency, with the correct shipping amount etc. etc. Your needs on this validation may vary depending on how complicated the payment you are taking is (if it's just a donation for instance that's less processing compared to say a multiple product order).

You will also need to make sure you don't double-process the order when you get the IPN through later.

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