Skip to content
Starter project for the Payfriend application tutorial
JavaScript CSS Python HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
payfriend
.env.example
.gitignore
LICENSE
README.md
config.py
requirements.txt
wsgi.py

README.md

Payment Authorization with Authy

Sample application that shows how to use Authy push authorization to validate actions like payment transactions.

Demo video showing how the application works

Create an Authy Application

Sign up for a free Twilio account and create an Authy application in the console: https://www.twilio.com/console/authy/applications

Copy .env.example to .env and add your AUTHY_API_KEY.

screen shot 2018-12-07 at 3 37 50 pm

Install

On Mac/Linux:

python3 -m venv venv
. venv/bin/activate

Or on Windows cmd:

py -3 -m venv venv
venv\Scripts\activate.bat

Install Requirements:

pip install -r requirements.txt

Run

export FLASK_APP=payfriend
export FLASK_ENV=development
flask init-db
flask run

Or on Windows cmd:

set FLASK_APP=payfriend
set FLASK_ENV=development
flask init-db
flask run

You'll need a publicly accessible route that Authy can access. Download ngrok and run:

ngrok http 5000

Copy the Forwarding url: screen shot 2018-12-07 at 3 41 47 pm

Head back to the Authy Console and update your Application's Push Authentication callback URL with /payments/callback appended.

screen shot 2018-12-07 at 3 44 42 pm

Open http://127.0.0.1:5000 in a browser.

You can’t perform that action at this time.