Skip to content

Commit

Permalink
Added bitcoin:URI link and QR code to checkout.
Browse files Browse the repository at this point in the history
  • Loading branch information
btcgear committed Dec 7, 2012
1 parent db1f424 commit 74fd8a5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ Adds a cleaner user interface during checkout

Checkout UI revamped. Payment information presented in colorbox. Payment amount and address are easier to select.

### New in version 1.3.0

Added QR code and URI Click to pay to checkout page.

* * *

Expand Down
16 changes: 12 additions & 4 deletions upload/catalog/view/theme/default/template/payment/bitcoin.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ DEALINGS IN THE SOFTWARE.
-->

<?php if(!$error) { ?>
<div class="buttons">
<div class="right"><a id="button-pay" class="button"><span><?php echo $button_bitcoin_pay; ?></span></a></div>
</div>
Expand All @@ -33,15 +34,22 @@ DEALINGS IN THE SOFTWARE.
$('#button-pay').on('click', function() {
html = '<div style="font-size:16px; padding:6px; text-align:center;">Please send <span style="font-size:18px; border-style:solid; border-width: 1px; border-radius:3px; padding-top:3px; padding-right:6px; padding-left:6px; padding-bottom:3px;"><?php echo $bitcoin_total; ?></span> BTC to </div><div style="font-size:16px; padding:6px; text-align:center;"><span style="font-size:18px; border-style:solid; border-width: 1px; border-radius:3px; padding-top:3px; padding-right:6px; padding-left:6px; padding-bottom:3px;"><?php echo $bitcoin_send_address; ?></span></div><div style="font-size:16px; padding:6px; text-align:center;"> to complete the transaction.</div>';
html += '<div class="buttons">';
html = '<div id="payment-wrapper" style="position:relative;">';
html += ' <div id="payment-left" style="float:left; padding-top:25px;">';
html += ' <div style="font-size:16px; padding:6px; text-align:center;">Please send <span style="font-size:18px; border-style:solid; border-width: 1px; border-radius:3px; padding-top:3px; padding-right:6px; padding-left:6px; padding-bottom:3px;"><?php echo $bitcoin_total; ?></span> BTC to </div>';
html += ' <div style="font-size:16px; padding:6px; text-align:center;"><span style="font-size:18px; border-style:solid; border-width: 1px; border-radius:3px; padding-top:3px; padding-right:6px; padding-left:6px; padding-bottom:3px;"><?php echo $bitcoin_send_address; ?></span></div>';
html += ' <div style="font-size:16px; padding:6px; text-align:center;"> to complete the transaction.</div>';
html += ' <div style="font-size:16px; padding:6px; text-align:center;"><a style="font-size: 16px;" href="bitcoin:<?php echo $bitcoin_send_address; ?>?amount=<?php echo $bitcoin_total; ?>">Click to pay</a> (URI-compatible wallets only)</div>';
html += ' </div>';
html += '<div id="payment-right" style="float: right;"><img src="http://chart.apis.google.com/chart?cht=qr&chl=bitcoin:<?php echo $bitcoin_send_address; ?>?amount=<?php echo $bitcoin_total; ?>&chs=160x160"></div></div>';
html += '<div class="buttons" style="clear: both;">';
html += ' <div class="right"><a id="button-confirm" class="button"><span><?php echo $button_bitcoin_confirm; ?></span></a></div>';
html += '</div>';
$.colorbox({
overlayClose: true,
opacity: 0.5,
width: '500px',
height: '225px',
width: '600px',
height: '285px',
href: false,
html: html,
onComplete: function() {
Expand Down

0 comments on commit 74fd8a5

Please sign in to comment.