Requirements
- Node 8, 10 or higher.
- NPM
Installation
- Via npm (Recomended)
Quick start
AddCHARGILY_APP_KEY and CHARGILY_APP_SECRET in .env file with the secret key and app key from [ePay Dashboard][api-keys]
#Usage
The package needs to be configured with your account’s secret key, which is
available in the [ePay Dashboard][api-keys]. Require it with the key’s
value:
Configurations
- Available Configurations
| key | description | redirect url | process url |
|---|---|---|---|
| CHARGILY_APP_KEY | must be string given by organization | required | required |
| CHARGILY_APP_SECRET | must be string given by organization | required | required |
| back_url | must be string and valid url | required | not required |
| webhook_url | must be string and valid url _ | required | required |
| mode | must be in CIB,EDAHABIA | required | not required |
| invoice_number | string or int | required | not required |
| client_name | string | required | not required |
| clientEmail | must be valid email This is where client receive payment receipt after confirmation | required | not required |
| amount | must be numeric and greather or equal than 75 | required | not required |
| discount | must be numeric and between 0 and 99 (discount in %) | required | not required |
| description | must be string_ | required | not required |
Testing Webhook signing
You can useDefaultSignatureValidator.isValid() to validate incoming webhook.