Skip to content

A template for getting started with investec card code

License

Notifications You must be signed in to change notification settings

devinpearson/card-code-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A template for getting started with investec card code

Resources

License

Stars

Watchers

Forks

Releases

No releases published