简体   繁体   English

PayPal-PHP-SDK代码错误

[英]PayPal-PHP-SDK code errors

I am using Paypal-PHP. 我正在使用Paypal-PHP。 SDK, a I want to get code errors. SDK,我想获取代码错误。 When I put wrong credit card data, I am getting this JSON as answer: 当我输入错误的信用卡数据时,我得到此JSON作为答案:

{
"name":"CREDIT_CARD_REFUSED",
"message":"Credit card was refused",
    "information_link":"https://developer.paypal.com/webapps/developer/docs/api    /#CREDIT_CARD_REFUSED",
"debug_id":"63a9cf220d272"
}

or this: 或这个:

{"name":"VALIDATION_ERROR",
       "details":[
            {"field":"payer.funding_instruments[0].credit_card.expire_month","issue":"Must not be blank"},
            {"field":"payer.funding_instruments[0].credit_card.expire_year","issue":"Must not be blank"},
            {"field":"payer.funding_instruments[0].credit_card.cvv2","issue":"Must be numeric"}],
       "message":"Invalid request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"8e61a15a1bf4a"}

But I need error code. 但是我需要错误代码。 How Can I get it? 我怎么才能得到它?

Thanks 谢谢

REST API usually do not return error codes like classic API. REST API通常不返回经典API之类的错误代码。 There are no error codes associated with the error message. 没有与错误消息关联的错误代码。

It just returns the error object with name debug_id message information_link details 它只是返回一个错误对象name debug_id message information_link details

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

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