【发布时间】:2016-09-06 14:38:57
【问题描述】:
我已成功获取一次性信用卡令牌,我需要将此令牌发送到我的服务器以完成计费流程。我可能想使用 Angular 的内置 $http 模块或第三方 REST API 库(例如 RestAngular)将信用卡令牌发送到我的服务器。
我像这样使用 $http 模块:
$http({
url: 'https://api.sandbox.paypal.com/v1/payments/payment',
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + $localStorage.accessTokenPayPal,
},
}).success(function (data, status, headers, config) {
//console.log(data);
alert("valide: "+ JSON.stringify(data));
}).error(function (error) {
//console.log(data);
alert("error:"+JSON.stringify(error));
});
但我总是发现这条消息:
{"count":0}
请问这是什么问题??
【问题讨论】:
标签: angularjs curl paypal oauth-2.0