Superheroes Store allows purchase of a superhero, to run errands for you, by paying a random amount between ₹1 to ₹5.
The Payments Acceptance workflow
is implemented as described in the Payabbhi Integration Guide using (Payabbhi Python Library)[https://github.com/payabbhi/payabbhi-python]
This tutorial demonstrates integration with Payabbhi Checkout
using both dropin and custom modes.
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
Exception Handling
- Step 4 : Reorganize and Refactor to bring everything together
- Clone the Superheroes repository
- Install the Payabbhi Python library
- Sign up for a
Payabbhi account
and downloadAPI Keys
- Setup the local env for running Superheroes
$ git clone https://github.com/payabbhi/superheroes-python.git
To run any of the steps, you will first need to install the Payabbhi Python library. To do so follow the installation steps.
Next, sign up for a Payabbhi Account and download the API keys from the Portal.
As you go through the tutorial, you will need to replace every instance of <ACCESS-ID>
and <SECRET-KEY>
with your actual keys. You would typically want to use your test mode API
keys for this tutorial.
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 public
folder.
$ python public/superheroes.py
Then hit the root url i.e. http://127.0.0.1:5000/ in your browser.