A simple html plugin to allow people to donate the equivalent bitcoin amount of a donation of a chosen fiat currency.
var address = "PUT_ADDRESS_HERE"; // The bitcoin address to receive donations. Change to yours
var popup = false; // Set to true if you want a popup to pay bitcoin
var currency_code = "USD"; // Change to your default currency. Choose from https://api.bitcoinaverage.com/ticker/
var qrcode = true; // Set to false to disable qrcode
var link = true; // Set to false to disable generating hyperlink
var organization = "Example"; // Change to your organization name
var mbits = true; // Set to false to display bitcoin traditionally
- Link people to your donate-bitcoin page to let them chose how much Bitcoin to donate.
- Link people to your donate-bitcoin page with a set amount and specific currency for them to donate. This is done by adding something like
?amount=100¤cy=USD
to your url. (Example) Read more in the Advanced Configuration.
To create a cool button like this, , you can use the shields.io API.
[![Donate Bitcoin](https://img.shields.io/badge/donate-$10-orange.svg)](http://example.com/donate-bitcoin/?amount=10¤cy=USD)
<a href="http://example.com/donate-bitcoin/?amount=10¤cy=USD"><img src="https://img.shields.io/badge/donate-$10-orange.svg"></a>
You can use HTML to embed donate-bitcoin into one of your existing pages to add an option for people to donate right on your page.
<iframe style="border:none;" src="donate-bitcoin/index.html" height="600px" width="400px"></iframe>
Or with QR code option disabled:
<iframe style="border:none;" src="donate-bitcoin/index.html" height="200px" width="400px"></iframe>
A demo of donate-bitcoin being embedded can be found on my portfolio. https://nrobinson2000.github.io/about/
You can override any of the variables for donate-bitcoin by adding the parameters in your URL. Different variables are separated with a &
. For example, to donate 10 Pounds Sterling to Satoshi Nakamoto, you would add:
/?amount=10¤cy=GBP&name=Satoshi-Nakamoto
to your URL. See this example in action.
amount
- Set the amount of currency to donate.address
- Set a Bitcoin address.popup
- Enable / Disable popup. (true
orfalse
)currency
- Set currency. (Chose from the Bitcoin average API)qrcode
- Enable / Disable QR code. (true
orfalse
)link
- Enable / Disable Hyperlink. (true
orfalse
)name
- Set your name. ( "Donate Bitcoin to NAME") Separate words with-
, use--
for a-
!mbits
- Display bitcoin donation in mBits. (Milli-Bitcoins) (true
orfalse
)
I have installed donate-bitcoin
on my po-util website, at https://po-util.com/donate
Here is what it looks like on an iPhone 6 Plus: