Search code examples
javaspring-bootpayment-gatewaypaypal-sandbox

Paypal return url not working for sandbox account


I am trying to integrate paypal with spring boot application. I am using sandbox account for testing. I have successfully generated the order , order is generated and user is rediected to paypal to excute payment, when he clicks on cancel order , my localhost cancel order api is successfully called by paypal.

But when user(sandbox personal account) wants to continue the payment he is not able to do so. Payment is not being executed and he is redirected again to that continue payment page.

https://www.sandbox.paypal.com/webapps/hermes?flow=1-P&ulReturn=true&token=EC-7YJ233484C422661Y&hermes=1&fromLite=1#/checkout/selectFi

This url is called by paypal instead of return url which was set in the code.

This page is called again and again on clicking continue(I am randomly entering the cvv as it was not provided in the personal sandbox account.)

Please help !!


Solution

  • I believe there is currently a bug when paying with an Indian buyer account in the PayPal sandbox.

    Try paying with a buyer from a different country, for example a US Personal account created at https://www.paypal.com/signin?intent=developer&returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Faccounts%2F

    You may need to temporarily change your integration's currency from INR to something else, for example USD.

    This seems to only be a problem with the sandbox simulator for IN / INR transactions