【问题标题】:PayPal Sandbox returning Internal Service Error贝宝沙盒返回内部服务错误
【发布时间】:2013-08-30 13:24:33
【问题描述】:

我正在尝试使用 PayPal 沙盒测试自动信用卡处理,但遇到了问题。当我收取 105 美元 的费用时,我会得到一个 INTERNAL_SERVICE_ERROR,其调试 ID 为 de753957a889d。例如,如果我返回并将金额更改为 $115 之类的其他金额,则费用会按预期进行。我尝试了几种不同的金额,而 $105 似乎是唯一给我错误的金额。

以下是日志文件中的行:

2013-08-27 12:45:36,570 [10] DEBUG PayPal.Manager.ConnectionManager [(null)] grant_type=client_credentials

2013-08-27 12:45:37,376 [10] DEBUG PayPal.Manager.ConnectionManager [(null)] Service response

2013-08-27 12:45:37,376 [10] DEBUG PayPal.Manager.ConnectionManager [(null)] {"scope":"htts://api.paypal.com/v1/payments/.* htts://api.paypal.com/v1/vault/credit-card htts://api.paypal.com/v1/vault/credit-card/.* openid","access_token":"BJ7.168BhK3u0EgZ.MQgUABpdnTropRiXdCQ7ALrBHg","token_type":"Bearer","app_id":"APP-80W284485P519543T","expires_in":28800}

2013-08-27 12:45:37,698 [10] DEBUG PayPal.PayPalResource [(null)] Content-Type:application/json

2013-08-27 12:45:37,698 [10] DEBUG PayPal.PayPalResource [(null)] Authorization:Bearer BJ7.168BhK3u0EgZ.MQgUABpdnTropRiXdCQ7ALrBHg

2013-08-27 12:45:37,698 [10] DEBUG PayPal.PayPalResource [(null)] User-Agent:PayPalSDK/rest-sdk-dotnet 0.7.3 ;lang=DOTNET;v=4.0.30319.1008;bit=64;os=Windows 7 6.1.7601.65536;

2013-08-27 12:45:37,698 [10] DEBUG PayPal.PayPalResource [(null)] PayPal-Request-Id:14504bda-98c3-4b14-90fd-083663e80bfd

2013-08-27 12:45:37,789 [10] DEBUG PayPal.Manager.ConnectionManager [(null)] {"intent":"sale","payer":{"payment_method":"credit_card","funding_instruments":[{"credit_card":{"number":"4417119669820331","type":"visa","expire_month":3,"expire_year":2015,"cvv2":"123","first_name":"David","last_name":"Krejci","billing_address":{"line1":"300 Technology Square","city":"Cambridge","country_code":"US","postal_code":"02139","state":"MA"}}}]},"transactions":[{"amount":{"currency":"USD","total":"105","details":{"shipping":"0","subtotal":"105","tax":"0"}},"description":"B4M Reg"}]}

2013-08-27 12:45:42,975 [10] ERROR PayPal.Manager.ConnectionManager [(null)] Error Response: {"name":"INTERNAL_SERVICE_ERROR","message":"An internal service error has occurred","information_link":"htts://developer.paypal.com/webapps/developer/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"de753957a889d"}

2013-08-27 12:45:42,976 [10] INFO  PayPal.Manager.ConnectionManager [(null)] Got InternalServerError status code from server

2013-08-27 12:45:43,035 [10] ERROR PayPal.Exception.PayPalException [(null)] Exception in HttpConnection Execute: Stream was not readable.
PayPal.Exception.PayPalException: Exception in HttpConnection Execute: Stream was not readable. ---> System.ArgumentException: Stream was not readable.
   at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
   at System.IO.StreamReader..ctor(Stream stream)
   at PayPal.HttpConnection.Execute(String payLoad, HttpWebRequest httpRequest)
   --- End of inner exception stack trace ---

【问题讨论】:

    标签: paypal paypal-sandbox


    【解决方案1】:

    您是否有任何机会在您的沙盒帐户上启用了“负面测试”?
    https://developer.paypal.com / > 应用程序 > 沙盒帐户 > 查找您的帐户 > 点击“个人资料”> 设置。

    负测试允许您通过将特定错误代码作为“AMT”值传递来测试我们经典 API 的特定错误条件。
    例如,对于 API 错误代码 12345,您可以设置 AMT=123.45
    对于您的错误情况,我看到我们在内部返回 API 错误代码 10500。这让我强烈怀疑您为您的一个沙盒帐户打开了“负面测试”。

    【讨论】:

    • 就是这样!谢谢你。这在任何地方都有记录吗?我很想知道更多关于它是如何工作的。
    • 更具体地说,此功能是否记录在任何地方。要知道将来我可以测试哪些错误代码。
    • 我们的经典 API (developer.paypal.com/webapps/developer/docs/classic/lifecycle/…) 有一些文档,但遗憾的是,此功能尚未完全适用于 REST API。
    • @PayPal_Robert FWIW 我遇到了类似的问题,但是(a)负面测试已关闭; (b) 有时代码有效,有时无效……这让我想知道“沙盒”是否有其自身的问题。负面测试仅适用于商业(又名)促进者帐户。
    【解决方案2】:

    如果您多次使用相同的卡详细信息,则可能会遇到此问题。 请使用其他卡,您不会遇到此类问题。

    【讨论】:

      猜你喜欢
      • 2013-06-29
      • 2017-11-28
      • 1970-01-01
      • 2012-10-13
      • 2023-04-10
      • 2015-07-17
      • 2016-04-17
      • 2017-01-08
      • 2014-04-06
      相关资源
      最近更新 更多