An async loaded Stripe credit card form rendered in a react component which triggers requests to Django.
- Go to https://dashboard.stripe.com and register.
- In your stripe dashboard click on Developers -> API keys in the left side menu - you should see your publishable and secret keys
- Clone the repo
- cd frontend && npm install
- make a .env file in the frontend directory and insert the your Publishable key from the dasboard: REACT_APP_publishable="YOUR_PUBLISHABLE_KEY"
- npm start and you should see your credit card form rendered
- cd backend, create a virtualenv, activate it and do a pip install -r requirements.txt
- make a .env file in your backend direcotry and post your Stripe Secret Key from the Dashbaord: STRIPE_SECRET_KEY=YOUR_STRIPE_SECRET_KEY
- python manage.py runserver and go open the payments(https://dashboard.stripe.com/test/payments) section on your dasboard if you use any of stripe's test(https://stripe.com/docs/testing) credit card numbers to try out the form your payments section in the dashboard should update accordingly