Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
btcgear committed May 17, 2013
1 parent 04c1198 commit cd0d789
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions upload/admin/view/template/payment/bitcoin.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Copyright (c) 2013 John Atkinson (jga)
<div class="content">
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
<table class="form">
<tr>
<td colspan="2"><a href="index.php?route=payment/bitcoin/update_db&token=<?php echo $this->session->data['token']; ?>">Click here the first time you configure this extension to prepare your database.</a></td>
</tr>
<tr>
<td><span class="required">*</span> <?php echo $entry_username; ?></td>
<td><input type="text" name="bitcoin_rpc_username" value="<?php echo $bitcoin_rpc_username; ?>" style="width:300px;" />
Expand Down
6 changes: 3 additions & 3 deletions upload/catalog/controller/payment/bitcoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ public function confirm_sent() {
if(round((float)$received_amount,4) >= round((float)$bitcoin_total,4)) {
$order = $this->model_checkout_order->getOrder($order_id);
$this->model_checkout_order->confirm($order_id, $this->config->get('bitcoin_order_status_id'));
echo true;
echo "1";
}
else {
echo false;
echo "0";
}
} catch (Exception $e) {
$this->data['error'] = true;
echo false;
echo "0";
}

}
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/language/english/payment/bitcoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$_['text_click_here'] = 'Click here';
$_['text_pre_timer'] = 'You have ';
$_['text_post_timer'] = ' remaining to complete your transaction.';
$_['text_countdown_expired'] = 'Your time to complete this transaction has expired. Please refresh the page and attempt to checkout again.';
$_['text_countdown_expired'] = 'Your time to complete this transaction has expired. Please <a style="font-size: 16px;" href="index.php?route=checkout/checkout">click here</a> to attempt to checkout again.';
$_['text_if_not_redirect'] = 'if you are not redirected automatically a few seconds after payment.';
$_['error_msg'] = 'Error communicating with payment provider. Please contact the store for assistance.';
$_['error_confirm'] = 'That didn\\\'t quite work. Please try again. If you receive this message multiple times, please contact us so we can help finalize your order.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ $('#button-pay').on('click', function() {
type: 'GET',
url: 'index.php?route=payment/bitcoin/confirm_sent',
timeout: 5000,
dataType: 'text',
error: function() {
document.getElementById("cboxLoadedContent").innerHTML = document.getElementById("cboxLoadedContent").innerHTML + '<div class="warning"><?php echo $error_confirm; ?></div>';
},
success: function(received) {
if(!received) {
if(received != "1") {
document.getElementById("cboxLoadedContent").innerHTML = document.getElementById("cboxLoadedContent").innerHTML + '<div class="warning"><?php echo $error_incomplete_pay; ?></div>';
}
else {
Expand All @@ -102,11 +103,12 @@ $('#button-pay').on('click', function() {
type: 'GET',
url: 'index.php?route=payment/bitcoin/confirm_sent',
timeout: 5000,
dataType: 'text',
error: function() {
document.getElementById("cboxLoadedContent").innerHTML = document.getElementById("cboxLoadedContent").innerHTML + '<div class="warning"><?php echo $error_confirm; ?></div>';
},
success: function(received) {
if(received) {
if(received == "1") {
location.href = 'index.php?route=checkout/success';
}
}
Expand Down

0 comments on commit cd0d789

Please sign in to comment.