Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Release of 4.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper-MultiSafepay committed Mar 27, 2020
2 parents 557af87 + 814a161 commit 97f7a83
Show file tree
Hide file tree
Showing 19 changed files with 51 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.github/ export-ignore
/phpcs.ruleset.xml export-ignore
/phpunit.xml.dist export-ignore
/Tests/ export-ignore
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 4.6.0
Release date: March 27th, 2020

### Added
+ PLGPRSS17-97: Add Apple Pay
+ PLGPRSS17-96: Add Direct Bank Transfer

### Fixed
+ PLGPRSS17-94: Fix ClassNotFoundException when cURL returns an error

***

## 4.5.1
Release date: February 26th, 2020

Expand Down
2 changes: 1 addition & 1 deletion config_nl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>multisafepay</name>
<displayName><![CDATA[MultiSafepay]]></displayName>
<version><![CDATA[4.5.1]></version>
<version><![CDATA[4.6.0]></version>
<description><![CDATA[Process payments by using MultiSafepay secure payment processing]]></description>
<author><![CDATA[MultiSafepay]]></author>
<tab><![CDATA[payments_gateways]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion controllers/front/payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function postProcess()
"plugin" => array(
"shop" => 'Prestashop',
"shop_version" => _PS_VERSION_,
"plugin_version" => ' - Plugin 4.5.1',
"plugin_version" => ' - Plugin 4.6.0',
"partner" => "MultiSafepay",
)
);
Expand Down
2 changes: 2 additions & 0 deletions models/Api/MspClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

namespace MultiSafepay\PrestaShop\models\Api;

use Configuration;
use FileLogger;
use MultiSafepay\PrestaShop\models\Api\Objects\Orders;
use MultiSafepay\PrestaShop\models\Api\Objects\Issuers;
use MultiSafepay\PrestaShop\models\Api\Objects\Gateways;
Expand Down
15 changes: 12 additions & 3 deletions multisafepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ class Multisafepay extends PaymentModule
array("code" => "afterpay", "name" => "AfterPay", 'config' => true),
array("code" => "trustly", "name" => "Trustly", 'config' => true),
array("code" => "idealqr", "name" => "iDEAL QR", 'config' => true),
array("code" => "dbrtp", "name" => "Direct Bank Transfer", 'config' => true),
array("code" => "applepay", "name" => "Apple Pay", 'config' => true),
);

public function __construct()
{
$this->name = 'multisafepay';
$this->tab = 'payments_gateways';
$this->version = '4.5.1';
$this->version = '4.6.0';
$this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
$this->author = 'MultiSafepay';
$this->controllers = array('validation', 'payment');
Expand Down Expand Up @@ -985,6 +987,13 @@ public function hookPaymentOptions($params)
case "einvoice":
$externalOption->setForm($this->getEinvoice());
break;
case "applepay":
$this->context->smarty->assign([
'action' => $this->context->link->getModuleLink($this->name, 'payment', array('payment' => 'applepay'), true),
]);

$externalOption->setForm($this->context->smarty->fetch('module:multisafepay/views/templates/front/applepay.tpl'));
break;
case "amex":
case "visa":
case "mastercard":
Expand Down Expand Up @@ -1079,7 +1088,7 @@ protected function getActiveGateways()
// check if gateway is enabled in the plug-in
if (Tools::getValue('MULTISAFEPAY_GATEWAY_' . $gateway["code"])) {
if (!in_array($gateway["code"], $mspGateways)) {
$warnings[] = sprintf("%s %s", $gateway["name"], $this->l('Is not activated in your Multisafepay account'));
$warnings[] = sprintf("%s %s", $gateway["name"], $this->l('Is not activated in your MultiSafepay account'));
}
}
}
Expand All @@ -1105,7 +1114,7 @@ protected function getActiveGiftcards()
// check if giftcards is enabled in the plug-in
if (Tools::getValue('MULTISAFEPAY_GIFTCARD_' . $giftcard["code"])) {
if (!in_array($giftcard["code"], $mspGateways)) {
$warnings[] = sprintf("%s %s", $giftcard["name"], $this->l('Is not activated in your Multisafepay account'));
$warnings[] = sprintf("%s %s", $giftcard["name"], $this->l('Is not activated in your MultiSafepay account'));
}
}
}
Expand Down
Binary file added views/images/gateways/de_DE/applepay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/de_DE/dbrtp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/en_GB/applepay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/en_GB/dbrtp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/es_ES/applepay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/es_ES/dbrtp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/fr_FR/applepay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/fr_FR/dbrtp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/it_IT/applepay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/it_IT/dbrtp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/nl_NL/applepay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added views/images/gateways/nl_NL/dbrtp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions views/templates/front/applepay.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<form action="{$action}" id="msp-applepay-form" method="POST" class="additional-information">
<input type="hidden" name="gateway" value="applepay"/>
<script>
var applePayPaymentOptionsBlock = document.getElementById('msp-applepay-form').parentElement;
var paymentMethodId = applePayPaymentOptionsBlock.getAttribute('id').match(/\d+/g)[0];
var PaymentMethodBlock = document.getElementById('payment-option-' + paymentMethodId + '-container');
PaymentMethodBlock.style.display = 'none';
try {
if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
PaymentMethodBlock.style.display = 'block';
}
} catch (error) {
console.warn('MultiSafepay error when trying to initialize Apple Pay:', error);
}
</script>
</form>

0 comments on commit 97f7a83

Please sign in to comment.