Paypal:使用REST API/Nodejs SDK进行交易的历史记录 [英] Paypal: Transaction History with REST API / Nodejs SDK

查看:248
本文介绍了Paypal:使用REST API/Nodejs SDK进行交易的历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm using the recommended node.js module https://github.com/paypal/rest-api-sdk-nodejs and I'm trying to use this code to get the transactions:

    // 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年开始就有交易.

but payment_history gives me { count: 0 }. I'm pretty sure that I have transactions since 2008.

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

I'm not really sure what's the problem. The user is already logged in using the access_token and I can display user informations but I have no idea how to pull transaction informations.

推荐答案

查看 https://developer.paypal.com/docs/faq/#general-developer-questions ,以获取我可以使用REST API检索使用Classic API创建的交易历史吗?"的答案.

Look into https://developer.paypal.com/docs/faq/#general-developer-questions for the answer to "Can I retrieve the history of transactions created using the Classic APIs using the REST API?".

这篇关于Paypal:使用REST API/Nodejs SDK进行交易的历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆