Bitcoin Forum

Other => Beginners & Help => Topic started by: serenitys on May 11, 2014, 07:22:20 AM



Title: Is There An Easy Way Here? Please Advise (Resolved)
Post by: serenitys on May 11, 2014, 07:22:20 AM
I've been looking for the easiest solution but keep finding convoluted coding bs...

All I want to do is add a bitcoin donation button to a website...and I assumed it would be as simple as the bitcoin wallet address in the href tag and the button image in the image tag and there ya go. If someone clicks, it'll take them where ever the address leads to.

Apparently it's not that simple.

I have 1. website, 2. bitcoin wallet address, 3. button image

How exactly do I need to add this? What would I add for a QR code? Where does it go?

Also, what is the public key and what do I do with it? Private key?

Thanks


Title: Re: Is There An Easy Way Here? Please Advise
Post by: Foxpup on May 11, 2014, 07:47:03 AM
All I want to do is add a bitcoin donation button to a website...and I assumed it would be as simple as the bitcoin wallet address in the href tag and the button image in the image tag and there ya go. If someone clicks, it'll take them where ever the address leads to.

Apparently it's not that simple.
Sure it is. See my signature, for example. Is there a specific problem you're experiencing?

I have 1. website, 2. bitcoin wallet address, 3. button image

How exactly do I need to add this?
Code:
<a href="bitcoin:address?label=whatever%20you%20want">
<img src="imagefilename" alt="whatever you want">
</a>
You should also have the Bitcoin address in plain text on the website, for the benefit of people who don't have a Bitcoin client installed and are therefore unable to use the link directly.

What would I add for a QR code? Where does it go?
You'd add another image. Put it near the donation button. Or make it part of the same image. Either way works.

Also, what is the public key and what do I do with it?
The public key is irrelevant and unnecessary for this operation. Do nothing with it.

Private key?
Do especially nothing with it. Private = don't put it on your website.


Title: Re: Is There An Easy Way Here? Please Advise
Post by: BitCoinDream on May 11, 2014, 07:56:01 AM
I've been looking for the easiest solution but keep finding convoluted coding bs...

All I want to do is add a bitcoin donation button to a website...and I assumed it would be as simple as the bitcoin wallet address in the href tag and the button image in the image tag and there ya go. If someone clicks, it'll take them where ever the address leads to.

Apparently it's not that simple.

I have 1. website, 2. bitcoin wallet address, 3. button image

How exactly do I need to add this? What would I add for a QR code? Where does it go?

Also, what is the public key and what do I do with it? Private key?

Thanks

Paste the following in your HTML and modify the address and qr code image, otherwise the donation will go to Bitcoin foundation ;)

Code:
<center><a href="bitcoin:1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW?label=Bitcoin+Foundation+Donation">1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW</a><br /><br />
<a href="bitcoin:1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW?label=Bitcoin+Foundation+Donation">
<img src="http://btcf.bwb.is/static/sites/11/2014/04/btcf_qr.png" alt="btcf_qr" width="202" height="201">
</a></center>

Preview...

1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW (bitcoin:1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW?label=Bitcoin+Foundation+Donation)

http://btcf.bwb.is/static/sites/11/2014/04/btcf_qr.png (bitcoin:1BTCorgHwCg6u2YSAWKgS17qUad6kHmtQW?label=Bitcoin+Foundation+Donation)





Title: Re: Is There An Easy Way Here? Please Advise
Post by: serenitys on May 11, 2014, 09:21:21 AM
Awesome. That did the trick. Thanks so much for the info. Not sure what I was looking at but there were several "add bitcoin donation button" tutorials that wanted all kinds of code, php, js, and downloading this and that...I even signed up for bitpay and have no idea whether I need it or not ;-p

Thanks for the easy solution.

Happy Mother's Day to you all too


Title: Re: Is There An Easy Way Here? Please Advise
Post by: newIndia on May 13, 2014, 03:48:14 PM
All I want to do is add a bitcoin donation button to a website...and I assumed it would be as simple as the bitcoin wallet address in the href tag and the button image in the image tag and there ya go. If someone clicks, it'll take them where ever the address leads to.

Apparently it's not that simple.
Sure it is. See my signature, for example. Is there a specific problem you're experiencing?

I have 1. website, 2. bitcoin wallet address, 3. button image

How exactly do I need to add this?
Code:
<a href="bitcoin:address?label=whatever%20you%20want">
<img src="imagefilename" alt="whatever you want">
</a>
You should also have the Bitcoin address in plain text on the website, for the benefit of people who don't have a Bitcoin client installed and are therefore unable to use the link directly.

What would I add for a QR code? Where does it go?
You'd add another image. Put it near the donation button. Or make it part of the same image. Either way works.

Also, what is the public key and what do I do with it?
The public key is irrelevant and unnecessary for this operation. Do nothing with it.

Private key?
Do especially nothing with it. Private = don't put it on your website.

I'd like to know how the payment made through the above is tracked, i.e. how the system will know the Tx Id or the amount that the user is paying by clicking on bitcoin:address ?


Title: Re: Is There An Easy Way Here? Please Advise
Post by: devthedev on May 13, 2014, 04:15:21 PM
Awesome. That did the trick. Thanks so much for the info. Not sure what I was looking at but there were several "add bitcoin donation button" tutorials that wanted all kinds of code, php, js, and downloading this and that...I even signed up for bitpay and have no idea whether I need it or not ;-p

Thanks for the easy solution.

Happy Mother's Day to you all too

Here's a script you can use for a donate button as well, it includes a QR code and such.
All you have to do is replace the "###" with your Bitcoin address everywhere you see it in the code.

Code:
<script src="//blockr.io/js_external/coinwidget/coin.js"></script>
<script>
CoinWidgetCom.go({
wallet_address: '###',
currency: 'bitcoin',
counter: 'count',
lbl_button: 'Donate',
lbl_count: 'donations',
lbl_amount: 'BTC',
lbl_address: 'Use address below to donate. Thanks!',
qrcode: true,
alignment: 'bl',
decimals: 8,
size: "small",
color: "dark",
countdownFrom: "0",
element: "#coinwidget-bitcoin-###",
onShow: function(){},
onHide: function(){}
});
</script>
<div id="coinwidget-bitcoin-###"></div>


Title: Re: Is There An Easy Way Here? Please Advise
Post by: newIndia on May 13, 2014, 04:21:27 PM
Awesome. That did the trick. Thanks so much for the info. Not sure what I was looking at but there were several "add bitcoin donation button" tutorials that wanted all kinds of code, php, js, and downloading this and that...I even signed up for bitpay and have no idea whether I need it or not ;-p

Thanks for the easy solution.

Happy Mother's Day to you all too

Here's a script you can use for a donate button as well, it includes a QR code and such.
All you have to do is replace the "###" with your Bitcoin address everywhere you see it in the code.

Code:
<script src="//blockr.io/js_external/coinwidget/coin.js"></script>
<script>
CoinWidgetCom.go({
wallet_address: '###',
currency: 'bitcoin',
counter: 'count',
lbl_button: 'Donate',
lbl_count: 'donations',
lbl_amount: 'BTC',
lbl_address: 'Use address below to donate. Thanks!',
qrcode: true,
alignment: 'bl',
decimals: 8,
size: "small",
color: "dark",
countdownFrom: "0",
element: "#coinwidget-bitcoin-###",
onShow: function(){},
onHide: function(){}
});
</script>
<div id="coinwidget-bitcoin-###"></div>

In this case also, how the payment is tracked by the system, i.e. how my site will know about the Tx Id and the amount ?


Title: Re: Is There An Easy Way Here? Please Advise
Post by: Foxpup on May 14, 2014, 01:52:48 AM
how my site will know about the Tx Id and the amount ?
The same way as if you had published your bank account number on your site for the purpose of people sending money to it. Your site has no way of knowing if anyone has sent money to that bank account. However, your bank will know, and you can get the transaction details from your bank. Likewise, your site will not know if you have received bitcoins, but your Bitcoin wallet will, and it will provide the transaction details.