Skip to content

Commit 08c1eaf

Browse files
committed
Update the demo
2 parents fcb7a0f + 2b2f2c3 commit 08c1eaf

File tree

4 files changed

+33
-29
lines changed

4 files changed

+33
-29
lines changed

.env-example

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
NEXT_PUBLIC_WORDPRESS_URL=https://example.com
22

3-
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxxx
4-
STRIPE_SECRET_KEY=sk_test_xxxx
3+
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxx
4+
STRIPE_SECRET_KEY=sk_test_xxx
55

66
STRIPE_WEBHOOK_ENDPOINT_SECRET=whsec_xxxx
77

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ branch is upto date with those changes. You can also refer to the PR notes for c
3131
## Order Received Demo
3232
![](demos/order-received-demo.gif)
3333

34+
## Stripe Checkout
35+
![](demos/stripe-demo.gif)
36+
3437
# Features:
3538

3639
1. WooCommerce Store in React( contains: Products Page, Single Product Page, AddToCart, CartPage and Checkout Page with country selection ).
@@ -42,6 +45,7 @@ branch is upto date with those changes. You can also refer to the PR notes for c
4245
8. Incremental Static (Re)generation ( Next.js 10 support )
4346
9. GraphQL with Apollo Client
4447
10. Tailwindcss
48+
11. Stripe Checkout ( with Stripe Session and Stripe webhook)
4549

4650
## Getting Started :rocket:
4751

demos/stripe-demo.gif

8.72 MB
Loading

src/components/checkout/CheckoutForm.js

+27-27
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,36 @@ import CheckboxField from "./form-elements/CheckboxField";
2020
import CLEAR_CART_MUTATION from "../../mutations/clear-cart";
2121

2222
// Use this for testing purposes, so you dont have to fill the checkout form over an over again.
23-
const defaultCustomerInfo = {
24-
firstName: 'Imran',
25-
lastName: 'Sayed',
26-
address1: '123 Abc farm',
27-
address2: 'Hill Road',
28-
city: 'Mumbai',
29-
country: 'IN',
30-
state: 'Maharastra',
31-
postcode: '221029',
32-
email: 'codeytek.academy@gmail.com',
33-
phone: '9883778278',
34-
company: 'The Company',
35-
errors: null
36-
}
37-
3823
// const defaultCustomerInfo = {
39-
// firstName: '',
40-
// lastName: '',
41-
// address1: '',
42-
// address2: '',
43-
// city: '',
44-
// country: '',
45-
// state: '',
46-
// postcode: '',
47-
// email: '',
48-
// phone: '',
49-
// company: '',
50-
// errors: null
24+
// firstName: 'Imran',
25+
// lastName: 'Sayed',
26+
// address1: '123 Abc farm',
27+
// address2: 'Hill Road',
28+
// city: 'Mumbai',
29+
// country: 'IN',
30+
// state: 'Maharastra',
31+
// postcode: '221029',
32+
// email: 'codeytek.academy@gmail.com',
33+
// phone: '9883778278',
34+
// company: 'The Company',
35+
// errors: null
5136
// }
5237

38+
const defaultCustomerInfo = {
39+
firstName: '',
40+
lastName: '',
41+
address1: '',
42+
address2: '',
43+
city: '',
44+
country: '',
45+
state: '',
46+
postcode: '',
47+
email: '',
48+
phone: '',
49+
company: '',
50+
errors: null
51+
}
52+
5353
const CheckoutForm = ({countriesData}) => {
5454

5555
const {billingCountries, shippingCountries} = countriesData || {}

0 commit comments

Comments
 (0)