diff --git a/paylikepayment/controllers/front/paymentreturn.php b/paylikepayment/controllers/front/paymentreturn.php index 0b683ea..15f1b01 100644 --- a/paylikepayment/controllers/front/paymentreturn.php +++ b/paylikepayment/controllers/front/paymentreturn.php @@ -3,7 +3,7 @@ * * @author DerikonDevelopment * @copyright Copyright (c) permanent, DerikonDevelopment - * @version 1.0.3 + * @version 1.0.4 * @link http://www.derikon.com/ * */ @@ -43,7 +43,7 @@ public function init() if (!$authorized) { die($this->module->l('Paylike payment method is not available.', 'paymentreturn')); } - + if (Configuration::get('PAYLIKE_CHECKOUT_MODE') == 'delayed') { $this->fetch(); @@ -99,19 +99,19 @@ public function fetch() $total = $fetch['transaction']['amount'] / $currency_multiplier; $amount = $fetch['transaction']['amount']; - + //$status_paid = Configuration::get('PS_OS_PAYMENT'); $status_paid = 3; //Processing in progress if ($this->module->validateOrder((int)$cart->id, $status_paid, $total, $this->module->displayName, $message, array(), null, false, $customer->secure_key)) { $this->module->storeTransactionID($transactionid, $this->module->currentOrder, $total, $captured = 'NO'); - + $redirectLink = __PS_BASE_URI__.'index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key; Tools::redirectLink($redirectLink); } else { //Paylike\Transaction::void($transactionid, ['amount' => $amount]); //Cancel Order Paylike\Transaction::void($transactionid, array('amount' => $fetch['transaction']['amount'])); //Cancel Order - + Logger::addLog('Invalid transaction.'); $this->context->smarty->assign(array( 'paylike_order_error' => 1, @@ -200,7 +200,7 @@ public function capture() $amount = $capture['transaction']['amount']; $validOrder = $this->module->validateOrder((int)$cart->id, $status_paid, $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); - + $message = 'Trx ID: '.$transactionid.' Authorized Amount: '.($capture['transaction']['amount'] / $currency_multiplier).' Captured Amount: '.($capture['transaction']['capturedAmount'] / $currency_multiplier).' diff --git a/paylikepayment/paylikepayment.php b/paylikepayment/paylikepayment.php index 89fa8ab..07fa0b5 100644 --- a/paylikepayment/paylikepayment.php +++ b/paylikepayment/paylikepayment.php @@ -4,7 +4,7 @@ * @author DerikonDevelopment * @copyright Copyright (c) permanent, DerikonDevelopment * @license Addons PrestaShop license limitation - * @version 1.0.3 + * @version 1.0.4 * @link http://www.derikon.com/ * */ @@ -26,7 +26,7 @@ class PaylikePayment extends PaymentModule { public function __construct() { $this->name = 'paylikepayment'; $this->tab = 'payments_gateways'; - $this->version = '1.0.3'; + $this->version = '1.0.4'; $this->author = 'DerikonDevelopment'; $this->bootstrap = true; $this->module_key = '1d083bab290f652fb6fb7ae35f9f0942'; @@ -624,7 +624,7 @@ public function getModalForAddMoreLogo() { public function hookHeader() { /*if(Configuration::get('PAYLIKE_STATUS') == 'enabled' && $this->context->controller->php_self == 'order') { - $this->context->controller->addJs('https://sdk.paylike.io/3.js'); + $this->context->controller->addJs('https://sdk.paylike.io/6.js'); }*/ } diff --git a/paylikepayment/views/templates/hook/payment.tpl b/paylikepayment/views/templates/hook/payment.tpl index 1a6b42e..2523784 100644 --- a/paylikepayment/views/templates/hook/payment.tpl +++ b/paylikepayment/views/templates/hook/payment.tpl @@ -18,7 +18,7 @@ height: 27px; } - +