Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.26 KB

README.md

File metadata and controls

44 lines (34 loc) · 1.26 KB

Investec Card Code Template

This is a template for Investec card code. This is schaffolding sets up a project with the tools to upload code to the Investec card.

Copy over the .env.example file to .env and fill in the required fields.

cp .env.example .env

The .env file is for your local environment and the .env.prod file is for the production environment.

cp .env.example .env.prod

To install the dependencies, run the following command:

npm install

Usage

To run the code locally, run the following command:

npx ipb run -f main.js --env prod --amount 60000 --currency ZAR --mcc 0000 --merchant "Test Merchant" --city "Test City" --country ZA

To upload code you will need a card key this can be retireved by calling the following command:

npx ipb fetch-cards

To upload code to the card, run the following command by setting the card key, the file and the env to upload: The env is optional and needs the file to be .env.prod if you specify prod

npx ipb deploy -c <cardkey> -f main.js --env prod

You can get your card execution logs with the following command

npx ipb logs -c <cardkey>

License

This project is licensed under the MIT License - see the LICENSE.md file for details