2

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
  • 47
  • 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
  • 30,447
  • 6
  • 48
  • 86
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
  • 809
  • 8
  • 15