使用Rest API捕获付款时Paypal内部服务器错误 [英] Paypal Internal Server Error when capturing payment with rest api

查看:123
本文介绍了使用Rest API捕获付款时Paypal内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在基于C#的项目中遇到了这个问题,但是我也可以使用curl来重现它.该代码几天前就可以使用了,但是现在不行了,我敢肯定我没有更改它.

I have this issue in a C#-based project, but I can reproduce it with curl as well. The code was working a few days ago but now it isn't and I'm pretty sure I haven't changed it.

我的付款已经被授权,并且具有正确的ID(当我使用其在线工具关闭交易时,我会收到AUTHORIZATION_ALREADY_COMPLETED而不是Server 500错误).

I have a payment that has been authorized and I have its ID, which is correct (when I close the transaction with their online tool I get AUTHORIZATION_ALREADY_COMPLETED instead of Server 500 error).

这是我用curl进行修复的方式,删除了敏感信息:

Here's what I do with curl to repro it, sensitive info redacted:

    // check if the AUTHIDHERE code is correct:
curl -v -X GET https://api.paypal.com/v1/payments/authorization/AUTHIDHERE -H "Content-Type:application/json" -H "Authorization:Bearer BEARER123" 

上述调用有效并返回: { "id":"AUTHIDHERE", "create_time":"2013-07-17T21:17:58Z", "update_time":"2013-07-17T21:18:00Z", "state":授权", 数量": { 总计":"1.35", 货币:美元", 细节": { 小计":"1.35" } }, "parent_payment":"PAY-SOMELONGIDHERE", "valid_until":"2013-08-15T21:17:58Z", 链接":...整堆都在这里]} }

the above call works and returns: { "id": "AUTHIDHERE", "create_time": "2013-07-17T21:17:58Z", "update_time": "2013-07-17T21:18:00Z", "state": "authorized", "amount": { "total": "1.35", "currency": "USD", "details": { "subtotal": "1.35" } }, "parent_payment": "PAY-SOMELONGIDHERE", "valid_until": "2013-08-15T21:17:58Z", "links": ...whole bunch here]} }

然后我叫捕捉

curl -v https://api.paypal.com/v1/payments/authorization/AUTHIDHERE/capture \
-H "Content-Type:application/json" -H "Authorization:Bearer BEARER123" \
-d '{"amount":{"currency":"USD","total":"1.32"},"is_final_capture":true}

我得到的是HTTP 500状态:

and I get this with HTTP 500 status:

{
    "name": "INTERNAL_SERVICE_ERROR",
    "message": "An internal service error has occurred",
    "information_link": "https://developer.paypal.com/webapps/developer/docs/api/#INTERNAL_SERVICE_ERROR",
    "debug_id": "7edadeba20509"
}

其他一些debug_id值为:062fc6964d9a8,6eebc751504eb

Some other debug_id values are: 062fc6964d9a8, 6eebc751504eb

推荐答案

快速更新:有趣的是,它们都在底层的获取方调用中全部失败-试图找出问题所在.

quick update: interestingly they all failed in the underlying acquirer call - trying to figure out what went wrong.

所有这些debug_id是否都与同一个authorization_id相关联?

Are these all debug_ids associated with the same authorization_id ?

这篇关于使用Rest API捕获付款时Paypal内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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