Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitcoin payments #30

Closed
wants to merge 26 commits into from
Closed

Conversation

DarrenWestwood
Copy link
Contributor

@DarrenWestwood DarrenWestwood commented Jan 17, 2020

Integrating Bitcoin

  1. If you plan on accepting Bitcoin payments, enter your Blockonomics api key into the config.ini file:
    https://www.blockonomics.co/merchants#/

  2. In order to receive notifications of Bitcoin payments, you are required to deploy your bot in order to receive a public url where webhooks can be delivered to Greed Bot.

For testing ngrok https://ngrok.com/download works well:

  • Run the following command in a new terminal:./ngrok http 5000
  • Look at the "Forwarding" line to see your unique Ngrok domain name eg. https://greed.ngrok.io/

For production gunicorn can be used https://pypi.org/project/gunicorn:

  • Run the following command to launch Greed Bot: gunicorn --workers=1 core:app or add web: gunicorn --workers=1 core:app to your Procfile
    Once Greed Bot is running and you have received your public url eg. https://greed.herokuapp.com/

Callback URL

  • Add callback?secret=YOUR_SECRET_HERE_ to the end of your URL. eg. https://greed.herokuapp.com/callback?secret=YOUR_SECRET_HERE_, replacing with the secret entered in your config.ini file.
  • Set this url as the HTTP Callback URL in your Blockonomics account:
    https://www.blockonomics.co/merchants#/page3

@Steffo99 Steffo99 self-requested a review January 19, 2020 15:31
@Steffo99 Steffo99 self-assigned this Jan 19, 2020
@Steffo99
Copy link
Owner

Woah! You made a lot of stuff!

Sadly, I won't be able to review this until I am done with my exams 😅 , so it may take a while...

Please be patient, and thanks! 😄

@Steffo99
Copy link
Owner

Steffo99 commented Feb 2, 2020

By the way, are you affiliated with Blockonomics?

@Steffo99 Steffo99 added the feature A request for a new feature. label Feb 3, 2020
@DarrenWestwood
Copy link
Contributor Author

Please be patient, and thanks!

Thanks looking forward to your feedback when you have the time. I will reopen the pull-request for you to have a look and comment on.

By the way, are you affiliated with Blockonomics?

Yes, I'm a developer for Blockonomics.

@DarrenWestwood
Copy link
Contributor Author

I have opened a new pull-request with modified instructions.
#31

@GuyFawkesII
Copy link

GuyFawkesII commented Feb 15, 2020

Hello , I love this bitcoin payment feature , thanks
I have a few questions
let's say I hosted the bot on a vps (Debian).
will the order going to be placed even if the payment is unconfirmed or it's necessary that a payment confirmation should be done before the order is placed and the owner gets a notification from greed about the order ?
Thanks again

@DarrenWestwood
Copy link
Contributor Author

Hello , I love this bitcoin payment feature , thanks

Please note the features request has been moved here: #31

will the order going to be placed even if the payment is unconfirmed or it's necessary that a payment confirmation should be done before the order is placed and the owner gets a notification from greed about the order ?

In the testing websocket version orders are accepted instantly (0 confirmations).
In production, we recommend waiting for the payment to confirm via callback (2 confirmations).

This ensures payments are fully confirmed to your wallet before credit is funded. (This will happen anytime in the background, and notify the user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A request for a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants