简体   繁体   English

从PayPal回调。 如何知道用户立即付款成功?

[英]Callback from PayPal. How to know the user paid successfully immediately?

I am running a e-commerce website and I want to integrate PayPal. 我正在运行一个电子商务网站,我想集成PayPal。 I need to know immediately whether a user paid successfully or not after they paid via their credit cards. 我需要立即知道用户通过信用卡付款后是否成功付款。 Is there a chance i can do that with PayPal? 我有机会使用PayPal做到这一点吗?

I've heard PayPal has a service called IPN, which can post to my server and tell me the transaction's status. 我听说贝宝(PayPal)有一个名为IPN的服务,该服务可以发布到我的服务器上并告诉我交易的状态。 But lots of people are complaining that there are huge delays with IPN's PHP API. 但是很多人抱怨IPN的PHP API的延迟很大。

Just finished an IPN integration a few hours ago :). 几小时前刚刚完成IPN集成:)。

IPN stands for INSTANT payment notifications. IPN代表即时付款通知。 In most times it just works(hi Apply fans!). 在大多数情况下,它只是有效(嗨,请申请粉丝!)。

You add a form with variables such as currency and return URL and with a special page that you expect Paypal to send transaction information when the payment is made. 您添加一个带有货币和返回URL之类的变量的表格,并带有一个特殊的页面,您期望Paypal在付款时会发送交易信息。 Receiving a notification does not mean funds are sent to your account but the transaction has completed. 收到通知并不意味着资金已发送到您的帐户,但交易已完成。 (possible reasons to not get funds to your account include problems with card provider, incomplete accounts, etc) (未向您的帐户存入资金的可能原因包括卡提供商的问题,帐户不完整等)

You will face some questions regarding specific problems. 您将面临有关特定问题的一些问题。 But I would suggest checking paypal site and it's API docs. 但我建议您检查Paypal网站及其API文档。 They are pretty straight forward and with a little understanding in your programming language and how HTTP works, you can implement it. 它们非常简单,并且对您的编程语言以及HTTP的工作原理了解甚少,因此您可以实现它。

I have seen some posts about PayPal IPN system is slow. 我看到一些有关PayPal IPN系统的帖子很慢。 I have not seen it myself but in most cases, I'm sure you will get paypal API calls just before the user come back to your site. 我自己还没有看到它,但是在大多数情况下,我相信您会在用户返回您的网站之前收到Paypal API调用。

我在使用nSoftware的 PayPal插件方面取得了巨大的成功。

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

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