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.
            Asked
            
        
        
            Active
            
        
            Viewed 5,563 times
        
    2 Answers
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
- 
                    This doesn't work either for my case. – tpbafk Apr 14 '21 at 10:37
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
