Paypal /v1/payments/payment 503 Node.js not working -
the following route not work. valid card_id, and, amount that's 100.00 , description "sale"...
please tell me i'm doing wrong...
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) }) })
this code returns following error. , have tried 10 different credit cards:
{ "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 }
i don't it...
Comments
Post a Comment