-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcheckout.js
30 lines (28 loc) · 852 Bytes
/
checkout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import "../styles/CheckoutForm.css";
import { loadStripe } from "@stripe/stripe-js";
import { Elements } from "@stripe/react-stripe-js";
import CheckoutForm from "../components/CheckoutForm";
import OrderSummary from "../components/OrderSummary";
import { Col, Row } from "antd";
const CheckoutPage = () => {
const stripePromise = loadStripe("your_public_stripe_key");
return (
<Row>
<Col offset={6} span={12} className="stripe-form-container">
<div className="stripe-form">
<Row gutter={12}>
<Col span={14}>
<Elements stripe={stripePromise}>
<CheckoutForm />
</Elements>
</Col>
<Col span={10}>
<OrderSummary />
</Col>
</Row>
</div>
</Col>
</Row>
);
};
export default CheckoutPage;