Stripe error : unable to perform color detection

前端 未结 3 2270
盖世英雄少女心
盖世英雄少女心 2021-02-18 22:00

im currently attempting to integrate Stripe into a little website.

I can see within Firebug, that this get request runs correctly

https://checkout.stripe         


        
相关标签:
3条回答
  • 2021-02-18 22:29

    This can happen if the image URL is not publicly accessible, as Stripe has to be able to request the image from their servers. This can happen if you are running a local copy of the application which isn't accessible from the outside world, or if it is behind a VPN or authentication.

    0 讨论(0)
  • 2021-02-18 22:29

    So I changed the handler to include another paramter of color and it appears to have resolved the issue.

      var handler = StripeCheckout.configure({
        key: '******************',
        image: '/assets/images/layout-images/stripe-logo.jpg',
        color: 'black',
        token: function(token) {
          // Use the token to create the charge with a server-side script.
          // You can access the token ID with `token.id`
        }
      });
    

    weird as im not quite sure why it wasnt included in the docs.

    0 讨论(0)
  • 2021-02-18 22:33

    I got the same error and setting color didn't work for me. I changed the path of the image to the one given in Stripe documentation:

    Changed

    https://stripe.com/template/img/documentation/checkout/marketplace.png
    

    to

    https://stripe.com/img/documentation/checkout/marketplace.png
    
    0 讨论(0)
提交回复
热议问题