我如何在测试环境中测试标记的事务响应? Checkout.com

时间:2019-06-25 06:03:24

标签: paypal payment-gateway paypal-sandbox payment checkout

我正在使用checkout.com进行付款处理。我想在测试环境中测试标记的事务响应。

这里是checkout.

的文档

有人可以帮助我如何在测试模式下获得此响应吗?

1 个答案:

答案 0 :(得分:0)

标记交易是Checkout.com中的风险规则所采取的操作

要标记交易,您只需要在Checkout.com集线器中设置一个风险规则并在您的付款请求中触发该风险规则即可。

例如,您可以设置“阈值”风险规则,如果该交易超过(或低于)一定金额,则将标记该交易。

enter image description here

设置此设置后,发送具有触发风险规则的值的付款请求,将导致来自API的标记响应。

您还可以在API Reference of Checkout.com

中看到一些示例响应

以下是示例:

{
"id": "pay_jf7xoknmva3upbatzkiqcwvkea",
"action_id": "act_jf7xoknmva3upbatzkiqcwvkea",
"amount": 20000,
"currency": "USD",
"approved": true,
"status": "Authorized",
"auth_code": "290947",
"eci": "05",
"scheme_id": "638284745624527",
"response_code": "10000",
"response_summary": "Approved",
"risk": {
    "flagged": true
},
"source": {
    // dynamic based on your source
},
"customer": {
    "id": "cus_vh2hq53yioouvg3etkuw2xdhcu",
    "name": "Sarah Mitchell"
},
"processed_on": "2019-06-25T18:27:10Z",
"reference": "ORD-5023-4E89",
"processing": {
    "acquirer_transaction_id": "8138182777",
    "retrieval_reference_number": "000290947597"
},
"_links": {
    "self": {
        "href": "https://api.sandbox.checkout.com/payments/pay_jf7xoknmva3upbatzkiqcwvkea"
    },
    "actions": {
        "href": "https://api.sandbox.checkout.com/payments/pay_jf7xoknmva3upbatzkiqcwvkea/actions"
    },
    "capture": {
        "href": "https://api.sandbox.checkout.com/payments/pay_jf7xoknmva3upbatzkiqcwvkea/captures"
    },
    "void": {
        "href": "https://api.sandbox.checkout.com/payments/pay_jf7xoknmva3upbatzkiqcwvkea/voids"
    }
}
}

注意:

"risk": {
  "flagged": true
},