0

我正在尝试使用 PayPal Sandbox 来测试自动信用卡处理,但遇到了问题。上周我的测试是“成功的”,因为当发生验证错误时,API 会阻塞,但至少我知道发生了一些事情。在清理了传递给 API 的代码后,我不再收到验证错误,只是内部服务错误,这种情况已经发生了四天。

这是日志文件显示的内容(此处删除了访问令牌,但它是在使用之前从 API 成功生成的):

2013-07-01 16:47:00,845 [32944] 调试 PayPal.Manager.ConnectionManager [(null)] grant_type=client_credentials

2013-07-01 16:47:03,296 [32944] 调试 PayPal.Manager.ConnectionManager [(null)] 服务响应

2013-07-01 16:47:03,296 [32944] 调试 PayPal.Manager.ConnectionManager [(null)] {"scope":" https://api.paypal.com/v1/payments/ .* https:// api.paypal.com/v1/vault/credit-card https://api.paypal.com/v1/vault/credit-card/ .* openid","access_token":"[生成的访问令牌]", "token_type":"Bearer","app_id":"[app ID]","expires_in":28800}

2013-07-01 16:47:05,069 [32944] 调试 PayPal.PayPalResource [(null)] Content-Type:application/json

2013-07-01 16:47:05,069 [32944] 调试 PayPal.PayPalResource [(null)] 授权:Bearer [访问代码]

2013-07-01 16:47:05,069 [32944] 调试 PayPal.PayPalResource [(null)] 用户代理:PayPalSDK/rest-sdk-dotnet 0.7.1 ;lang=DOTNET;v=4.0.30319.18046;bit=64 ;os=Windows 8 6.2.9200.0;

2013-07-01 16:47:05,069 [32944] 调试 PayPal.PayPalResource [(null)] PayPal-Request-Id:303be909-4268-4909-b1cb-b51b6dc7ea54

2013-07-01 16:47:05,365 [32944] 调试 PayPal.Manager.ConnectionManager [(null)] {"intent":"sale","payer":{"payment_method":"credit_card","funding_instruments": [{"credit_card":{"number":"4111111111111111","type":"visa","expire_month":4,"expire_year":2017,"cvv2":"123","first_name":"First" ,"last_name":"Last","billing_address":{"line1":"123 Any St.","city":"City","country_code":"US","postal_code":"12345"," state":"OH"}}}]},"transactions":[{"amount":{"currency":"USD","total":"4.93","details":{"shipping":"3.55","subtotal":"1.30","tax":"0.08"}},"description":"Description"}]}

2013-07-01 16:47:35,657 [32944] 错误 PayPal.Manager.ConnectionManager [(null)] 错误响应:{"name":"INTERNAL_SERVICE_ERROR","information_link":" https://api.sandbox.paypal .com/docs/api/#INTERNAL_SERVICE_ERROR ","debug_id":"ce04de98d51f2"}

2013-07-01 16:47:35,657 [32944] INFO PayPal.Manager.ConnectionManager [(null)] 从服务器获取 InternalServerError 状态代码

2013-07-01 16:47:35,708 [32944] 错误 PayPal.Exception.PayPalException [(null)] HttpConnection 执行中的异常:流不可读。PayPal.Exception.PayPalException:HttpConnection Execute 中的异常:流不可读。---> System.ArgumentException:流不可读。在 System.IO.StreamReader..ctor(流流,编码编码,布尔检测编码FromByteOrderMarks,Int32 bufferSize,布尔leaveOpen)在 System.IO.StreamReader..ctor(流流)在 PayPal.HttpConnection.Execute(字符串 payLoad,HttpWebRequest httpRequest ) --- 内部异常堆栈跟踪结束 ---

对此有何建议?我真的不知道从这里去哪里。

4

1 回答 1

9

刚刚运行了我们的单元测试用例,确认使用 CC 付款似乎有效。请尝试使用备用测试信用卡号“4417119669820331”并确认是否有效。我们在使用测试信用卡号“4111111111111111”时发现了一些间歇性问题。

如果它有效,请将您的自动测试用例的测试信用卡修改为此数字,以防止将来出现故障,直到有可用的修复程序。

于 2013-07-02T03:42:16.303 回答