node.js - Paypal :使用 REST API/Nodejs SDK 的交易历史

标签 node.js rest paypal transactions

我想显示用户进行/接收的所有入站/出站交易,以将其显示在一个简单的 html 列表中。

我正在使用推荐的 node.js 模块 https://github.com/paypal/rest-api-sdk-nodejs我正在尝试使用此代码来获取交易:

    // Get Transaction History
    paypal.payment.list({ 
        'count': 100,
        'sort_by':'create_time',
        'sort_order': 'asc',
        'start_time': '2008-03-06T11:00:00Z'
    }, function(error, payment_history){
        if(error){
            console.error('error', error);
            response.data.payment_history = {};
        } else {
            console.log('history', payment_history);
            response.data.payment_history = payment_history;
        }
        response.finish();
    });

但是 payment_history 给了我 { count: 0 } 。我很确定自 2008 年以来我就有交易。

我不太确定是什么问题。用户已经使用 access_token 登录,我可以显示用户信息,但我不知道如何提取交易信息。

最佳答案

查看https://developer.paypal.com/docs/faq/#general-developer-questions对于“我可以使用 REST API 检索使用经典 API 创建的事务的历史记录吗?”的答案。

关于node.js - Paypal :使用 REST API/Nodejs SDK 的交易历史,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23150378/

相关文章:

javascript - 将解析后的 JSON 读入数组不起作用?

rest - 如何禁用 Firebase 数据库的 REST API 调用?

php - 从 Paypal 支付意图多维数组中获取值

asp.net - 存在一般付款处理错误。 (结果代码 = -12)

node.js - Express 提供的 404 页面的相对路径

node.js - 将身份验证快速应用为单独的微服务

javascript - Puppeteer 和 Chromium 在没有旗帜的情况下启动

web-applications - Web 应用程序的 RESTful 身份验证

php - 无需对移动应用进行用户身份验证即可保护私有(private) REST API 的最佳方法

c++ - Xcode 5 项目在模拟器 3.5 上运行,但在设备上出现链接器错误