Superheroes - A tutorial to enable Payments acceptance via Payabbhi Python library
Superheroes Store allows purchase of a superhero, to run errands for you, by paying a random amount between ₹1 to ₹5.
The Superheroes tutorial is designed to take you to full implementation in four graded steps:
- Step 1 : Basic implementation of
Payments Acceptance workflow
- Step 2 : Add
Payment Response Handling
- Step 3 : Add
- Step 4 : Reorganize and Refactor to bring everything together
- Clone the Superheroes repository
- Install the Payabbhi Python library
- Sign up for a
Payabbhi accountand download
- Setup the local env for running Superheroes
Clone the Superheroes repository
$ git clone https://github.com/payabbhi/superheroes-python.git
Install the Payabbhi Python Client library
Sign up for a Payabbhi account and download API Keys
As you go through the tutorial, you will need to replace every instance of
<SECRET-KEY> with your actual keys. You would typically want to use your
test mode API keys for this tutorial.
Setup the web root directory
We have used Flask to set up the python web server. For the purposes of this tutorial, the
public folder (included in the git repo) is assumed to be the web root directory. You'll need to configure your web server accordingly, or clone the repo in the right directory to ensure that.
For each step in the tutorial, first copy the templates folder and script(s) to be executed to the
Running superheroes tutorial
$ python public/superheroes.py
Then hit the root url i.e. http://127.0.0.1:5000/ in your browser.