Closed png-prakash closed 10 months ago
The click
handler is not something you'd attach to the paymentRequest
instance, here. Instead, it belongs to the Payment Request Button Element. In other words, you want to add an onClick
handler to your <PaymentRequestButtonElement />
as seen in this demo: https://codesandbox.io/s/react-stripe-official-q1loc?fontsize=14&hidenavigation=1&theme=dark&file=/src/components/demos/PaymentRequestForm.js:2189-2284
<PaymentRequestButtonElement
onReady={() => {
console.log("PaymentRequestButton [ready]");
}}
onClick={event => {
console.log("PaymentRequestButton [click]", event);
}}
/>
What happened?
Hi, I want to check if product option selected or not before payment request send when button onClick. But onClick function not working.
If they select variant automatically send request to Stripe? How can solve this issue? Thanks
Environment
No response
Reproduction
No response