paypal - 进行捕获时,使用 Rest API 不断收到 404 错误

标签 paypal paypal-sandbox

这是对我的原始帖子的编辑。我认为 paypal Rest api 沙箱已关闭。

错误刚刚开始,我以前没有遇到过: 这是捕获 URL: https://api.sandbox.paypal.com/v1/payments/payment/PAY-8EN83459YH6921921KJ4QNHQ

这是一个 404 错误。这是正文:

{
name: "INVALID_RESOURCE_ID"
message: "The requested resource ID was not found"
information_link: "https://developer.paypal.com/webapps/developer/docs/api/#INVALID_RESOURCE_ID"
debug_id: "e56bae98dcc26"
}

付款已正确创建,我使用了返回的付款创建响应中提供的相同凭据和付款链接。

以下是原始付款创建调用的响应:

{
  "id": "PAY-8EN83459YH6921921KJ4QNHQ",
  "create_time": "2013-11-05T14:54:22Z",
  "update_time": "2013-11-05T14:54:30Z",
  "state": "approved",
  "intent": "authorize",
  "payer": {
    "payment_method": "credit_card",
    "funding_instruments": [
      {
        "credit_card": {
          "type": "visa",
          "number": "xxxxxxxxxxxx0331",
          "expire_month": "11",
          "expire_year": "2018",
          "first_name": "Joe",
          "last_name": "Shopper",
          "billing_address": {
            "line1": "52 N Main ST",
            "city": "Johnstown",
            "state": "OH",
            "postal_code": "43210",
            "country_code": "US"
          }
        }
      }
    ]
  },
  "transactions": [
    {
      "amount": {
        "total": "7.47",
        "currency": "USD",
        "details": {
          "subtotal": "7.41",
          "tax": "0.03",
          "shipping": "0.03"
        }
      },
      "description": "This is the payment transaction description.",
      "related_resources": [
        {
          "authorization": {
            "id": "0UH21242UH1119007",
            "create_time": "2013-11-05T14:54:22Z",
            "update_time": "2013-11-05T14:54:30Z",
            "state": "authorized",
            "amount": {
              "total": "7.47",
              "currency": "USD",
              "details": {
                "subtotal": "7.41",
                "tax": "0.03",
                "shipping": "0.03"
              }
            },
            "parent_payment": "PAY-8EN83459YH6921921KJ4QNHQ",
            "valid_until": "2013-12-04T14:54:22Z",
            "links": [
              {
                "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/authorization\/0UH21242UH1119007",
                "rel": "self",
                "method": "GET"
              },
              {
                "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/authorization\/0UH21242UH1119007\/capture",
                "rel": "capture",
                "method": "POST"
              },
              {
                "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/authorization\/0UH21242UH1119007\/void",
                "rel": "void",
                "method": "POST"
              },
              {
                "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/payment\/PAY-8EN83459YH6921921KJ4QNHQ",
                "rel": "parent_payment",
                "method": "GET"
              }
            ]
          }
        }
      ]
    }
  ],
  "links": [
    {
      "href": "https:\/\/api.sandbox.paypal.com\/v1\/payments\/payment\/PAY-8EN83459YH6921921KJ4QNHQ",
      "rel": "self",
      "method": "GET"
    }
  ]
}

最佳答案

目前已报告 REST API 存在问题。 PayPal 正在努力解决这个问题。

关于paypal - 进行捕获时,使用 Rest API 不断收到 404 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19773755/

相关文章:

javascript - 是否保证在客户端智能支付按钮 .then() *之后触发 webhook?

paypal - “无法识别的内容安全策略指令 "reflected-xss'”通过 chromedriver 生成的与 PayPal 相关的错误

Paypal REST API 自适应/多次付款(更改收款人)

asp.net-mvc-4 - 如何开始使用新的 PayPal 开发网站

android - Calabash 使用 Paypal 进行自动化测试

facebook - 来自 Facebook 的网站 Paypal 按钮

paypal - Magento 1.7.0.2 和 Paypal Advanced 不工作

android - 多个 PayPal 应用程序和验证付款

Paypal php传递手续费参数

android - 集成 Android Paypal sdk 或 MPL