Did not get response for Card Payment(CORS Policy Error)
Bratati14 opened this issue · 4 comments
Hello,
For 2 weeks I have been stuck on a request that does not work whenever i use Maestro Card and Credit Card for payment(using Sandbox) . Its shows some CORS policy error.
I have send request but did not get any response so i simple print the error and i got this error message which is given below.
Error message
Access to XMLHttpRequest at 'https://api.sandbox.mangopay.com/Redirect/ACSWithValidation?token=1533b02f097c48ef879a3ec3bc236bb7&mgpsecureid=1533b02f097c48ef879a3ec3bc236bb7' (redirected from 'https://admin-test.next-commerce.io/buy-out-page-card') from origin 'https://admin-test.next-commerce.io/' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
So I connect the MangoPay support team by mail to find help but they reply me to connect to the developer through Github and told me to post my concern here.
Looking forward to your return.
Thanks in advance.
Hello @Bratati14,
This issue is not with the PHP SDK right?
Hello @fredericdelordm
Can you please let me know whats the exact issues if you say its not with the PHP SDK?
Because In your Documentation for Test Card Details Some Card payments are working(means return back me some response) and some are not working. Whats the exact issues and why some test card are working and some are not.
In our side the below cards are used for payment through sandbox
- CB/VISA/MC
4970107111111119 (with response Payment Fail)
4970105181818183 (with response errorCode=02625) - Diners
30123456789001 (with response Success Message) - Maestro/BCMC
5033951000000004 (did not give any response)- CORS Policy Errror
In our side we allow our server to get response without any restriction.
Looking forward to your return.
Thanks in advance.
Could you explain me your process to create the request and process a payment? I would like to understand which request are made from the backend (and the PHP SDK) and which are made from the frontend
For Card payment first i registered the card and get card_registration_id,card_registration_url,PreregistrationData,AccessKey. Then send this details with card info to PayIn Create to make the payment.
For Diners(30123456789001 (with response Success Message)) and CB/VISA/MC(4970107111111119 (with response Payment Fail),4970105181818183 (with response errorCode=02625)) I get response but for Maestro i get CORS Policy Errror. I used same function for all type of card payment but others are working except Maestro.
Even I go through our sandbox login and see the Events. In event our card is registered and after that it failed.
Here is the picture form Our sandbox account event.