Giter Site home page Giter Site logo

back-end-stripe-workshop's Introduction

Stripe API Workshop

Goal

Integrate Stripe payment processing into a React-Rails project

Note: There are many, many ways to use the Stripe API. This way is simply one I found to be relatively straightforward.

Tools

  • React
  • Ruby on Rails
  • Dotenv
  • React-stripe-checkout

Safety

We are dealing with both API Keys and payment processing, so it is very important we keep safety in mind while working with Stripe. To do this be sure to remember three things:

  1. Make sure your Stripe account is in Test mode (it comes in test mode by default), and you are using the Test API keys.
  2. Make sure your API keys are properly hidden
  3. Never use real CC information while testing

Overview

  1. Create Stripe Account, set up environment variables
  2. Integrate Checkout in front-end, pass token to back-end
  3. Set up controller in back-end to handle token and create Charge
  4. Check stripe account for activity

Feel free to clone the starter repos and follow along:

Front End

  1. Set up dotenv
  2. Install react-stripe-checkout
  3. Add <StripeCheckout /> component
  4. Create onToken function

Back End

  1. Add gems (dotenv and stripe)
  2. Set up dotenv
  3. Create charge controller
  4. Don't forget to add the route!
  5. Bonus: error handling

back-end-stripe-workshop's People

Contributors

shanelonergan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.