大佬教程收集整理的这篇文章主要介绍了node.js – 如何使用节点检索PayPal REST Api访问令牌,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
var request = require('request'); request.post({ uri: "https://api.sandBox.paypal.com/v1/oauth2/token",headers: { "Accept": "application/json","Accept-Language": "en_US","content-type": "application/x-www-form-urlencoded" },auth: { 'user': '---your cliend ID---','pass': '---your client secret---',// 'sendImmediately': false },form: { "grant_type": "client_credentials" } },function(error,response,body) { console.log(body); });
如果成功,响应将如下所示:
{ "scope":"https://api.paypal.com/v1/payments/.* ---and more URL callable with the access-token---","access_token":"---your access-token---","token_type":"Bearer","app_id":"APP-1234567890","expires_in":28800 }
以上是大佬教程为你收集整理的node.js – 如何使用节点检索PayPal REST Api访问令牌全部内容,希望文章能够帮你解决node.js – 如何使用节点检索PayPal REST Api访问令牌所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。