Paypal:使用REST API / Nodejs SDK的交易logging

我想显示用户所做的/收到的所有入站/出站事务,以便在简单的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_tokenlogin,我可以显示用户信息,但我不知道如何提取交易信息。

查看https://developer.paypal.com/docs/faq/#general-developer-questions以获取“我可以检索使用REST API使用Classic API创build的事务的历史logging”的答案。

我也遇到这个问题。 奇怪的是,PayPal REST API似乎只返回通过REST API进行支付的结果。 看到这里: https : //stackoverflow.com/a/18139747

经典的API将继续这样做,直到REST API得到改进。