贝宝400错误的请求,更具体的? [英] PayPal 400 Bad Request, more specific?

查看:878
本文介绍了贝宝400错误的请求,更具体的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么办法让一个更具体的PayPal误差超过400错误的请求?我看到有人在做这样的事情:

 如果(ex.InnerException是ConnectionException)
{
    的Response.Write(((ConnectionException)ex.InnerException).Response);
}
其他
{
    的Response.Write(ex.Message);
}

但是,这似乎并没有为我做什么不同,所有的错误说的是:
远程服务器返回错误:(400)错误的请求

我读过,它可能是与某种验证错误的,但我试图改变我送到PayPal的数据,但都没有运气这么远。<​​/ P>

我希望你能帮助我,谢谢!

编辑:

由于艾登我设法找到通过的提琴手此错误消息在HTTP请求之一:

<$p$p><$c$c>{\"name\":\"VALIDATION_ERROR\",\"details\":[{\"field\":\"payer.funding_instruments[0].credit_card.number\",\"issue\":\"Value无效}],消息:无效的请求 - 请参阅details\",\"information_link\":\"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR\",\"debug_id\":\"dd5f11f6e9c98\"}


解决方案

您可以通过安装提琴手,这样做你可以看到你发送的确切HTTP Web请求,而收到的答复甚至开始您的应用程序进行处理之前。

下面是我的浏览到一个例子, example.com 。你可以看到从我的浏览器右侧上半部分发送的请求,并在底部的右半边,包括所有的头,一切都响应...使用异常管理单独将推动你疯了试图调试HTTP流量。


直接链接

Is there any way to get a more specific PayPal error than 400 bad request? I saw someone doing something like this:

if (ex.InnerException is ConnectionException)
{
    Response.Write(((ConnectionException) ex.InnerException).Response);
}
else
{
    Response.Write(ex.Message);
}

But that doesn't seem to do anything different for me, all the error says is: "The remote server returned an error: (400) Bad Request."

I've read that it could have something to do with some sort of validation error, but I've tried changing the data I'm sending to PayPal, but all with no luck so far.

I hope you can help me, thank you!

EDIT:

Thanks to Aydin I managed to find this error-message in one of the HTTP requests through Fiddler:

{"name":"VALIDATION_ERROR","details":[{"field":"payer.funding_instruments[0].credit_card.number","issue":"Value is invalid"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"dd5f11f6e9c98"}

解决方案

You can save yourself time by installing Fiddler, by doing so you can see the exact HTTP Web Requests that you send, and the responses that you receive before it even begins to be processed by your application.

Here's an example of me browsing to, example.com. You can see the requests sent from my browser on the right top half, and the response in the bottom right half including all the headers and everything... Attempting to debug HTTP traffic using exception management alone will drive you insane.

Direct Link

这篇关于贝宝400错误的请求,更具体的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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