【发布时间】:2021-01-14 08:50:29
【问题描述】:
当与 PayPal 的 V2 订单 API using the NodeJS SDK 集成时,何时是完成订单的正确时间(例如,将产品运送给客户)。
async function captureOrder(orderId) {
try {
const request = new checkoutNodeJssdk.orders.OrdersCaptureRequest(orderId);
request.requestBody({});
const response = await payPalClient.client().execute(request);
// Is it safe to assume, if the above line didn't reject, the order has been successfully captured?...or do we need to verify the status of the order / capture etc.
return response;
}
catch (e) {
console.log(e)
}
}
【问题讨论】:
标签: node.js paypal paypal-rest-sdk