Superheroes - A tutorial to enable Payments acceptance via Payabbhi PHP 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 PHP Client 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-php.git
Install the Payabbhi PHP Client library
Assumptions for this tutorial:
Payabbhi PHP Libraryis installed via
- The library is installed in the
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 local env for running Superheroes
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 script(s) to be executed to the
public folder and then open index.php in your browser.