简体   繁体   English

PayPal Express Checkout验证付款

[英]PayPal Express Checkout Validating Payment

我们如何使用PayPal Express Check Out中Paypal的响应令牌来验证付款成功/失败。

PayPal responds with a message, such as the one shown below. 贝宝会以一则消息进行响应,例如以下所示。 Note the status, which should include ACK set to Success , and a token that is used in subsequent steps. 注意状态,该状态应包括ACK设置为Success ,以及在后续步骤中使用的令牌。

TIMESTAMP=2007%2d04%2d05T23%3a23%3a07Z
&CORRELATIONID=63cdac0b67b50

&ACK=Success

&VERSION=XX%2e000000
&BUILD=1%2e0006
&TOKEN=EC%2d1NK66318YB717835M

Source 资源

The DoExpressCheckoutPayment response (if Successful) will include a PAYMENTINFO_n_PAYMENTSTATUS parameter that you can check to see if the payment associated with the API call is actually completed or not. DoExpressCheckoutPayment响应(如果成功)将包含PAYMENTINFO_n_PAYMENTSTATUS参数,您可以检查该参数以查看与API调用关联的付款是否实际完成。

If this param has a value of "Completed" then you know you're good to go. 如果此参数的值为“已完成”,那么您就知道自己很好。 It could be "Pending", though, in cases where an e-check is used for payment, fraud filters flag the transaction, etc. 但是,在使用电子支票进行付款,欺诈过滤器标记交易等情况下,它可能是“待处理”。

Because of this it is recommended that you use Instant Payment Notification (IPN) in order to handle all post-transaction processing tasks like updating your database, sending email notifications, etc. 因此,建议您使用即时付款通知(IPN)来处理所有交易后处理任务,例如更新数据库,发送电子邮件通知等。

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

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