This is a sample shop with backend made in Go. Payment processing api provided by Stripe.
- Create a stripe test account (https://stripe.com/)
Get a publishable key from the dashboard
(https://dashboard.stripe.com/test/apikeys)
Paste it in frontend/src/StripePayment.jsx
const stripePromise = loadStripe(
[your key]
)
Add a secret key from the dashboard to your environment (see .env.example).
- Build and run the frontend client
npm install
npm start
( export Node options in case of errors: )
export NODE_OPTIONS=--openssl-legacy-provider
- Run backend server
go run main.go
Choose an item, you can leave the shipping data empty. After that you can fill the credit card data with test data
(https://stripe.com/docs/testing)
You will see completed payment in the dashboard.