我们在沙箱环境中编写了以下功能
function captureTransactions(access_token, d) {
try {
var req = http.request("POST", _config.host + "/v1/payments/authorization/" + d.authorization_id + "/capture", JSON.stringify({
"amount": {
"currency": "USD",
"total": d.total
},
"is_final_capture": true
}), {
"Content-Type": "application/json",
"Authorization": "Bearer " + access_token
});
var r = JSON.parse(req.readAll().toString());
} catch (e) {
console.error(e.stack);
console.error(r);
}
console.warn("[captureTransactions]", r);
return r;
};
并收到以下错误
{
"name": "CAPTURE_AMOUNT_LIMIT_EXCEEDED",
"message": "Capture amount exceeds allowable limit.",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#CAPTURE_AMOUNT_LIMIT_EXCEEDED",
"debug_id": "2fc79fc7df623"
}
有谁能告诉我收到这个消息的原因是什么以及如何修复它?请注意,我们只测试5美元的付款,因此不应该由于交易规模。我们之前在同一张卡上做了多次授权,但不确定这是否是导致此错误的原因?
感谢您的帮助!