react-stripe-modal
How to use
Make sure to include the stripe api
Sample Usage
;;; Component { superprops; thisonSubmit = thisonSubmit; thisopenStripeModal = thisopenStripeModal; thiscloseStripeModal = thiscloseStripeModal; thisstate = open: false errorMessage: null } // Open the stripe modal { this; } // Close the stripe modal { this; } // Handle the submission of the stripe form { console; // Perform validation and any checks this; } { return <div> <h2>Card Details</h2> <input type="button" onClick=thisopenStripeModal value="Update Card Details" /> <ReactStripeModal open=thisstateopen stripePublicKey="your-api-key" headerBackgroundColor="#098dd5" headerColor="#fff" buttonStyle= backgroundColor: "#098dd5" borderColor: "#098dd5" customerEmail="demo@website.com" customerName="Matt" onSubmit=thisonSubmit buttonLabel="Upgrade Account" onCancel=thiscloseStripeModal errorMessage=thisstateerrorMessage /> </div> } ;