Skip to content

Commit 41b58ad

Browse files
wesbosdweedon-stripe
authored andcommitted
fix minimal example (#20)
1 parent 8eb0af0 commit 41b58ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const MyCheckoutForm = () => {
3838
const elements = useElements();
3939

4040
const handleSubmit = async (event) => {
41-
ev.preventDefault();
41+
event.preventDefault();
4242
const {error, paymentMethod} = await stripe.createPaymentMethod({
4343
type: 'card',
4444
card: elements.getElement(CardElement),
@@ -48,7 +48,7 @@ const MyCheckoutForm = () => {
4848
return (
4949
<form onSubmit={handleSubmit}>
5050
<CardElement />
51-
<button>Pay</button>
51+
<button type="submit">Pay</button>
5252
</form>
5353
);
5454
};

0 commit comments

Comments
 (0)