Skip to content

An example of using Docker and DevContainers to develop Stripe demos

Notifications You must be signed in to change notification settings

lucaloguercio-stripe/stripe-docker-demo

 
 

Repository files navigation

Accept a payment

A Sinatra implementation.

You can 🎥 watch a video to see how this server was implemented and read the transcripts.

Requirements

How to run

  1. Confirm .env configuration

Ensure the API keys are configured in .env in this directory. It should include the following keys:

# Stripe API keys - see https://stripe.com/docs/development/quickstart#api-keys
STRIPE_PUBLISHABLE_KEY=pk_test...
STRIPE_SECRET_KEY=sk_test...

# Required to verify signatures in the webhook handler.
# See README on how to use the Stripe CLI to test webhooks
STRIPE_WEBHOOK_SECRET=whsec_...

# Path to front-end implementation. Note: PHP has it's own front end implementation.
STATIC_DIR=./client/build
DOMAIN=http://localhost:4242
  1. Install required dependencies
bundle install
  1. Run the server locally
ruby server.rb
  1. Go to http://localhost:4242 in your browser

About

An example of using Docker and DevContainers to develop Stripe demos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 52.9%
  • JavaScript 22.6%
  • CSS 16.2%
  • HTML 3.6%
  • Dockerfile 2.8%
  • Shell 1.9%