Skip to content

robinske/payfriend-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Starter project for the Payfriend application tutorial

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published