From 7b96e90ea8edc3f42a2ce0c6dda1a0b2ad2cc36e Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Sat, 7 May 2022 14:02:02 -0700 Subject: [PATCH] doc: add CardElement, useElements, useStripe from react-stripe-js and handleChange and handleSubmit method --- src/Checkout/Payment/Payment.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Checkout/Payment/Payment.js b/src/Checkout/Payment/Payment.js index 919ac10..6540e93 100644 --- a/src/Checkout/Payment/Payment.js +++ b/src/Checkout/Payment/Payment.js @@ -3,9 +3,16 @@ import { useStateValue } from "../../redux/StateProvider"; import { Link } from "react-router-dom"; import CheckoutProduct from "../CheckoutProduct"; import "./Payment.css"; +import { CardElement, useElements, useStripe } from "@stripe/react-stripe-js"; function Payment() { const [{ basket, user }, dispatch] = useStateValue(); + const stripe = useStripe(); + const elements = useElements(); + + const handleSubmit = (e) => {}; + const handleChange = (e) => {}; + return (
@@ -42,7 +49,11 @@ function Payment() {

Payment Method

-
+
+
+ + +