A customizable Telegram shop bot that accepts bitcoin payments.
Please refer to the main greed project fork for requirements, installation guide, and usage instructions before proceeding with the bitcoin setup below
-
Edit the
config/config.toml
file to set your Blockonomics api_key from Blockonomics Merchants > Stores, and a secret of your choosing, you'll use this secret while setting up the Callback URL below. -
Add a new store and set the HTTP Callback URL
Below are instructions on how to deploy your bot to obtain a Callback URL using Ngrok or Heroku.
Deploy using Ngrok
- In a new terminal/cmd prompt, start the bitcoin callback listener on port 5000
python3 -OO callback.py
- In another terminal/cmd prompt, start ngrok on port 5000
./ngrok http 5000
or~/ngrok http 5000
- Copy the Forwarding URL from ngrok.
- Set the HTTP Callback URL for your store. Combine the Forwarding URL with
/callback?secret=YOUR_SECRET
, substituting in your chosen secret from step 2 in place ofYOUR_SECRET
eg. http://c7f7ecb92ht5.ngrok.io/callback?secret=aN32nFjf4
Deploy using Heroku
- Test using heroku cli command:
heroku local
- You will also be able to login to heroku and push your bot to heroku master to launch it into production using the following commands:
git init . git add . git commit -m "Deploy to Heroku" heroku login -i heroku git:remote -a {your-heroku-project-name} git push heroku master
- You can now start the greed bot and blockonomics callback from the Heroku Dashboard > Resources.
- Set the HTTP Callback URL for your store , combine the Heroku App URL with
/callback?secret=YOUR_SECRET
, substituting in your chosen secret from step 2 in place ofYOUR_SECRET
eg. https://greed.herokuapp.com/callback?secret=aN32nFjf4
- In a new terminal/cmd prompt, start the bitcoin callback listener on port 5000
That's it! Restart your bot and start accepting bitcoing payments with your bot!
This project is a fork of greed project by @Steffo99. We would like to thank @Steffo99 for putting this in public domain.