我正在使用Create PayPal SDK使用 paypal 进行交易并将用户重定向到 paypal。
我使用与上面链接中建议的相同的代码,但我想使用创建 Paypal 发送发票号码以显示在交易详细信息下。但我无法找到如何将发票号码发送到 PayPal。
请指导我是否有任何对象可以将发票号码发送到 Create PayPal SDK或者我可以将发票号码发送到 PayPal 的任何其他方法。
注意:该项目位于 sailsjs 中。
谢谢
最佳答案
请检查:https://github.com/paypal/PayPal-node-SDK/blob/master/samples/invoice/send.js
var invoiceId = "INV2-GLJ8-9FA2-26BB-GHLU";
paypal.invoice.send(invoiceId, function (error, rv) {
if (error) {
console.log(error.response);
throw error;
} else {
console.log("Send Invoice Response");
console.log(rv);
}
});
请在此处查看完整的发票示例,这里有您需要的一切:https://github.com/paypal/PayPal-node-SDK/tree/master/samples/invoice
根据文档,您可以处理自定义 ID:
For exploring additional payment capabilites, such as handling discounts, insurance, soft_descriptor and invoice_number, have a look at this example. These bring REST payment functionality closer to parity with older Merchant APIs. https://github.com/paypal/PayPal-node-SDK
关于node.js - create_with_paypal Node sdk PayPal中的发票号码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30844942/