简体   繁体   English

为什么PayPal通过API批量付款中的create()返回False?

[英]Why does create() in PayPal's batch payments via API return False?

https://developer.paypal.com/docs/api/payments.payouts-batch/#payouts_create https://developer.paypal.com/docs/api/payments.payouts-batch/#payouts_create

Sample code: https://github.com/paypal/PayPal-Python-SDK/blob/master/samples/payout/create.py 示例代码: https//github.com/paypal/PayPal-Python-SDK/blob/master/samples/payout/create.py

Why does create() return False? 为什么create()返回False? How do I get an explanation of why? 我如何得到原因的解释?

Update: I was able to get this info, but it's not helpful either: 更新:我能够获得此信息,但它也没有帮助:

ForbiddenAccess: Failed. Response status: 403. Response message: Forbidden. Error message: {"name":"AUTHORIZATION_ERROR","message":"Authorization error occurred","debug_id":"60e73559274d3","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#AUTHORIZATION_ERROR"}

PayPal tech/dev support told me the debug ID said I didn't have Mass Pay enabled on my account, so I had to call them and talk to general support. PayPal技术/开发支持告诉我调试ID说我没有在我的帐户上启用Mass Pay,所以我不得不打电话给他们并与一般支持人员交谈。 I did, and they said they cannot enable it on Canadian accounts. 我做了,他们说他们不能在加拿大账户上启用它。 I'm going to have to change payment processors to someone who offers the Mass Pay feature. 我将不得不将支付处理器更改为提供批量支付功能的人。 I need to send out 500 micro payments to 500 different people. 我需要向500个不同的人发送500微支付。

They told me to open a US PayPal account. 他们告诉我开设一个美国PayPal账户。 They asked if I had a US residence, and I do have a vacation home in the US. 他们问我是否有美国住所,而且我确实在美国度假。 Then they asked me if I had a social security number, and I don't. 然后他们问我是否有社会安全号码,而我没有。 So that option was not available. 所以这个选项不可用。

Update: I told PayPal technical support that it could not be enabled in Canada. 更新:我告诉PayPal技术支持,它无法在加拿大启用。 They told me that it works in Canada on the sandbox, so maybe it's coming soon. 他们告诉我它在加拿大的沙盒上工作,所以也许它即将推出。 However, they said there is a feature called Payouts that can work for me. 然而,他们说有一个名为Payouts的功能可以为我工作。 They went ahead and enabled it for me. 他们继续为我启用它。 So I'm going with that instead of mass pay. 所以我要用它来代替大规模报酬。

Moral of the story: PayPal technical support via email sorted it all out. 故事的道德:通过电子邮件将PayPal技术支持整理出来。 Their phone support is useless and stubborn. 他们的电话支持毫无用处,而且很顽固。

The error message pretty clearly says that an authorization error occurred. 错误消息非常清楚地表明发生了授权错误。 Without any further information the only thing I can assume is that you either did not include an OAuth bearer token in the request, or the token was invalid (although I believe an invalid or expired token will return HTTP 401, not 403). 在没有任何进一步信息的情况下,我唯一可以假设您在请求中未包含OAuth承载令牌,或者令牌无效(尽管我认为无效或过期的令牌将返回HTTP 401,而不是403)。

See Make your first call or How PayPal uses OAuth 2.0 for a high level overview 请参阅拨打电话PayPal如何使用OAuth 2.0进行高级概述

You might be able to get a more definitive answer if you post the request information that is failing. 如果您发布失败的请求信息,您可能会得到更明确的答案。

I had this as well on payouts, and found following fix on PayPal developer site 我在付款时也有这个,并在PayPal开发者网站上找到了以下修复程序

AUTHORIZATION_ERROR Your account is not authorized to use payouts. AUTHORIZATION_ERROR您的帐户无权使用付款。 Contact your account manager or our customer service team for assistance. 请联系您的客户经理或我们的客户服务团队寻求帮助。 Your account is not authorized to use payouts. 您的帐户无权使用付款。 For assistance, contact your account manager or our customer service team. 如需帮助,请联系您的客户经理或我们的客户服务团队。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM