create_with_paypal 节点 sdk PayPal 中的发票编号

Invoice number in create_with_paypal node sdk PayPal

我正在使用 Create PayPal SDK 使用贝宝进行交易并将用户重定向到贝宝。

我使用与上面 link 中建议的代码相同的代码,但我想发送带有创建 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