bennypowers / stripe-elements

Custom Element Wrapper for Stripe.js v3 Elements
https://stripe-elements.netlify.app/
79 stars 20 forks source link

`<stripe-payment-request>` not displaying anything? #105

Closed baptisteArno closed 1 year ago

baptisteArno commented 1 year ago

Hi,

When rendering:

<stripe-payment-request
        publishable-key={props.options.publicKey}
        generate="token"
        amount="326"
        label="Double Double"
        country="CA"
        currency="cad"
      >
        <stripe-display-item data-amount="125" data-label="Double Double" />
        <stripe-display-item data-amount="199" data-label="Box of 10 Timbits" />
      </stripe-payment-request>

It doesn't show anything. And there are no errors in console.

I'm not sure what stripe-payment-request is supposed to display, though! I wanted to try it out.

bennypowers commented 1 year ago

does the browser support payment request? check the readonly canMakePayment property or listen for unsupported event.

baptisteArno commented 1 year ago

Oh so <stripe-payment-request> is for https://stripe.com/docs/stripe-js/elements/payment-request-button?

Maybe it doesn't display because I'm testing on http://localhost

bennypowers commented 1 year ago

that's correct. you have to test it on https