贝宝权限API [英] PayPal Permissions API

查看:111
本文介绍了贝宝权限API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置权限,以便当客户想要使用我的PayPal集成服务时,我会引导他们完成授予我的软件权限以代表他们进行快速结帐付款的过程.

I am trying to set up permissions so that when clients want to use my PayPal integration service, I take them through the process of giving my software permission to make express checkout payments on their behalf.

到目前为止,我已经按照以下步骤操作(我使用的是.Net的PayPal权限SDK):

So far, I have followed these steps (I am using the PayPal permissions SDK for .Net):

  1. 使用requestPermissions将"EXPRESS_CHECKOUT"权限添加到 返回访问令牌.
  2. 使用getAccessToken(传递令牌和验证码)获取令牌机密
  3. 然后我存储令牌和令牌密钥以供将来付款.
  4. 我尝试使用ProfileFactory.createPermissionAPIProfile()在沙盒环境中测试付款,并使用"com.paypal.sdk.core.OauthSignature.getAuthHeader"生成签名.我不能完全确定的一件事是作为API URL传递的内容,我传递的是"https://api.sandbox.paypal.com/2.0/"
  1. Use requestPermissions to add the "EXPRESS_CHECKOUT" permission to return the access token.
  2. Use getAccessToken (passing the token and verification code) to obtain the token secret
  3. I then store the token and token secret for future payments.
  4. I attempt to test a payment using the sandbox environment using the ProfileFactory.createPermissionAPIProfile() and generating the signature using "com.paypal.sdk.core.OauthSignature.getAuthHeader". One thing I am not completely sure of here is what is passed as the API URL, I am passing "https://api.sandbox.paypal.com/2.0/"

现在,当我执行此操作并调用"SetExpressCheckout"时,我收到一条错误消息,提示我没有权限.

Now, when I do this and call "SetExpressCheckout", I get an error message saying I don't have permission.

所以,我想调试它以测试我拥有什么权限,所以我调用传递令牌的GetPermissions,但响应对象为null?这真的很奇怪,如果出现问题,我会期望出现错误,我看不到任何返回空值的原因吗?

So, I wanted to debug this to test what permissions I have, so I call GetPermissions passing the token but the response object is null? This is really odd, I would expect an error if there was a problem, I cannot see any reason why a null value is returned?

任何人都可以帮助我指出正确的方向吗? 预先感谢.

Anyone can help point me in the right direction? Thanks in advance.

推荐答案

我们使用NVP API并代表第三方进行API调用,您必须在API请求的主题中发送第三者的PayPal ID . SOAP API具有相同的元素.

We use the NVP API and to carry out API calls on behalf of a third party, you must send the 3rd party's PayPal ID in the Subject of the API request. The SOAP API has the same element.

尽管我们发送了PayPal ID,但API文档说这是authorizing_account_email地址.

The API doc says this is the authorizing_account_emailaddress, though we send the PayPal ID and that works.

这篇关于贝宝权限API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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