我想显示用户进行/接收的所有入站/出站交易,以将其显示在一个简单的 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/