可能的支付状态值

33

我正在开发一个在线出售PDF文档的网站,在这个网站上,用户可以通过PayPal支付后,通过电子邮件获得下载链接。

在上述场景中,可能的PayPal支付状态值是什么? 我只能想到完成(Complete)未完成(Incomplete)。在此使用处理中(Processing)是否合适?

2个回答

79

在开发之前,您应该熟悉 PayPal IPN 和 PDT 的概念。请阅读 IPN 和 PDT 变量的文档。以下是来自该文档页面的付款状态可能性:

payment_status

付款的状态:

Canceled_Reversal: A reversal has been canceled. For example, you won a dispute with the customer, and the funds for the transaction that was reversed have been returned to you.
Completed: The payment has been completed, and the funds have been added successfully to your account balance.
Created: A German ELV payment is made using Express Checkout.
Denied: You denied the payment. This happens only if the payment was previously pending because of possible reasons described for the pending_reason variable or the Fraud_Management_Filters_x variable.
Expired: This authorization has expired and cannot be captured.
Failed: The payment has failed. This happens only if the payment was made from your customer’s bank account.
Pending: The payment is pending. See pending_reason for more information.
Refunded: You refunded the payment.
Reversed: A payment was reversed due to a chargeback or other type of reversal. The funds have been removed from your account balance and returned to the buyer. The reason for the reversal is specified in the ReasonCode element.
Processed: A payment has been accepted.
Voided: This authorization has been voided.
我通常收到的最常见的状态是已完成待处理待处理的常见原因是买家和卖家使用不同的货币,例如:您以美元出售,买家使用英镑支付,PayPal将把交易标记为待处理,并在几天后清算。 我的其中一位客户要求我将待处理已完成同等对待,因为他只出售数字商品(PDF文件),如果付款延迟,他不会承担任何风险,而与实物商品有关的商家则不同。
您可以在此页面上获取完整的PayPal文档。
值得注意的是,payment_status变量过去曾经被称作st。PayPal显然已经将st变量更改为payment_status

“created”是最终的“payment_status”吗? - Mystic
1
我的意思是:在一个created之后,我会收到一个completed吗?由于created只被德国客户使用,所以我不知道该期望什么。 - Mystic
我的建议是创建一个暂存网站,使用沙盒Paypal账户作为买家和卖家。尝试进行交易并观察日志,查看从Paypal获得的状态。 - Donny Kurnia
这个回答比我刚刚读完的20页Paypal文档更有帮助。我现在唯一困惑的是payment_statustxn_type之间的区别。有时候Paypal会发送txn_type,有时候不会?在向用户记账之前,我应该除了检查payment_status之外还要检查txn_type吗?(另外,你发布的链接也已经失效了,你知道我可以在哪里找到更新后的链接吗?) - supersan
1
@supersan txn_type 是交易类型。它是可选的,除非您需要处理特定类型的付款。这里是相关文档:https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/#id08CTB0S055Z - Donny Kurnia
6
截至2017年,这是有关状态的更新链接。在此页面上搜索“payment_status”。 https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/ - Volomike

1

https://developer.paypal.com/docs/api/payments/v1/

状态枚举

支付、授权或订单交易的状态。取值为:

created. 交易已成功创建。

approved. 客户批准了交易。对于销售交易,生成 sale_id 后,状态从 created 变为 approved;对于授权交易,生成 authorization_id 后,状态从 created 变为 approved;对于订单交易,生成 order_id 后,状态从 created 变为 approved。

failed. 交易请求失败。

只读。

可能的取值: created, approved, failed。

输入图像描述


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接