stripe-archive / react-stripe-elements

Moved to stripe/react-stripe-js.
https://github.com/stripe/react-stripe-js
MIT License
3.03k stars 319 forks source link

onClick on PaymentRequestButtonElement does not appear to work. #509

Closed peitalin closed 4 years ago

peitalin commented 4 years ago

onClick prop on PaymentRequestButtonElement does not appear to work. E.g: no console.log fires when clicking the PaymentRequest (purple) button

<PaymentRequestButtonElement
    paymentRequest={paymentRequest}
    onClick={() => {
      console.log("clicked apple pay button")
    }}
/>
fred-stripe commented 4 years ago

Hmm… just tried to replicate this on the latest version of this library and the onClick works as expected:

https://codesandbox.io/s/ecstatic-morning-vkvnz?fontsize=14&hidenavigation=1&theme=dark

Do you have any more details I can use to track down the issue?