Salesforce - Stripe connector
Clone or download
Latest commit 71358bc Dec 6, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci py.test moved? Oct 19, 2018
.github Update pull request template Oct 30, 2018
static use webpack for legacy css Dec 3, 2018
templates fresh template Dec 3, 2018
webpack use webpack for legacy css Dec 3, 2018
.babelrc webpackify Apr 11, 2018
.dockerignore add .editorconfig Sep 25, 2018
.editorconfig use 2-space indents for front-end code Oct 24, 2018
.eslintrc webpackify Apr 11, 2018
.gitignore ignore production-compiled static assets Nov 21, 2018
Dockerfile upgrade pip Oct 19, 2018
Dockerfile.py2 add a new Dockerfile since salesforce-bulk doesn't support Python 3 Mar 22, 2016
Dockerfile.sample add TODO Oct 18, 2018
LICENSE add MIT license Feb 18, 2016
Makefile Merge branch 'master' into dockerfile Oct 22, 2018
Procfile add CloudAMQP-specific setting recommendations Oct 22, 2018 update README Dec 4, 2018 add a style guide Oct 17, 2018
_config.yml Set theme jekyll-theme-minimal Nov 6, 2018
app.json Add Heroku generated app.json Nov 30, 2018 refinements to how it's recorded in Salesforce Dec 6, 2018 Merge branch 'master' into sec Oct 22, 2018
apple-developer-merchantid-domain-association add merchant ID verification file May 17, 2017 hotfix change of function name Nov 17, 2018 create a Task when a Circle charge fails Nov 29, 2018 refinements to how it's recorded in Salesforce Dec 6, 2018
dev-requirements.txt add dev requirements file Sep 25, 2018 fix length of reason field Nov 6, 2018 (hotfix) fix csv initial space Dec 5, 2018
package.json pin version number for vue-stripe-elements-plus Aug 29, 2018 clean up imports Sep 21, 2018 style fixes Oct 3, 2018
requirements.txt Merge branch 'master' into libsass Dec 5, 2018
runtime.txt upgrade Python runtime Oct 30, 2018 update test Nov 28, 2018 style changes Oct 5, 2018
yarn.lock pin version number for vue-stripe-elements-plus Aug 29, 2018


Collecting donations for the Texas Tribune.

  • Python running Flask
  • integrates with Stripe
  • integrates with Salesforce
  • supports single and recurring donations
  • easily deployed on Heroku

Getting Started

The recommended method for running this repo locally is to use Docker. If you don't already have Docker set up, you'll want to install Docker for Mac to get a Docker environment set up on your computer.

You'll also need to have an env file set up with the environment variables for Stripe and Salesforce so that Docker can find them. By default the Makefile will look for env-docker but this can be overridden with the DOCKER_ENV_FILE environment variable.


Python 3.6+ See requirements.txt and dev-requirements.txt for specific Python packages and versions.


Variable Example
PUBLISABLE_KEY pk_test_12345
SECRET_KEY sk_test_12335
CELERY_BROKER_URL amqp://guest:guest@rabbitmq:5672/
CELERY_RESULT_BACKEND redis://redis:6379/0
FLASK_SECRET_KEY b'f;\xeb\x9bT2\xcd\xdb\xe1#z\xfb\xab\xf8(\x03'
SENTRY_DSN https://user:pass@sentry/7?timeout=10
SLACK_CHANNEL #donations
REDIS_URL redis://redis:6379

Running the Project

Run make backing. This will start RabbitMQ and Redis. Run make. This will drop you into the Flask app. Run yarn run dev. You should then be able to interact with the app at

C_FORCE_ROOT=True celery -A app.celery worker --loglevel=INFO &
celery beat --app app.celery &
# gunicorn app:app --log-file=- --bind= --access-logfile=-

Front-end commands:

  • yarn run dev: Start Flask development server and watch for JS and CSS changes
  • yarn run js:dev: Just watch for JS and CSS changes

Front-end notes:

  • On yarn run dev, all files are built to /static/js/build, which is ignored from version control. That way you can make as many changes as you want when developing, Webpack will recompile the files, and they'll never show up in VC.
  • On deploy, all files are built to /static/js/prod/. This is not ignored from VC because Heroku cannot create directories and thus needs it to exist in the repo. That's why it contains a .gitkeep file.
  • On deploy, the production JS has to be built via the postinstall script. This means that, if you run yarn or yarn add <package> locally inside Docker, you'll get some compiled files in /static/js/prod/ that show up in version control. Delete them!

Important note: To build our JS on deployment, Heroku needs to run a postinstall script in package.json. This also means every time you run yarn or yarn add <package>, it's going to trigger that build and generate a bunch of files in static/js/prod/. Don't commit these!

Running tests

To run the project tests, run make test


If you're not invited to the Trib's Heroku group, get someone to invite you. Log in to Heroku on your console. Follow Heroku instructions for deploying. Specifically, you'll run the command heroku git:remote -a donations-prod to add heroku to the project.

Replace the `[remote "heroku"] stanza in your .git/config file with the following to tell Heroku/Git where to push your branch, production or test:

[remote "production"]
  url =
  fetch = +refs/heads/*:refs/remotes/production/*
[remote "test"]
  url =
  fetch = +refs/heads/*:refs/remotes/heroku/*

Then deploy to test with the command git push test master or production with git push production master.

If you need to deploy a branch other than master to the test server, use the command git push <server> <branch>:master. For example git push test your-branch-name:master.

Test URL:


If you find vulnerabilities in this repo please report them to