1

In stripe payment gateway ,, This is shows as a error Access to XMLHttpRequest at 'https://js.stripe.com/v2/' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

sachin sharma
  • 37
  • 1
  • 3

2 Answers2

2

This is a URL to a library. If you get a CORS error, that means you tried to load it via XMLHttpRequest or fetch, and the Stripe server is not designed to serve this library via a cross-origin request. Rather add this in your HTML <script src="https://js.stripe.com/v2/"></script>

Guerric P
  • 28,450
  • 6
  • 38
  • 76
0

This seems to be a Javascript Library, please use this in your code to integrate Stripe Payment Gateway from your HTML File.

<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
Ayyub Kolsawala
  • 739
  • 7
  • 12