Paypal / v1 / payment / payment 503 Node.js无效

时间:2016-04-22 03:11:49

标签: node.js paypal

以下路线不起作用。使用VALID card_id,金额为100.00,说明为“Sale”......

请告诉我我做错了什么......

router.post("/payment", function(req,res) {

    var savedCard = {
        "intent": "sale",
        "payer": {
            "payment_method": "credit_card",
            "funding_instruments": [{
                "credit_card_token": {
                    "credit_card_id": req.body.card_id
                }
            }]
        },
        "transactions": [{
            "amount": {
                "currency": "USD",
                "total": req.body.amount
            },
            "description": req.body.description
        }]
    };

    paypal.payment.create(savedCard, function (err, payment) {
        if (err) return res.status(500).send(err)
        return res.status(200).send(payment)
    })

  })

此代码返回以下错误。我尝试了10种不同的信用卡:

{
  "response": {
    "name": "INTERNAL_SERVICE_ERROR",
    "information_link": "https://api.sandbox.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR",
    "debug_id": "7e1f62be759b1",
    "httpStatusCode": 503
  },
  "response_stringified": "{\"name\":\"INTERNAL_SERVICE_ERROR\",\"information_link\":\"https://api.sandbox.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR\",\"debug_id\":\"7e1f62be759b1\",\"httpStatusCode\":503}",
  "httpStatusCode": 503
}

我不明白......

0 个答案:

没有答案