This is a simple Express server that listens for webhooks coming from Chargily Epay services. It uses ngrok to expose the local server to the internet.
These instructions will get you a copy of the project up and running on your local machine for development and production purposes.
-
Node.js (version 14 or above)
-
npm
-
Chargily Epay account (https://pay.chargily.com/)
-
Free account from ngrok (https://ngrok.com/)
- Clone the repository:
- Navigate into the project directory:
- cd chargily-webhook-server
- Install the dependencies:
- npm install
Create a .env
file in the root of your project and add the following environment variables:
CHARGILY_SECRET_KEY=your_chargily_secret_key
NGROK_AUTH_TOKEN=your_ngrok_auth_token
NGROK_STATIC_DOMAIN=your_ngrok_static_domain
- Replace these values with the actual values that you can obtain from their respective dashboards.
To start the server, run:
- npm start
Express - The web framework used
ngrok - Used to expose local server to the internet
crypto - Used for generating HMAC
dotenv - Used to load environment variables from a .env file