Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 1.14 KB

README.md

File metadata and controls

60 lines (37 loc) · 1.14 KB

shop_sample_go

About

This is a sample shop with backend made in Go. Payment processing api provided by Stripe.

shop_sample_go

Installation

  1. 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).

  1. Build and run the frontend client
npm install
npm start

( export Node options in case of errors: )

export NODE_OPTIONS=--openssl-legacy-provider
  1. 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.

(https://dashboard.stripe.com/test/payments)

shop_sample_go2