- Setup Serverless for deploying lambda functions
> npm install serverless -g
-
Configure AWS credentials for Serverless deployment. Instructions here.
-
Clone repo
> git clone git@github.com:n4nagappan/recharge-bot.git
> cd recharge-bot
- Rename the sample_config.json file to config.json.
> mv sample_config.json config.json
-
Modify the config.json to include your phone number and pay2all client id. You can get your pay2all client id here.
-
Deploy service
> serverless deploy -s prod
- Test request
curl --data 'sender=919444944400' https://mokdggyz4a.execute-api.us-east-1.amazonaws.com/prod/recharge
- Setup textlocal account here
- Configure an inbox to send HTTP post request to your lambda service when an SMS is received. You can do that under the "Forward incoming messages to a URL" section inside settings.
- Setup Pay2All account here
- Top-up your account with some money for recharging.