I currently have a donation page on my website here:
http://dailyanarchist.com/contribute/It's using a static address and it looks hokey. Needless to say the donate bitcoin button javascript offered by blockchain.info is pretty badass. So, I tried to implement it. But I ran into problems.
First thing I did was copy this:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript" src="https://blockchain.info//Resources/wallet/pay-now-button.js"></script>
into my header.php. That's where my head tag is.
Then I went into my word press page that allows me to put in HTML in to the contributor page I have set up. So, I copied this:
[code]<div style="font-size:16px;margin:10px;width:300px" class="blockchain-btn"
data-address="1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq"
data-anonymous="false"
data-callback="https://mydomain.com/callback_url">
<div class="blockchain stage-begin">
<img src="https://blockchain.info//Resources/buttons/pay_now_64.png">
</div>
<div class="blockchain stage-loading" style="text-align:center">
<img src="https://blockchain.info//Resources/loading-large.gif">
</div>
<div class="blockchain stage-ready">
Please send payment to bitcoin address <b>[[address]]</b>
</div>
<div class="blockchain stage-paid">
Payment Received <b>[[value]] BTC</b>. Thank You.
</div>
<div class="blockchain stage-error">
<font color="red">[[error]]</font>
</div>
</div>
[/code]
Then I modified the data-address to one of my own. I also toggled the false to true and I removed the callback command since it's just a donation button.
Then I previewd the changes and I got the pay now button, with other problems. No problem. With a little playing around I switched the .png to the donate bitcoin .png. Then I previewed again. For some reason the div style, class, address etc were appearing in plain text. Long story short: I'm still having difficulties. I got it to show the right donation image, but when I click the button it gives me an error code. Is there something I'm missing? Also, is there a .js for the donate bitcoin? Because what is offered looks like it's pay with bitcoin specific javascript.