Reputation: 2475
I am trying to use the PayPal Sandbox for testing automated credit card processing, but running into an issue. Last week my tests were "successful" in the sense that when a validation error occurred the API would choke, but at least I knew something happened. After cleaning up my code that was being passed to the API, I no longer get validation errors, just internal service errors and this has been occurring for four days.
Here is what the log file shows (access token removed here, but it was generated from the API successfully prior to use):
2013-07-01 16:47:00,845 [32944] DEBUG PayPal.Manager.ConnectionManager [(null)] grant_type=client_credentials
2013-07-01 16:47:03,296 [32944] DEBUG PayPal.Manager.ConnectionManager [(null)] Service response
2013-07-01 16:47:03,296 [32944] DEBUG 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":"[access token that was generated]","token_type":"Bearer","app_id":"[app ID]","expires_in":28800}
2013-07-01 16:47:05,069 [32944] DEBUG PayPal.PayPalResource [(null)] Content-Type:application/json
2013-07-01 16:47:05,069 [32944] DEBUG PayPal.PayPalResource [(null)] Authorization:Bearer [access code]
2013-07-01 16:47:05,069 [32944] DEBUG PayPal.PayPalResource [(null)] User-Agent: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] DEBUG PayPal.PayPalResource [(null)] PayPal-Request-Id:303be909-4268-4909-b1cb-b51b6dc7ea54
2013-07-01 16:47:05,365 [32944] DEBUG 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] ERROR PayPal.Manager.ConnectionManager [(null)] Error Response: {"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)] Got InternalServerError status code from server
2013-07-01 16:47:35,708 [32944] 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, Boolean leaveOpen) at System.IO.StreamReader..ctor(Stream stream) at PayPal.HttpConnection.Execute(String payLoad, HttpWebRequest httpRequest) --- End of inner exception stack trace ---
Any suggestions on this? I'm not really sure where to go from here.
Upvotes: 0
Views: 2904
Reputation: 902
Just ran our unit test cases, confirmed that Payment with CC seems to work. Please try with an alternate test credit card number "4417119669820331" and confirm if that works. We have seen some intermittent issues when using the test credit card number "4111111111111111".
If it works modify your test credit card for automated test cases to this number to prevent future failures till a fix is available.
Upvotes: 9