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 Node.js Client library.
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 Payabbhi Node.js Client library
- Sign up for a
Payabbhi account
and downloadAPI Keys
- Setup the local env for running Superheroes
$ git clone http://github.com/payabbhi/superheroes-node.git
$ cd superheroes-node
$ npm install
NOTE: Version of Payabbhi Node.js library may be changed in package.json
Next, sign up for a Payabbhi Account and download the API keys from the Portal.
Now, set the PA_ACCESS_ID
and PA_SECRET_KEY
environment variables.
$ export PA_ACCESS_ID=<your-access-id>
$ export PA_SECRET_KEY=<your-secret-key>
Refer to dropin
or custom
folders for next steps.