From c0751eaa85042f890a0cd170ecfac0ea58220e4b Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Mon, 1 Feb 2021 08:13:26 +0100 Subject: [PATCH 1/4] Bugfix: The code for replace special characters did not work correctly --- app/code/community/Mollie/Mpm/Model/OrderLines.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/community/Mollie/Mpm/Model/OrderLines.php b/app/code/community/Mollie/Mpm/Model/OrderLines.php index 7df0e24..f29d33f 100644 --- a/app/code/community/Mollie/Mpm/Model/OrderLines.php +++ b/app/code/community/Mollie/Mpm/Model/OrderLines.php @@ -510,8 +510,8 @@ public function getOpenForRefundQty($orderId) */ private function getProductName($name) { - $search = explode('','', 'ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,ø,Ø,Å,Á,À,Â,Ä,È,É,Ê,Ë,Í,Î,Ï,Ì,Ò,Ó,Ô,Ö,Ú,Ù,Û,Ü,Ÿ,Ç,Æ,Œ'); - $replace = explode('','', 'c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,o,O,A,A,A,A,A,E,E,E,E,I,I,I,I,O,O,O,O,U,U,U,U,Y,C,AE,OE'); + $search = explode('', 'ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,ø,Ø,Å,Á,À,Â,Ä,È,É,Ê,Ë,Í,Î,Ï,Ì,Ò,Ó,Ô,Ö,Ú,Ù,Û,Ü,Ÿ,Ç,Æ,Œ'); + $replace = explode('', 'c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,o,O,A,A,A,A,A,E,E,E,E,I,I,I,I,O,O,O,O,U,U,U,U,Y,C,AE,OE'); $name = str_replace($search, $replace, $name); return preg_replace('/[^A-Za-z0-9 -]/', '', $name); From d21b16f01786ce1adc4fb6a3c9eb9aff6ae2fce7 Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Mon, 22 Feb 2021 14:25:18 +0100 Subject: [PATCH 2/4] Fix: When the cardlabel is not present it will add an log entry --- app/code/community/Mollie/Mpm/Block/Payment/Info/Base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/community/Mollie/Mpm/Block/Payment/Info/Base.php b/app/code/community/Mollie/Mpm/Block/Payment/Info/Base.php index aa98e20..aad5b27 100644 --- a/app/code/community/Mollie/Mpm/Block/Payment/Info/Base.php +++ b/app/code/community/Mollie/Mpm/Block/Payment/Info/Base.php @@ -150,7 +150,7 @@ public function getcardLabel() { try { $details = json_decode($this->getInfo()->getAdditionalInformation('details')); - if ($details->cardLabel) { + if (isset($details->cardLabel)) { return $details->cardLabel; } } catch (\Exception $e) { From fc84a3278e471cf7a1a38867af5f7df8d4730ebd Mon Sep 17 00:00:00 2001 From: Marvin-Magmodules Date: Wed, 10 Mar 2021 18:48:46 +0100 Subject: [PATCH 3/4] Version bump --- app/code/community/Mollie/Mpm/etc/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/community/Mollie/Mpm/etc/config.xml b/app/code/community/Mollie/Mpm/etc/config.xml index 5e8c23c..4c2f8cf 100644 --- a/app/code/community/Mollie/Mpm/etc/config.xml +++ b/app/code/community/Mollie/Mpm/etc/config.xml @@ -33,7 +33,7 @@ - 5.6.3 + 5.6.4 From 9822287e884268ce8a83717030f231ea8e731201 Mon Sep 17 00:00:00 2001 From: Marvin-Magmodules Date: Wed, 10 Mar 2021 18:51:01 +0100 Subject: [PATCH 4/4] Creditcard Components Label translations --- app/locale/de_DE/Mollie_Mpm.csv | 6 +++++- app/locale/en_US/Mollie_Mpm.csv | 4 ++++ app/locale/fr_FR/Mollie_Mpm.csv | 6 +++++- app/locale/nl_NL/Mollie_Mpm.csv | 4 ++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/locale/de_DE/Mollie_Mpm.csv b/app/locale/de_DE/Mollie_Mpm.csv index 2ba3b52..77af2ba 100644 --- a/app/locale/de_DE/Mollie_Mpm.csv +++ b/app/locale/de_DE/Mollie_Mpm.csv @@ -119,4 +119,8 @@ "Force use of base currency for the payment request. Is set to no the selected currency of the storeview will be used for request.","Benutzen der Basiswährung für die Zahlungsanfrage erzwingen. Falls Nein eingestellt ist, wird die ausgewählte Währung des Storeviews für die Anfrage benutzt." "Debugging","Debugging" "API Details","API-Details" -"Api Test","API-Test" \ No newline at end of file +"Api Test","API-Test" +"Card Holder","Inhaber" +"Card Number","Kreditkartennummer" +"Expiry Date","Ablaufdatum" +"Verification Code","Kartenprüfnummer" \ No newline at end of file diff --git a/app/locale/en_US/Mollie_Mpm.csv b/app/locale/en_US/Mollie_Mpm.csv index 6de01e6..3f86b20 100644 --- a/app/locale/en_US/Mollie_Mpm.csv +++ b/app/locale/en_US/Mollie_Mpm.csv @@ -126,3 +126,7 @@ Klarna Payment Surcharge,Klarna Payment Surcharge "Enter the extra costs for a Klarna Slice It payment with a maximum of € 1.95","Enter the extra costs for a Klarna Slice It payment with a maximum of € 1.95" "Enter the extra costs for a Klarna Pay Later payment with a maximum of € 1.95","Enter the extra costs for a Klarna Pay Later payment with a maximum of € 1.95" "Payment rejected. Klarna cannot be used as a Payment Method on this order, please try another Payment Method.","Payment rejected. Klarna cannot be used as a Payment Method on this order, please try another Payment Method." +"Card Holder","Card Holder" +"Card Number","Card Number" +"Expiry Date","Expiry Date" +"Verification Code","Verification Code" \ No newline at end of file diff --git a/app/locale/fr_FR/Mollie_Mpm.csv b/app/locale/fr_FR/Mollie_Mpm.csv index 91ddabf..c590903 100644 --- a/app/locale/fr_FR/Mollie_Mpm.csv +++ b/app/locale/fr_FR/Mollie_Mpm.csv @@ -101,4 +101,8 @@ "Force use of base currency for the payment request. Is set to no the selected currency of the storeview will be used for request.","Forcer l'utilisation de la devise de base pour l'ordre de paiement. Est réglé sur non, la devise sélectionnée du storeview sera utilisée pour la demande." "Debugging","Débogage" "API Details","Détails de l'API" -"Api Test","Test Api" \ No newline at end of file +"Api Test","Test Api" +"Card Holder","Titulaire de la carte" +"Card Number","Numéro de carte" +"Expiry Date","Date d'expiration" +"Verification Code","Code de vérification" \ No newline at end of file diff --git a/app/locale/nl_NL/Mollie_Mpm.csv b/app/locale/nl_NL/Mollie_Mpm.csv index 3977566..09f4780 100644 --- a/app/locale/nl_NL/Mollie_Mpm.csv +++ b/app/locale/nl_NL/Mollie_Mpm.csv @@ -123,3 +123,7 @@ "An error occured while processing your payment request, please try again later.","Er is iets fout gegaan bij het verwerken van uw betaling. Probeer het alstublieft later opnieuw." "An error occured while processing your payment, please try again with other method.","Er is iets fout gegaan bij het verwerken van uw betaling. Probeer het alstublieft later opnieuw met een andere betaalmethode." "Payment rejected. Klarna cannot be used as a Payment Method on this order, please try another Payment Method.","Betaling geweigerd. Klarna kan niet worden gebruikt als betaalmethode voor deze bestelling. Probeer een andere betaalmethode." +"Card Holder","Kaarthouder" +"Card Number","Kaartnummer" +"Expiry Date","Vervaldatum" +"Verification Code","Verificatie code" \ No newline at end of file