Rechage module powering Magic API platform.
How to work with this module
Clone the repository to your computer.
Add a file named
.envat the root of the project. This should be a YAML file and have the following environment variables:
RIP_MerchantID: Rocket in Pocket's client ID
RIP_MerchantKey: Rocket in Pocket client key. This is bound to a single IP.
RIP_RechargeURL: Base URL for Rocket in Pocket's Recharge API.
Open Terminal (Command Prompt on Windows),
cdto the project folder and type
Next, type the following in the Terminal window:
npm test. This would run all the unit test that I've written for this particular module. If all tests pass, you've got a fully working
Rechargemodule in front you.
To get a sense of the code structure, I'd recommend consulting the
Code Manual. Code Manual is a local site that gets generated from the documentation comments I've left in the source code. To generate
Code Manualon your computer, open the Terminal,
cdto the project root and run
npm run code-manual.
You should now have a
Code Manualfolder at your project root. Open the
index.htmlfile in the folder in your favourite browser and enjoy the ride.
Make sure you commit any changes made to the source code at regular intervals, and sync the changes back to the Bitbucket