- It is required
Nodeversion >= 14 yarnornpmto run scripts/install dependencies
You will need to replace the value on file config.js with the configuration on your Developer section by logging-in to Merchant Portal with your account.
// config.js
const config = {
brandId: '<<BRAND_ID>>',
apiKey: '<<API_KEY>>',
endpoint: 'https://gate.chip-in.asia/api/v1',
basedUrl: '<<DOMAIN_URL>>',
webhookPublicKey: '<<WEBHOOK_PUBLIC_KEY>>'
}
module.exports = configBRAND_ID
Obtain your BRAND_ID from Developer section.
API_KEY
Obtain your API_KEY from Developer section.
WEBHOOK_PUBLIC_KEY
Obtain your WEBHOOK_PUBLIC_KEY from Developer section. You can register the URL from API or from Merchant Portal on Developer section.
DOMAIN_URL
It is your domain URL
- Install dependencies:
npm i
# OR
yarn- Run application locally:
node run start
# OR
yarn startand visit localhost:7001 on your browser.
To test /api/callback & /api/webhook to be called from our server, make sure it is connected to internet (exposed to outside).
We recommend to use ngrok if you want to run locally for debugging. Then You can replace DOMAIN_URL with generated URL by ngrok.
NB: Use it at your own risk. Make sure do not expose your critical port.