node.js - create_with_paypal Node sdk PayPal中的发票号码

标签 node.js sails.js paypal

我正在使用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/

相关文章:

css - node.js - 当参数 express.js 太长时无法加载 css

javascript - 如何在 for 循环中编写 node.js Async?

node.js - 使用 websockets (socket.io) 进行 sails 0.10.x

android - 将桌面和移动客户端连接到 Django 和 Sails MVC webframeworks

php paypal pro(高级)集成问题

javascript - 如何在strongloop弧中更改主机

node.js - 为什么我无法使用 axios 向我的 Elastic Enterprise Search 应用程序发出搜索请求?

node.js - Sails 与 Loopback API 后端

php - PayPal Permissions API - 什么返回到 return_url?

python - Braintree paypal 实现到 django-python