Paypal 争议沙盒测试,触发 CUSTOMER.DISPUTE.RESOLVED 事件

时间:2021-03-02 09:47:41

标签: paypal paypal-sandbox paypal-ipn

我正在尝试触发 CUSTOMER.DISPUTE.RESOLVED 事件以在沙盒中进行争议测试,为此我进行了测试付款并在解决中心发起了争议。为了触发争议解决事件,我想调用解决争议方法 https://developer.paypal.com/docs/api/customer-disputes/v1#disputes-actions_adjudicate。 但是我无法做到这一点,因为创建争议后处于 WAITING_FOR_SELLER_RESPONSE 状态,我只允许致电接受索赔并提供证据。 接受索赔后,我只能调用提供支持信息的方法,仍然不允许使用结算方法。

所以我的问题是如何在沙箱中触发 CUSTOMER.DISPUTE.RESOLVED 事件以及我需要从这里调用解决方法的争议状态https://developer.paypal.com/docs/api/customer-disputes/v1#disputes-actions_adjudicate

请求/响应示例

争议打开后的详细信息

{
    "dispute_id": "PP-D-40523",
    "create_time": "2021-03-03T08:47:08.000Z",
    "update_time": "2021-03-03T08:48:12.000Z",
    "disputed_transactions": [
        {
            "buyer_transaction_id": "35703532VD052404F",
            "seller_transaction_id": "92198049S8582070N",
            "create_time": "2021-03-03T08:41:55.000Z",
            "transaction_status": "COMPLETED",
            "gross_amount": {
                "currency_code": "USD",
                "value": "29.99"
            },
            "buyer": {
                "name": "John Doe"
            },
            "seller": {
                "email": "sb-47flty3787626@business.example.com",
                "merchant_id": "TQNC9P6W9822C",
                "name": "John Doe's Test Store"
            },
            "items": [], 
            "seller_protection_eligible": true
        }
    ],  
    "reason": "UNAUTHORISED",
    "status": "WAITING_FOR_SELLER_RESPONSE",
    "dispute_amount": {
        "currency_code": "USD",
        "value": "29.99"
    },  
    "dispute_life_cycle_stage": "CHARGEBACK",
    "dispute_channel": "INTERNAL",
    "extensions": {
        "buyer_contacted_time": "2021-02-11T17:50:48.000Z"
    },  
    "seller_response_due_date": "2021-03-24T08:47:50.000Z",
    "allowed_response_options": {
        "accept_claim": {
            "accept_claim_types": [
                "REFUND"
            ]
        }
    },  
    "links": [
        {
            "href": "https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-40523",
            "rel": "self",
            "method": "GET"
        },
        {
            "href": "https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-40523/provide-evidence",
            "rel": "provide_evidence",
            "method": "POST"
        },
        {
            "href": "https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-40523/accept-claim",
            "rel": "accept_claim",
            "method": "POST"
        }
    ]   
}

提供证据后

{
    "dispute_id": "PP-D-40523",
    "create_time": "2021-03-03T08:47:08.000Z",
    "update_time": "2021-03-03T11:01:55.000Z",
    "disputed_transactions": [
        {
            "buyer_transaction_id": "35703532VD052404F",
            "seller_transaction_id": "92198049S8582070N",
            "create_time": "2021-03-03T08:41:55.000Z",
            "transaction_status": "COMPLETED",
            "gross_amount": {
                "currency_code": "USD",
                "value": "29.99"
            },
            "buyer": {
                "name": "John Doe"
            },
            "seller": {
                "email": "sb-47flty3787626@business.example.com",
                "merchant_id": "TQNC9P6W9822C",
                "name": "John Doe's Test Store"
            },
            "items": [],
            "seller_protection_eligible": true
        }
    ],
    "reason": "UNAUTHORISED", 
    "status": "UNDER_REVIEW",
    "dispute_amount": {
        "currency_code": "USD",
        "value": "29.99"
    },  
    "dispute_life_cycle_stage": "CHARGEBACK",
    "dispute_channel": "INTERNAL",
    "extensions": {
        "buyer_contacted_time": "2021-02-11T17:50:48.000Z"
    },  
    "evidences": [
        {
            "evidence_type": "OTHER",
            "documents": [
                {
                    "name": "ava.jpeg"
                }
            ],
            "notes": "Test",
            "source": "SUBMITTED_BY_SELLER",
            "date": "2021-03-03T11:01:56.000Z",
            "action_info": {
                "action": "PROVIDE_EVIDENCE"
            }
        }
    ],
    "links": [
        {
            "href": "https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-40523",
            "rel": "self",
            "method": "GET"
        },
        {
            "href": "https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-40523/provide-supporting-info",
            "rel": "provide_supporting_info",
            "method": "POST"
        }
    ]
}

索赔后的另一个争议

{

    "dispute_id": "PP-D-40407",
    "create_time": "2021-03-02T08:17:07.000Z",
    "update_time": "2021-03-02T08:47:05.000Z",
    "disputed_transactions": [
        {
            "buyer_transaction_id": "1VS7234539684123P",
            "seller_transaction_id": "2S50928513331053U",
            "create_time": "2021-03-02T08:09:49.000Z",
            "transaction_status": "COMPLETED",
            "gross_amount": {
                "currency_code": "USD",
                "value": "29.99"
            },
            "buyer": {
                "name": "John Doe"
            },
            "seller": {
                "email": "sb-47flty3787626@business.example.com",
                "merchant_id": "TQNC9P6W9822C",
                "name": "John Doe's Test Store"
            },
            "items": [],
            "seller_protection_eligible": true
        }
    ],
    "reason": "UNAUTHORISED",
    "status": "UNDER_REVIEW",
    "dispute_amount": {
        "currency_code": "USD",
        "value": "29.99"
    },
    "dispute_life_cycle_stage": "CHARGEBACK",
    "dispute_channel": "INTERNAL",
    "extensions": {
        "buyer_contacted_time": "2021-02-11T17:50:48.000Z"
    },
    "evidences": [
        {
            "evidence_type": "OTHER",
            "documents": [],
            "notes": "Refund.",
            "source": "SUBMITTED_BY_SELLER",
            "date": "2021-03-02T08:47:06.000Z",
            "action_info": {
                "action": "ACCEPT_CLAIM",
                "response_option": "REFUND"
            }
        }
    ],
    "links": [
        {
            "href": "https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-40407",
            "rel": "self",
            "method": "GET"
        },
        {
            "href": "https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-40407/provide-supporting-info",
            "rel": "provide_supporting_info",
            "method": "POST"
        }
    ]
}

有争议的裁判

请求

POST https://api.sandbox.paypal.com/v1/customer/disputes/PP-D-40523/adjudicate
{
    "adjudication_outcome": "BUYER_FAVOR"
}

回复

{
    "name": "VALIDATION_ERROR",
    "message": "Invalid request - see details",
    "debug_id": "6aadbbc916b3c",
    "information_link": "https://developer.paypal.com/docs/api/customer-disputes/v1/#errors",
    "details": [
        {
            "issue": "ACTION_NOT_ALLOWED_IN_CURRENT_DISPUTE_STATE"
        }
    ],
    "links": []
}

1 个答案:

答案 0 :(得分:0)

您必须在 PayPal 状态下将其设为“UNDER_REVIEW”,然后您才能以一种或另一种方式触发裁决。

因此,如果是“WAITING_FOR_SELLER_RESPONSE”,您应该提供证据;有一个呼吁。

您可能还需要提出要约并拒绝要约,或升级以提出索赔。

此工具可能有助于了解潜在步骤:https://www.paypal.com/apex/product-profile/customerDisputes/