我正在开发一个在线出售PDF文档的网站,在这个网站上,用户可以通过PayPal支付后,通过电子邮件获得下载链接。
在上述场景中,可能的PayPal支付状态值是什么?
我只能想到完成(Complete)
和未完成(Incomplete)
。在此使用处理中(Processing)
是否合适?
在开发之前,您应该熟悉 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文件),如果付款延迟,他不会承担任何风险,而与实物商品有关的商家则不同。payment_status
变量过去曾经被称作st
。PayPal显然已经将st
变量更改为payment_status
。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。
created
之后,我会收到一个completed
吗?由于created
只被德国客户使用,所以我不知道该期望什么。 - Mysticpayment_status
和txn_type
之间的区别。有时候Paypal会发送txn_type
,有时候不会?在向用户记账之前,我应该除了检查payment_status
之外还要检查txn_type
吗?(另外,你发布的链接也已经失效了,你知道我可以在哪里找到更新后的链接吗?) - supersantxn_type
是交易类型。它是可选的,除非您需要处理特定类型的付款。这里是相关文档:https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/#id08CTB0S055Z - Donny Kurnia