将Paypal付款状态定为"DEAD"

Vij*_*try 6 android paypal paypal-sandbox paypal-rest-sdk

我正在使用沙盒凭证在使用卡进行PayPal付款时获得回复.

{
    "client": {
        "environment": "sandbox",
        "paypal_sdk_version": "2.14.6",
        "platform": "Android",
        "product_name": "PayPal-Android-SDK"
    },
    "response": {
        "create_time": "2017-01-31T08:12:40Z",
        "id": "PAY-*************",
        "intent": "sale",
        "state": "created"
    },
    "response_type": "payment"
}
Run Code Online (Sandbox Code Playgroud)

然后,我试图通过支付ID使用rest API调用获取完整详细信息,并在付款响应中获得"DEAD"状态.请检查以下回复

{
  "id": "PAY-*************",
  "create_time": "2017-01-31T08:12:40Z",
  "update_time": "2017-01-31T08:13:22Z",
  "state": "DEAD",
  "intent": "sale",
  "payer": {
    "payment_method": "credit_card",
    "funding_instruments": [
      {
        "credit_card": {
          "type": "visa",
          "number": "xxxxxxxxxxxx1111",
          "expire_month": "11",
          "expire_year": "2025"
        }
      }
    ]
  },
  "transactions": [
    {
      "amount": {
        "total": "2.00",
        "currency": "USD",
        "details": {
          "subtotal": "2.00"
        }
      },
      "description": "New Product",
      "related_resources": []
    }
  ],
  "links": [
    {
      "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-*************",
      "rel": "self",
      "method": "GET"
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

谁能帮助我理解为什么我得到这个?怎么解决这个问题?

Ash*_*ari 3

最后我得到了解决方案。现在回复有点晚了,但这个答案可以为那些仍在苦苦挣扎的人节省时间。

创建付款后,Android SDK 返回以下 JSON,但我们可以看到其状态尚未批准。如果我们使用付款查找 API ( https://api.sandbox.paypal.com/v1/payments/payment/PAY-*************) 来验证付款,我们将获得 DEAD 状态,并且不会有任何交易 id。

{
    "client": {
        "environment": "sandbox",
        "paypal_sdk_version": "2.14.6",
        "platform": "Android",
        "product_name": "PayPal-Android-SDK"
    },
    "response": {
        "create_time": "2017-01-31T08:12:40Z",
        "id": "PAY-*************",
        "intent": "sale",
        "state": "created"
    },
    "response_type": "payment"
}
Run Code Online (Sandbox Code Playgroud)

对我有用的解决方案

问题是我在沙箱中创建了一个 Business 帐户,但我必须在沙箱中创建一个Business-Pro帐户。完成此操作后,我获得了批准状态,当我使用付款查找 API 时,我获得了我们需要的所有详细信息。