CORB issue while redirecting to Paypal page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are using the server side integration with PayPal where in we make a call to our backend service to initiate the payment process. This service returns a 302 redirect which takes the end user to the Paypal screen.
Now our backend service calls is a protected service and hence we add a authorization header to the request. What we observe is that when the service returns a 302 redirect, the authorization header is added to the redirect request as well due to which the OPTIONS call to the paypal site fails with the error
Access to XMLHttpRequest at 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-123455677' (redirected from 'https://<our-service>/initiate') from origin 'null' has been blocked by CORS policy: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response.
I would think that this is a fairly common scenario. Can you please guide us on whats happening here.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Same issue here. Finding it with some pages on the site, and not others. Surprisingly, we never do anything to the header differently.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Our online donation forms won't connect to Paypal in PayPal Payments Standard
- Simple easy Checkout integration for me website. in PayPal Payments Standard
- How to add a second parameter onto the PayPal standard payment code block? in PayPal Payments Standard
- API approved order not forwarding to PayPal in Sandbox Environment
- Paypal NVP/SOAP API - Pay in 4 instalment payments in NVP/SOAP APIs