Skip to content

arahmaninov/shop_sample_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple shop with the backend made in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published