Reputation: 2670
I have integrated my android app with Paypal and i have tested it with paypal sandbox credentials. Ti test with other credentials , i have created another account and when i test this, i am getting error saying....
request failure with http statusCode:422,exception:org.apache.http.client.HttpResponseException: Unprocessable Entity
kindly give me valuable suggestions and help me
Upvotes: 1
Views: 2124
Reputation: 2206
The server response indicates the problem fairly clearly: PAYER_ACTION_REQUIRED / NO_VALID_FUNDING_INSTRUMENT / ADD_PAYMENT_CARD. Your code is working; the payment was refused on PayPal's end because the payer account is not able to pay. Fix your test payer account, or use another known-good payer account.
One additional caution: despite the messaging suggesting the solution is to add a card to the account, that may not be enough. PayPal has to live under a variety of international legal rules, and I think that India is one country in which PayPal and the government are not getting along very well:
http://www.zdnet.com/article/paypal-puts-india-on-hold/
... so that account with an address in Mumbai may be out of luck, and your test scenario would be considered a negative test case -- payment from Indian payer refused 'correctly' per PayPal policy & Indian law :(.
Upvotes: 1