You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been testing the REST API for VAULT and I was experiencing some coding issues while using payment API using the vault as the fundInstrument, when using the sample code on: https://github.com/paypal/rest-api-sdk-dotnet/blob/master/Samples/RestApiSample/PaymentWithSavedCard.aspx.cs.
All the response error codes I was getting was the standard 400,404 etc. as is expected from the sample code
I then changed the exception response within the sample code on my test site to the following:
if(ex.InnerException is PayPal.Exception.ConnectionException){
Textbox1.Text =(((PayPal.Exception.ConnectionException)ex.InnerException).Response);}else{
TextBox1.Text =(ex.Message);}
Exception in HttpConnection Execute: Invalid HTTP response
The remote server returned an error: (400) Bad Request
Since the change: {"name":"INVALID_RESOURCE_ID","message":"The requested resource ID was not found","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#INVALID_RESOURCE_ID","debug_id":"5a652da4b066c"}
The error for this was because I 2 digit year not a 4 digit.
The text was updated successfully, but these errors were encountered:
The PayPal Core SDK for .NET has recently had its error reporting improved to make it easier for developers to get at this information in the thrown exceptions. Feel free to reopen this issue if you feel there can still be further improvements to how the HTTP error codes and responses are being reported.
I have been testing the REST API for VAULT and I was experiencing some coding issues while using payment API using the vault as the fundInstrument, when using the sample code on: https://github.com/paypal/rest-api-sdk-dotnet/blob/master/Samples/RestApiSample/PaymentWithSavedCard.aspx.cs.
All the response error codes I was getting was the standard 400,404 etc. as is expected from the sample code
I then changed the exception response within the sample code on my test site to the following:
I found it on http://stackoverflow.com/questions/15581314/paypal-rest-api-net-sdk-400-bad-requests, I feel this is valuable for Vault responses it was to me as I fixed my issue in seconds. If you agree can we get the sample code to include it?
Before my change in the exception response:
The error for this was because I 2 digit year not a 4 digit.
The text was updated successfully, but these errors were encountered: