Build and embed web forms with ease.
- Ruby 2.6.5
- Rails 6
- PostgreSQL 11.6
- Redis 5.0.7
- React.js 16
- Webpacker
- Docker
- Docker Compose
- CircleCI
- DigitalOcean
- Dokku
- clone this repo
- obtain the
master.key
and put it inconfig/
directory. - give
master.key
correct permissions:chmod 600 config/master.key
- build the image
docker-compose build
- setup for development
docker-compose run --rm app /bin/bash -c "bundle config --delete without && gem install foreman && bundle && yarn && rails db:setup"
- run
docker-compose up
Admin: admin@example.com
/ password
Member: member@example.com
/ password
You can preview all mailer views by visiting http://localhost:3000/rails/mailers
.
Mailer previews are located in the spec/mailers/previews
directory.
Care should be taken not to create permanent data through the preview classes.
Fires when a user starts a new subscription or updates their payment method.
Fires when a subscription is updated. Use this to update the subscription status.
Fires when a subscription is canceled. Use this to flag the subscription as canceled.
Fires 3 days before a trial subscription will end. Use this to trigger an email to the user.
Fires when a payment fails. Currently not being used.
Install stripe-cli in order to use webhooks in development. Follow the instructions to login.
stripe listen --forward-to http://localhost:3000/subscription/webhook -e 'checkout.session.completed,customer.subscription.updated,customer.subscription.deleted,customer.subscription.trial_will_end,invoice.payment_failed'
This will output the webhook signing key when started.
Export this key to your ENV so it can be consumed in docker-compose. The key does not change.
export STRIPE_WEBHOOK_SIGNING_SECRET={{THE_WEBHOOK_SECRET}}