我正在尝试使用nodejs和paypal-rest-sdk来获取我的帐户的帐户历史记录但是因为对以下代码的响应只是一个空对象 {" count":0," httpStatusCode":200}
/* Copyright 2015-2016 PayPal, Inc. */
"use strict";
var paypal = require('paypal-rest-sdk');
paypal.configure({
'mode': 'live', //sandbox or live
'client_id': 'my id',
'client_secret': 'my secret'
});
var listPayment = {
'count': '1',
'start_index': '1'
};
paypal.payment.list(listPayment, function (error, payment) {
if (error) {
throw error;
} else {
console.log("List Payments Response");
console.log(JSON.stringify(payment));
}
});
这是正确的方式还是我做错了什么?