Skip to content

Commit

Permalink
Merge pull request #2 from ihor-s-whidegroup/master
Browse files Browse the repository at this point in the history
add exchange timer
  • Loading branch information
leviothan authored Aug 6, 2018
2 parents 278b401 + 6994ef5 commit d71688d
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion controllers/front/pay.php
Original file line number Diff line number Diff line change
@@ -64,6 +64,8 @@ public function initContent()
$redirectTo = 'index.php?controller=order-confirmation&id_cart='.$order->id_cart.'&id_module='.$this->module->id.'&id_order='.$order->reference.'&key='.$customer->secure_key;
}

$paybear_exchange_locktime = Configuration::get('PAYBEAR_EXCHANGE_LOCKTIME') * 60;

$this->context->smarty->assign([
'currencies' => $this->context->link->getModuleLink('paybear', 'currencies', array('order' => $orderReference)),
'status' => $this->context->link->getModuleLink('paybear', 'status', array('order' => $orderReference)),
@@ -84,7 +86,8 @@ public function initContent()
'paymentStatus' => $paymentStatus,
'statusPaymentAccepted' => $statusPaymentAccepted,
'statusWaitingForConfirmations' => $statusWaitingForConfirmations,
'statusMispaid' => $statusMispaid
'statusMispaid' => $statusMispaid,
'paybearExchangeLocktime' => $paybear_exchange_locktime
]);

if ((float) _PS_VERSION_ < 1.7) {
3 changes: 2 additions & 1 deletion views/js/payment.js
Original file line number Diff line number Diff line change
@@ -12,7 +12,8 @@ $(function () {
maxUnderpaymentFiat: $container.data('max-underpayment-fiat'),
modal: true,
enablePoweredBy: true,
redirectPendingTo: $container.data('redirect')
redirectPendingTo: $container.data('redirect'),
timer: $container.data('timer')
});

var autoopen = $container.data('autoopen');
1 change: 1 addition & 0 deletions views/templates/front/payment.tpl
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
data-currency-sign="{$shopCurrency->sign}"
data-min-overpayment-fiat="{$minOverpaymentFiat}"
data-max-underpayment-fiat="{$maxUnderpaymentFiat}"
data-timer="{$paybearExchangeLocktime}"
data-autoopen="true"
>
<div class="p30 PayBear-spinner" style="display: none;">
4 changes: 3 additions & 1 deletion views/templates/front/payment16.tpl
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
data-currency-sign="{$shopCurrency->sign}"
data-min-overpayment-fiat="{$minOverpaymentFiat}"
data-max-underpayment-fiat="{$maxUnderpaymentFiat}"
data-timer="{$paybearExchangeLocktime}"
data-autoopen="true"
>
<div class="p30 PayBear-spinner" style="display: none;">
@@ -463,7 +464,8 @@
maxUnderpaymentFiat: $container.data('max-underpayment-fiat'),
modal: true,
enablePoweredBy: true,
redirectPendingTo: $container.data('redirect')
redirectPendingTo: $container.data('redirect'),
timer: $container.data('timer'),
});
var autoopen = $container.data('autoopen');

0 comments on commit d71688d

Please sign in to comment.