问题
I am trying to use the PayPal Sandbox for testing automated credit card processing, but running into an issue. When I charge in the amount of $105 I get an INTERNAL_SERVICE_ERROR
with a debug id of de753957a889d
. If I go back and change the amount to something else like $115 for instance, the charge goes through as expected. I have tried several different amounts and $105 seems to be the only one that give me an error.
Here are the lines from the log file:
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 ---
回答1:
Do you have 'Negative testing' enabled on your sandbox account(s) by any chance?
https://developer.paypal.com / > Applications > Sandbox accounts > Find your account > Click 'Profile' > Settings.
Negative testing lets you test specific error conditions for our classic API's by triggering a specific error code by passing them as 'AMT' value.
For example, for API error code 12345, you would set AMT=123.45
.
For your error scenario I see us returning API error code 10500 internally. Which makes me strongly suspect you've got 'Negative testing' turned on for one of your sandbox accounts.
回答2:
If you are using same card details many times than you may get this issue. Please use different card you will not get this type of issue.
来源:https://stackoverflow.com/questions/18471503/paypal-sandbox-returning-internal-service-error