diff --git a/paylikepayment/composer.json b/paylikepayment/composer.json index e982e9d..d1aa6e8 100644 --- a/paylikepayment/composer.json +++ b/paylikepayment/composer.json @@ -2,7 +2,7 @@ "name": "paylike/module-paylike", "description": "Paylike integration with payment gateway prestashop", "type": "prestashop-module", - "version": "1.0.6", + "version": "1.0.7", "license": [ "GPL-3.0-or-later" ], diff --git a/paylikepayment/config.xml b/paylikepayment/config.xml index 5f80e84..d73c68c 100644 --- a/paylikepayment/config.xml +++ b/paylikepayment/config.xml @@ -2,7 +2,7 @@ paylike - + diff --git a/paylikepayment/controllers/front/paymentreturn.php b/paylikepayment/controllers/front/paymentreturn.php index e2b97cb..4b5eab8 100644 --- a/paylikepayment/controllers/front/paymentreturn.php +++ b/paylikepayment/controllers/front/paymentreturn.php @@ -4,7 +4,7 @@ * @author DerikonDevelopment * @copyright Copyright (c) permanent, DerikonDevelopment * @license Addons PrestaShop license limitation - * @version 1.0.6 + * @version 1.0.7 * @link http://www.derikon.com/ * */ diff --git a/paylikepayment/paylikepayment.php b/paylikepayment/paylikepayment.php index c021346..619e325 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.6 + * @version 1.0.7 * @link http://www.derikon.com/ * */ @@ -28,7 +28,7 @@ class PaylikePayment extends PaymentModule { public function __construct() { $this->name = 'paylikepayment'; $this->tab = 'payments_gateways'; - $this->version = '1.0.6'; + $this->version = '1.0.7'; $this->author = 'DerikonDevelopment'; $this->bootstrap = true; diff --git a/paylikepayment/views/templates/hook/payment.tpl b/paylikepayment/views/templates/hook/payment.tpl index 59f7f5e..483cd52 100644 --- a/paylikepayment/views/templates/hook/payment.tpl +++ b/paylikepayment/views/templates/hook/payment.tpl @@ -1,214 +1,218 @@ -{* -* Team Paylike -* -* @author Team Paylike -* @copyright Team Paylike -* @license MIT license: https://opensource.org/licenses/MIT -*} -{if $paylike_status == 'enabled'} - - - - {*
-
-

- {l s='Pay with credit card' mod='paylikepayment'} -

-
-
*} - -
-
-
*} - "> - -
- {l s={$payment_method_title} mod='paylikepayment'} - -
    - {foreach from=$payment_method_creditcard_logo item=logo} -
  • - {$logo} -
  • - {/foreach} -
-
- {l s={$payment_method_desc} mod='paylikepayment'} -
-
-
-
-{/if} +{* +* Team Paylike +* +* @author Team Paylike +* @copyright Team Paylike +* @license MIT license: https://opensource.org/licenses/MIT +*} +{if $paylike_status == 'enabled'} + + + + {*
+
+

+ {l s='Pay with credit card' mod='paylikepayment'} +

+
+
*} + +
+
+
*} + "> + +
+ {l s={$payment_method_title} mod='paylikepayment'} + +
    + {foreach from=$payment_method_creditcard_logo item=logo} +
  • + {$logo} +
  • + {/foreach} +
+
+ {l s={$payment_method_desc} mod='paylikepayment'} +
+
+
+
+{/if} diff --git a/tests/PrestashopFullTest.php b/tests/PrestashopFullTest.php index fc09a0a..347bb0b 100755 --- a/tests/PrestashopFullTest.php +++ b/tests/PrestashopFullTest.php @@ -98,8 +98,7 @@ public function testDkkPaymentInstant() { $this->runner = new PrestashopRunner( $this ); $this->runner->ready( array( 'currency' => 'DKK', - 'capture_mode' => 'instant', - 'log_version' => true + 'capture_mode' => 'instant' ) ); } diff --git a/tests/PrestashopRunner.php b/tests/PrestashopRunner.php index 9f89f65..c21960e 100644 --- a/tests/PrestashopRunner.php +++ b/tests/PrestashopRunner.php @@ -328,7 +328,10 @@ public function finalPaylike() { $expectedAmount = $this->getText('.cart-total span.value'); $expectedAmount = preg_replace("/[^0-9.]/", "", $expectedAmount); $expectedAmount = ceil(round($expectedAmount, 3) * get_paylike_currency_multiplier($this->currency)); - $amount = $this->wd->executeScript("return window.amount"); + $amount = $this->getText('.paylike .payment .amount'); + $amount = preg_replace("/[^0-9.]/", "", $amount); + $amount = trim($amount, '.'); + $amount = ceil(round($amount, 4) * get_paylike_currency_multiplier($this->currency)); $this->main_test->assertEquals($expectedAmount, $amount, "Checking minor amount for " . $this->currency); $this->popupPaylike();