From 7466744904f06c6cd851a2796da6d899fb7f3e15 Mon Sep 17 00:00:00 2001 From: Alejandro Sosa Date: Tue, 16 Apr 2024 13:50:05 +0200 Subject: [PATCH] Release 2.0.39 --- README.md | 4 +- config.json | 572 ------------------- docs/en/documentation.html | 5 +- plugin.json | 2 +- resources/lang/de/Payment.properties | 103 ++++ resources/lang/en/Payment.properties | 103 ++++ resources/lang/fr/Payment.properties | 103 ++++ resources/lang/it/Payment.properties | 103 ++++ src/Methods/AlipayPaymentMethod.php | 18 +- src/Methods/BankTransferPaymentMethod.php | 22 +- src/Methods/CashuPaymentMethod.php | 22 +- src/Methods/CreditDebitCardPaymentMethod.php | 25 +- src/Methods/DaoPayPaymentMethod.php | 22 +- src/Methods/DirectDebitSepaPaymentMethod.php | 22 +- src/Methods/DirectDebitUkPaymentMethod.php | 22 +- src/Methods/EpsPaymentMethod.php | 22 +- src/Methods/GiropayPaymentMethod.php | 22 +- src/Methods/IDealPaymentMethod.php | 22 +- src/Methods/InvoicePaymentMethod.php | 25 +- src/Methods/MasterPassPaymentMethod.php | 25 +- src/Methods/OnlineBankingPaymentMethod.php | 22 +- src/Methods/PayPalPaymentMethod.php | 22 +- src/Methods/PayboxPaymentMethod.php | 22 +- src/Methods/PaydirektPaymentMethod.php | 22 +- src/Methods/PaylibPaymentMethod.php | 22 +- src/Methods/PaysafecardPaymentMethod.php | 22 +- src/Methods/PoliPaymentMethod.php | 22 +- src/Methods/Przelewy24PaymentMethod.php | 22 +- src/Methods/QiwiPaymentMethod.php | 22 +- src/Methods/SkrillPaymentMethod.php | 22 +- src/Methods/SofortBankingPaymentMethod.php | 22 +- src/Methods/TenpayPaymentMethod.php | 22 +- src/Methods/TrustlyPaymentMethod.php | 22 +- src/Methods/TwintPaymentMethod.php | 22 +- src/Services/WalleeSdkService.php | 2 +- translation.json | 7 + 36 files changed, 847 insertions(+), 734 deletions(-) create mode 100644 resources/lang/de/Payment.properties create mode 100644 resources/lang/en/Payment.properties create mode 100644 resources/lang/fr/Payment.properties create mode 100644 resources/lang/it/Payment.properties create mode 100644 translation.json diff --git a/README.md b/README.md index 3021ec2..9d13731 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ This repository contains the plentymarkets extension that enables to process pay ## Documentation -* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/plentymarkets/2.0.38/docs/en/documentation.html) +* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/plentymarkets/2.0.39/docs/en/documentation.html) ## License -Please see the [license file](https://github.com/wallee-payment/plentymarkets/blob/2.0.38/LICENSE) for more information. \ No newline at end of file +Please see the [license file](https://github.com/wallee-payment/plentymarkets/blob/2.0.39/LICENSE) for more information. \ No newline at end of file diff --git a/config.json b/config.json index e273484..1739548 100644 --- a/config.json +++ b/config.json @@ -91,33 +91,11 @@ "defaultValue": true } }, - "alipay_title": { - "type": "inputText", - "required": false, - "label": "Config.alipayTitleLabel", - "options": { - "defaultValue": "Alipay" - } - }, - "alipay_description": { - "type": "inputText", - "required": false, - "label": "Config.alipayDescriptionLabel", - "options": {} - }, "alipay_fee": { "type": "inputText", "required": false, "label": "Config.alipayFeeLabel", "options": {} - }, - "alipay_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.alipayIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -132,33 +110,11 @@ "defaultValue": true } }, - "banktransfer_title": { - "type": "inputText", - "required": false, - "label": "Config.banktransferTitleLabel", - "options": { - "defaultValue": "Bank Transfer" - } - }, - "banktransfer_description": { - "type": "inputText", - "required": false, - "label": "Config.banktransferDescriptionLabel", - "options": {} - }, "banktransfer_fee": { "type": "inputText", "required": false, "label": "Config.banktransferFeeLabel", "options": {} - }, - "banktransfer_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.banktransferIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -173,33 +129,11 @@ "defaultValue": true } }, - "cashu_title": { - "type": "inputText", - "required": false, - "label": "Config.cashuTitleLabel", - "options": { - "defaultValue": "CASHU" - } - }, - "cashu_description": { - "type": "inputText", - "required": false, - "label": "Config.cashuDescriptionLabel", - "options": {} - }, "cashu_fee": { "type": "inputText", "required": false, "label": "Config.cashuFeeLabel", "options": {} - }, - "cashu_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.cashuIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -214,33 +148,11 @@ "defaultValue": true } }, - "creditcard_title": { - "type": "inputText", - "required": false, - "label": "Config.creditcardTitleLabel", - "options": { - "defaultValue": "Credit / Debit Card" - } - }, - "creditcard_description": { - "type": "inputText", - "required": false, - "label": "Config.creditcardDescriptionLabel", - "options": {} - }, "creditcard_fee": { "type": "inputText", "required": false, "label": "Config.creditcardFeeLabel", "options": {} - }, - "creditcard_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.creditcardIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -255,33 +167,11 @@ "defaultValue": true } }, - "daopay_title": { - "type": "inputText", - "required": false, - "label": "Config.daopayTitleLabel", - "options": { - "defaultValue": "DaoPay" - } - }, - "daopay_description": { - "type": "inputText", - "required": false, - "label": "Config.daopayDescriptionLabel", - "options": {} - }, "daopay_fee": { "type": "inputText", "required": false, "label": "Config.daopayFeeLabel", "options": {} - }, - "daopay_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.daopayIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -296,33 +186,11 @@ "defaultValue": true } }, - "directdebitsepa_title": { - "type": "inputText", - "required": false, - "label": "Config.directdebitsepaTitleLabel", - "options": { - "defaultValue": "Direct Debit (SEPA)" - } - }, - "directdebitsepa_description": { - "type": "inputText", - "required": false, - "label": "Config.directdebitsepaDescriptionLabel", - "options": {} - }, "directdebitsepa_fee": { "type": "inputText", "required": false, "label": "Config.directdebitsepaFeeLabel", "options": {} - }, - "directdebitsepa_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.directdebitsepaIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -337,33 +205,11 @@ "defaultValue": true } }, - "directdebituk_title": { - "type": "inputText", - "required": false, - "label": "Config.directdebitukTitleLabel", - "options": { - "defaultValue": "Direct Debit (UK)" - } - }, - "directdebituk_description": { - "type": "inputText", - "required": false, - "label": "Config.directdebitukDescriptionLabel", - "options": {} - }, "directdebituk_fee": { "type": "inputText", "required": false, "label": "Config.directdebitukFeeLabel", "options": {} - }, - "directdebituk_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.directdebitukIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -378,33 +224,11 @@ "defaultValue": true } }, - "eps_title": { - "type": "inputText", - "required": false, - "label": "Config.epsTitleLabel", - "options": { - "defaultValue": "EPS" - } - }, - "eps_description": { - "type": "inputText", - "required": false, - "label": "Config.epsDescriptionLabel", - "options": {} - }, "eps_fee": { "type": "inputText", "required": false, "label": "Config.epsFeeLabel", "options": {} - }, - "eps_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.epsIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -419,33 +243,11 @@ "defaultValue": true } }, - "giropay_title": { - "type": "inputText", - "required": false, - "label": "Config.giropayTitleLabel", - "options": { - "defaultValue": "Giropay" - } - }, - "giropay_description": { - "type": "inputText", - "required": false, - "label": "Config.giropayDescriptionLabel", - "options": {} - }, "giropay_fee": { "type": "inputText", "required": false, "label": "Config.giropayFeeLabel", "options": {} - }, - "giropay_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.giropayIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -460,33 +262,11 @@ "defaultValue": true } }, - "ideal_title": { - "type": "inputText", - "required": false, - "label": "Config.idealTitleLabel", - "options": { - "defaultValue": "iDeal" - } - }, - "ideal_description": { - "type": "inputText", - "required": false, - "label": "Config.idealDescriptionLabel", - "options": {} - }, "ideal_fee": { "type": "inputText", "required": false, "label": "Config.idealFeeLabel", "options": {} - }, - "ideal_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.idealIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -501,33 +281,11 @@ "defaultValue": true } }, - "invoice_title": { - "type": "inputText", - "required": false, - "label": "Config.invoiceTitleLabel", - "options": { - "defaultValue": "Invoice" - } - }, - "invoice_description": { - "type": "inputText", - "required": false, - "label": "Config.invoiceDescriptionLabel", - "options": {} - }, "invoice_fee": { "type": "inputText", "required": false, "label": "Config.invoiceFeeLabel", "options": {} - }, - "invoice_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.invoiceIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -542,33 +300,11 @@ "defaultValue": true } }, - "masterpass_title": { - "type": "inputText", - "required": false, - "label": "Config.masterpassTitleLabel", - "options": { - "defaultValue": "MasterPass" - } - }, - "masterpass_description": { - "type": "inputText", - "required": false, - "label": "Config.masterpassDescriptionLabel", - "options": {} - }, "masterpass_fee": { "type": "inputText", "required": false, "label": "Config.masterpassFeeLabel", "options": {} - }, - "masterpass_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.masterpassIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -583,33 +319,11 @@ "defaultValue": true } }, - "onlinebanking_title": { - "type": "inputText", - "required": false, - "label": "Config.onlinebankingTitleLabel", - "options": { - "defaultValue": "Online Banking" - } - }, - "onlinebanking_description": { - "type": "inputText", - "required": false, - "label": "Config.onlinebankingDescriptionLabel", - "options": {} - }, "onlinebanking_fee": { "type": "inputText", "required": false, "label": "Config.onlinebankingFeeLabel", "options": {} - }, - "onlinebanking_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.onlinebankingIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -624,33 +338,11 @@ "defaultValue": true } }, - "paybox_title": { - "type": "inputText", - "required": false, - "label": "Config.payboxTitleLabel", - "options": { - "defaultValue": "paybox" - } - }, - "paybox_description": { - "type": "inputText", - "required": false, - "label": "Config.payboxDescriptionLabel", - "options": {} - }, "paybox_fee": { "type": "inputText", "required": false, "label": "Config.payboxFeeLabel", "options": {} - }, - "paybox_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.payboxIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -665,33 +357,11 @@ "defaultValue": true } }, - "paydirekt_title": { - "type": "inputText", - "required": false, - "label": "Config.paydirektTitleLabel", - "options": { - "defaultValue": "Paydirekt" - } - }, - "paydirekt_description": { - "type": "inputText", - "required": false, - "label": "Config.paydirektDescriptionLabel", - "options": {} - }, "paydirekt_fee": { "type": "inputText", "required": false, "label": "Config.paydirektFeeLabel", "options": {} - }, - "paydirekt_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.paydirektIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -706,33 +376,11 @@ "defaultValue": true } }, - "paylib_title": { - "type": "inputText", - "required": false, - "label": "Config.paylibTitleLabel", - "options": { - "defaultValue": "Paylib" - } - }, - "paylib_description": { - "type": "inputText", - "required": false, - "label": "Config.paylibDescriptionLabel", - "options": {} - }, "paylib_fee": { "type": "inputText", "required": false, "label": "Config.paylibFeeLabel", "options": {} - }, - "paylib_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.paylibIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -747,33 +395,11 @@ "defaultValue": true } }, - "paypal_title": { - "type": "inputText", - "required": false, - "label": "Config.paypalTitleLabel", - "options": { - "defaultValue": "PayPal" - } - }, - "paypal_description": { - "type": "inputText", - "required": false, - "label": "Config.paypalDescriptionLabel", - "options": {} - }, "paypal_fee": { "type": "inputText", "required": false, "label": "Config.paypalFeeLabel", "options": {} - }, - "paypal_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.paypalIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -788,33 +414,11 @@ "defaultValue": true } }, - "paysafecard_title": { - "type": "inputText", - "required": false, - "label": "Config.paysafecardTitleLabel", - "options": { - "defaultValue": "paysafecard" - } - }, - "paysafecard_description": { - "type": "inputText", - "required": false, - "label": "Config.paysafecardDescriptionLabel", - "options": {} - }, "paysafecard_fee": { "type": "inputText", "required": false, "label": "Config.paysafecardFeeLabel", "options": {} - }, - "paysafecard_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.paysafecardIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -829,33 +433,11 @@ "defaultValue": true } }, - "poli_title": { - "type": "inputText", - "required": false, - "label": "Config.poliTitleLabel", - "options": { - "defaultValue": "POLi" - } - }, - "poli_description": { - "type": "inputText", - "required": false, - "label": "Config.poliDescriptionLabel", - "options": {} - }, "poli_fee": { "type": "inputText", "required": false, "label": "Config.poliFeeLabel", "options": {} - }, - "poli_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.poliIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -870,33 +452,11 @@ "defaultValue": true } }, - "przelewy24_title": { - "type": "inputText", - "required": false, - "label": "Config.przelewy24TitleLabel", - "options": { - "defaultValue": "Przelewy24" - } - }, - "przelewy24_description": { - "type": "inputText", - "required": false, - "label": "Config.przelewy24DescriptionLabel", - "options": {} - }, "przelewy24_fee": { "type": "inputText", "required": false, "label": "Config.przelewy24FeeLabel", "options": {} - }, - "przelewy24_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.przelewy24IconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -911,33 +471,11 @@ "defaultValue": true } }, - "qiwi_title": { - "type": "inputText", - "required": false, - "label": "Config.qiwiTitleLabel", - "options": { - "defaultValue": "QIWI" - } - }, - "qiwi_description": { - "type": "inputText", - "required": false, - "label": "Config.qiwiDescriptionLabel", - "options": {} - }, "qiwi_fee": { "type": "inputText", "required": false, "label": "Config.qiwiFeeLabel", "options": {} - }, - "qiwi_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.qiwiIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -952,33 +490,11 @@ "defaultValue": true } }, - "skrill_title": { - "type": "inputText", - "required": false, - "label": "Config.skrillTitleLabel", - "options": { - "defaultValue": "Skrill" - } - }, - "skrill_description": { - "type": "inputText", - "required": false, - "label": "Config.skrillDescriptionLabel", - "options": {} - }, "skrill_fee": { "type": "inputText", "required": false, "label": "Config.skrillFeeLabel", "options": {} - }, - "skrill_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.skrillIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -993,33 +509,11 @@ "defaultValue": true } }, - "sofortbanking_title": { - "type": "inputText", - "required": false, - "label": "Config.sofortbankingTitleLabel", - "options": { - "defaultValue": "SOFORT Banking" - } - }, - "sofortbanking_description": { - "type": "inputText", - "required": false, - "label": "Config.sofortbankingDescriptionLabel", - "options": {} - }, "sofortbanking_fee": { "type": "inputText", "required": false, "label": "Config.sofortbankingFeeLabel", "options": {} - }, - "sofortbanking_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.sofortbankingIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -1034,33 +528,11 @@ "defaultValue": true } }, - "tenpay_title": { - "type": "inputText", - "required": false, - "label": "Config.tenpayTitleLabel", - "options": { - "defaultValue": "Tenpay" - } - }, - "tenpay_description": { - "type": "inputText", - "required": false, - "label": "Config.tenpayDescriptionLabel", - "options": {} - }, "tenpay_fee": { "type": "inputText", "required": false, "label": "Config.tenpayFeeLabel", "options": {} - }, - "tenpay_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.tenpayIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -1075,33 +547,11 @@ "defaultValue": true } }, - "trustly_title": { - "type": "inputText", - "required": false, - "label": "Config.trustlyTitleLabel", - "options": { - "defaultValue": "Trustly" - } - }, - "trustly_description": { - "type": "inputText", - "required": false, - "label": "Config.trustlyDescriptionLabel", - "options": {} - }, "trustly_fee": { "type": "inputText", "required": false, "label": "Config.trustlyFeeLabel", "options": {} - }, - "trustly_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.trustlyIconUrlLabel", - "options": { - "defaultValue": "" - } } } }, @@ -1116,33 +566,11 @@ "defaultValue": true } }, - "twint_title": { - "type": "inputText", - "required": false, - "label": "Config.twintTitleLabel", - "options": { - "defaultValue": "TWINT" - } - }, - "twint_description": { - "type": "inputText", - "required": false, - "label": "Config.twintDescriptionLabel", - "options": {} - }, "twint_fee": { "type": "inputText", "required": false, "label": "Config.twintFeeLabel", "options": {} - }, - "twint_icon_url": { - "type": "inputText", - "required": false, - "label": "Config.twintIconUrlLabel", - "options": { - "defaultValue": "" - } } } } diff --git a/docs/en/documentation.html b/docs/en/documentation.html index 761d8a1..b178a37 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -4,7 +4,8 @@ - + + wallee plentymarkets @@ -22,7 +23,7 @@

Documentation

  • - + Source
  • diff --git a/plugin.json b/plugin.json index 4e256a7..e5c9a86 100644 --- a/plugin.json +++ b/plugin.json @@ -6,7 +6,7 @@ }, "namespace": "Wallee", "type": "payment", - "version": "2.0.38", + "version": "2.0.39", "license": " Apache License Version 2", "isClosedSource": false, "pluginIcon": "icon_plugin_md.png", diff --git a/resources/lang/de/Payment.properties b/resources/lang/de/Payment.properties new file mode 100644 index 0000000..4fd8b4f --- /dev/null +++ b/resources/lang/de/Payment.properties @@ -0,0 +1,103 @@ +AliPayTitle="AliPay" +AliPayDescription = "" +AliPayIconUrl = "" + +BankTransferTitle="Bank Transfer" +BankTransferDescription = "" +BankTransferIconUrl = "" + +CashuTitle="CASHU" +CashuDescription = "" +CashuIconUrl = "" + +CreditDebitCardTitle="Credit / Debit Card" +CreditDebitCardDescription = "" +CreditDebitCardIconUrl = "" + +DaoPayTitle="DaoPay" +DaoPayDescription = "" +DaoPayIconUrl = "" + +DirectDebitSepaTitle="Direct Debit (SEPA)" +DirectDebitSepaDescription = "" +DirectDebitSepaIconUrl = "" + +DirectDebitUkTitle="Debit Debit (UK)" +DirectDebitUkDescription = "" +DirectDebitUkIconUrl = "" + +EpsTitle="EPS" +EpsDescription = "" +EpsIconUrl = "" + +GiropayTitle="Giropay" +GiropayDescription = "" +GiropayIconUrl = "" + +IDealTitle="iDeal" +IDealDescription = "" +IDealIconUrl = "" + +InvoiceTitle="Invoice" +InvoiceDescription = "" +InvoiceIconUrl = "" + +MasterPassTitle="MasterPass" +MasterPassDescription = "" +MasterPassIconUrl = "" + +OnlineBankingTitle="Online Banking" +OnlineBankingDescription = "" +OnlineBankingIconUrl = "" + +PayboxTitle="PayBox" +PayboxDescription = "" +PayboxIconUrl = "" + +PaydirektTitle="Pay Direkt" +PaydirektDescription = "" +PaydirektIconUrl = "" + +PayPalTitle="PayPal" +PayPalDescription = "" +PayPalIconUrl = "" + +PaylibTitle="Paylib" +PaylibDescription = "" +PaylibIconUrl = "" + +PaysafecardTitle="PaySafecard" +PaysafecardDescription = "" +PaysafecardIconUrl = "" + +PoliTitle="POLi" +PoliIconUrl = "" +PoliDescription = "" + +Przelewy24Title="Przelewy24" +Przelewy24Description = "" +Przelewy24IconUrl = "" + +QiwiTitle="QIWI" +QiwiDescription = "" +QiwiIconUrl = "" + +SkrillTitle="Skrill" +SkrillDescription = "" +SkrillIconUrl = "" + +SofortBankingTitle="SOFORT Banking" +SofortBankingDescription = "" +SofortBankingIconUrl = "" + +TenpayTitle="TenPay" +TenpayDescription = "" +TenpayIconUrl = "" + +TrustlyTitle="Trustly" +TrustlyDescription = "" +TrustlyIconUrl = "" + +TwintTitle="TWINT" +TwintDescription = "" +TwintIconUrl = "" diff --git a/resources/lang/en/Payment.properties b/resources/lang/en/Payment.properties new file mode 100644 index 0000000..4fd8b4f --- /dev/null +++ b/resources/lang/en/Payment.properties @@ -0,0 +1,103 @@ +AliPayTitle="AliPay" +AliPayDescription = "" +AliPayIconUrl = "" + +BankTransferTitle="Bank Transfer" +BankTransferDescription = "" +BankTransferIconUrl = "" + +CashuTitle="CASHU" +CashuDescription = "" +CashuIconUrl = "" + +CreditDebitCardTitle="Credit / Debit Card" +CreditDebitCardDescription = "" +CreditDebitCardIconUrl = "" + +DaoPayTitle="DaoPay" +DaoPayDescription = "" +DaoPayIconUrl = "" + +DirectDebitSepaTitle="Direct Debit (SEPA)" +DirectDebitSepaDescription = "" +DirectDebitSepaIconUrl = "" + +DirectDebitUkTitle="Debit Debit (UK)" +DirectDebitUkDescription = "" +DirectDebitUkIconUrl = "" + +EpsTitle="EPS" +EpsDescription = "" +EpsIconUrl = "" + +GiropayTitle="Giropay" +GiropayDescription = "" +GiropayIconUrl = "" + +IDealTitle="iDeal" +IDealDescription = "" +IDealIconUrl = "" + +InvoiceTitle="Invoice" +InvoiceDescription = "" +InvoiceIconUrl = "" + +MasterPassTitle="MasterPass" +MasterPassDescription = "" +MasterPassIconUrl = "" + +OnlineBankingTitle="Online Banking" +OnlineBankingDescription = "" +OnlineBankingIconUrl = "" + +PayboxTitle="PayBox" +PayboxDescription = "" +PayboxIconUrl = "" + +PaydirektTitle="Pay Direkt" +PaydirektDescription = "" +PaydirektIconUrl = "" + +PayPalTitle="PayPal" +PayPalDescription = "" +PayPalIconUrl = "" + +PaylibTitle="Paylib" +PaylibDescription = "" +PaylibIconUrl = "" + +PaysafecardTitle="PaySafecard" +PaysafecardDescription = "" +PaysafecardIconUrl = "" + +PoliTitle="POLi" +PoliIconUrl = "" +PoliDescription = "" + +Przelewy24Title="Przelewy24" +Przelewy24Description = "" +Przelewy24IconUrl = "" + +QiwiTitle="QIWI" +QiwiDescription = "" +QiwiIconUrl = "" + +SkrillTitle="Skrill" +SkrillDescription = "" +SkrillIconUrl = "" + +SofortBankingTitle="SOFORT Banking" +SofortBankingDescription = "" +SofortBankingIconUrl = "" + +TenpayTitle="TenPay" +TenpayDescription = "" +TenpayIconUrl = "" + +TrustlyTitle="Trustly" +TrustlyDescription = "" +TrustlyIconUrl = "" + +TwintTitle="TWINT" +TwintDescription = "" +TwintIconUrl = "" diff --git a/resources/lang/fr/Payment.properties b/resources/lang/fr/Payment.properties new file mode 100644 index 0000000..4fd8b4f --- /dev/null +++ b/resources/lang/fr/Payment.properties @@ -0,0 +1,103 @@ +AliPayTitle="AliPay" +AliPayDescription = "" +AliPayIconUrl = "" + +BankTransferTitle="Bank Transfer" +BankTransferDescription = "" +BankTransferIconUrl = "" + +CashuTitle="CASHU" +CashuDescription = "" +CashuIconUrl = "" + +CreditDebitCardTitle="Credit / Debit Card" +CreditDebitCardDescription = "" +CreditDebitCardIconUrl = "" + +DaoPayTitle="DaoPay" +DaoPayDescription = "" +DaoPayIconUrl = "" + +DirectDebitSepaTitle="Direct Debit (SEPA)" +DirectDebitSepaDescription = "" +DirectDebitSepaIconUrl = "" + +DirectDebitUkTitle="Debit Debit (UK)" +DirectDebitUkDescription = "" +DirectDebitUkIconUrl = "" + +EpsTitle="EPS" +EpsDescription = "" +EpsIconUrl = "" + +GiropayTitle="Giropay" +GiropayDescription = "" +GiropayIconUrl = "" + +IDealTitle="iDeal" +IDealDescription = "" +IDealIconUrl = "" + +InvoiceTitle="Invoice" +InvoiceDescription = "" +InvoiceIconUrl = "" + +MasterPassTitle="MasterPass" +MasterPassDescription = "" +MasterPassIconUrl = "" + +OnlineBankingTitle="Online Banking" +OnlineBankingDescription = "" +OnlineBankingIconUrl = "" + +PayboxTitle="PayBox" +PayboxDescription = "" +PayboxIconUrl = "" + +PaydirektTitle="Pay Direkt" +PaydirektDescription = "" +PaydirektIconUrl = "" + +PayPalTitle="PayPal" +PayPalDescription = "" +PayPalIconUrl = "" + +PaylibTitle="Paylib" +PaylibDescription = "" +PaylibIconUrl = "" + +PaysafecardTitle="PaySafecard" +PaysafecardDescription = "" +PaysafecardIconUrl = "" + +PoliTitle="POLi" +PoliIconUrl = "" +PoliDescription = "" + +Przelewy24Title="Przelewy24" +Przelewy24Description = "" +Przelewy24IconUrl = "" + +QiwiTitle="QIWI" +QiwiDescription = "" +QiwiIconUrl = "" + +SkrillTitle="Skrill" +SkrillDescription = "" +SkrillIconUrl = "" + +SofortBankingTitle="SOFORT Banking" +SofortBankingDescription = "" +SofortBankingIconUrl = "" + +TenpayTitle="TenPay" +TenpayDescription = "" +TenpayIconUrl = "" + +TrustlyTitle="Trustly" +TrustlyDescription = "" +TrustlyIconUrl = "" + +TwintTitle="TWINT" +TwintDescription = "" +TwintIconUrl = "" diff --git a/resources/lang/it/Payment.properties b/resources/lang/it/Payment.properties new file mode 100644 index 0000000..4fd8b4f --- /dev/null +++ b/resources/lang/it/Payment.properties @@ -0,0 +1,103 @@ +AliPayTitle="AliPay" +AliPayDescription = "" +AliPayIconUrl = "" + +BankTransferTitle="Bank Transfer" +BankTransferDescription = "" +BankTransferIconUrl = "" + +CashuTitle="CASHU" +CashuDescription = "" +CashuIconUrl = "" + +CreditDebitCardTitle="Credit / Debit Card" +CreditDebitCardDescription = "" +CreditDebitCardIconUrl = "" + +DaoPayTitle="DaoPay" +DaoPayDescription = "" +DaoPayIconUrl = "" + +DirectDebitSepaTitle="Direct Debit (SEPA)" +DirectDebitSepaDescription = "" +DirectDebitSepaIconUrl = "" + +DirectDebitUkTitle="Debit Debit (UK)" +DirectDebitUkDescription = "" +DirectDebitUkIconUrl = "" + +EpsTitle="EPS" +EpsDescription = "" +EpsIconUrl = "" + +GiropayTitle="Giropay" +GiropayDescription = "" +GiropayIconUrl = "" + +IDealTitle="iDeal" +IDealDescription = "" +IDealIconUrl = "" + +InvoiceTitle="Invoice" +InvoiceDescription = "" +InvoiceIconUrl = "" + +MasterPassTitle="MasterPass" +MasterPassDescription = "" +MasterPassIconUrl = "" + +OnlineBankingTitle="Online Banking" +OnlineBankingDescription = "" +OnlineBankingIconUrl = "" + +PayboxTitle="PayBox" +PayboxDescription = "" +PayboxIconUrl = "" + +PaydirektTitle="Pay Direkt" +PaydirektDescription = "" +PaydirektIconUrl = "" + +PayPalTitle="PayPal" +PayPalDescription = "" +PayPalIconUrl = "" + +PaylibTitle="Paylib" +PaylibDescription = "" +PaylibIconUrl = "" + +PaysafecardTitle="PaySafecard" +PaysafecardDescription = "" +PaysafecardIconUrl = "" + +PoliTitle="POLi" +PoliIconUrl = "" +PoliDescription = "" + +Przelewy24Title="Przelewy24" +Przelewy24Description = "" +Przelewy24IconUrl = "" + +QiwiTitle="QIWI" +QiwiDescription = "" +QiwiIconUrl = "" + +SkrillTitle="Skrill" +SkrillDescription = "" +SkrillIconUrl = "" + +SofortBankingTitle="SOFORT Banking" +SofortBankingDescription = "" +SofortBankingIconUrl = "" + +TenpayTitle="TenPay" +TenpayDescription = "" +TenpayIconUrl = "" + +TrustlyTitle="Trustly" +TrustlyDescription = "" +TrustlyIconUrl = "" + +TwintTitle="TWINT" +TwintDescription = "" +TwintIconUrl = "" diff --git a/src/Methods/AlipayPaymentMethod.php b/src/Methods/AlipayPaymentMethod.php index cc4f8c8..75915fc 100644 --- a/src/Methods/AlipayPaymentMethod.php +++ b/src/Methods/AlipayPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class AlipayPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.alipay_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::AliPay.AliPayTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,10 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.alipay_description'); + $translator = pluginApp(Translator::class); + $title = $translator->trans('wallee::AliPay.AliPayDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +76,10 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.alipay_icon_url'); + $translator = pluginApp(Translator::class); + $iconUrl = $translator->trans('wallee::AliPay.AliPayIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/BankTransferPaymentMethod.php b/src/Methods/BankTransferPaymentMethod.php index b4b0a05..01b023c 100644 --- a/src/Methods/BankTransferPaymentMethod.php +++ b/src/Methods/BankTransferPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class BankTransferPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.banktransfer_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.BankTransferTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.banktransfer_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.BankTransferDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.banktransfer_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.BankTransferIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/CashuPaymentMethod.php b/src/Methods/CashuPaymentMethod.php index 8111184..712c0dd 100644 --- a/src/Methods/CashuPaymentMethod.php +++ b/src/Methods/CashuPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class CashuPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.cashu_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.CashuTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.cashu_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.CashuDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.cashu_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.CashuIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/CreditDebitCardPaymentMethod.php b/src/Methods/CreditDebitCardPaymentMethod.php index 31f751f..f54c18b 100644 --- a/src/Methods/CreditDebitCardPaymentMethod.php +++ b/src/Methods/CreditDebitCardPaymentMethod.php @@ -1,8 +1,12 @@ configRepo->get('wallee.creditcard_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.CreditDebitCardTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -53,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.creditcard_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.CreditDebitCardDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -68,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.creditcard_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.CreditDebitCardIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/DaoPayPaymentMethod.php b/src/Methods/DaoPayPaymentMethod.php index 77af066..c0b2506 100644 --- a/src/Methods/DaoPayPaymentMethod.php +++ b/src/Methods/DaoPayPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class DaoPayPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.daopay_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.DaoPayTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.daopay_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.DaoPayDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.daopay_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.DaoPayIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/DirectDebitSepaPaymentMethod.php b/src/Methods/DirectDebitSepaPaymentMethod.php index a4b574c..802b298 100644 --- a/src/Methods/DirectDebitSepaPaymentMethod.php +++ b/src/Methods/DirectDebitSepaPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class DirectDebitSepaPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.directdebitsepa_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.DirectDebitSepaTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.directdebitsepa_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.DirectDebitSepaDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.directdebitsepa_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.DirectDebitSepaIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/DirectDebitUkPaymentMethod.php b/src/Methods/DirectDebitUkPaymentMethod.php index 5c467c2..b8e3edf 100644 --- a/src/Methods/DirectDebitUkPaymentMethod.php +++ b/src/Methods/DirectDebitUkPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class DirectDebitUkPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.directdebituk_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.DirectDebitUkTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.directdebituk_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.DirectDebitUkDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.directdebituk_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.DirectDebitUkIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/EpsPaymentMethod.php b/src/Methods/EpsPaymentMethod.php index aa240c1..6848e8f 100644 --- a/src/Methods/EpsPaymentMethod.php +++ b/src/Methods/EpsPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class EpsPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.eps_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.EpsTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.eps_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.EpsDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.eps_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.EpsIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/GiropayPaymentMethod.php b/src/Methods/GiropayPaymentMethod.php index 1b9d7a8..cf41e3b 100644 --- a/src/Methods/GiropayPaymentMethod.php +++ b/src/Methods/GiropayPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class GiropayPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.giropay_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.GiropayTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.giropay_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.GiropayDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.giropay_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.GiropayIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/IDealPaymentMethod.php b/src/Methods/IDealPaymentMethod.php index 153e767..d50be19 100644 --- a/src/Methods/IDealPaymentMethod.php +++ b/src/Methods/IDealPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class IDealPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.ideal_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.IDealTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.ideal_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.IDealDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.ideal_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.IDealIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/InvoicePaymentMethod.php b/src/Methods/InvoicePaymentMethod.php index e2d93e1..03d7cc7 100644 --- a/src/Methods/InvoicePaymentMethod.php +++ b/src/Methods/InvoicePaymentMethod.php @@ -1,8 +1,12 @@ configRepo->get('wallee.invoice_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.InvoiceTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -53,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.invoice_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.InvoiceDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -68,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.invoice_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.InvoiceIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/MasterPassPaymentMethod.php b/src/Methods/MasterPassPaymentMethod.php index e347589..72a3dd0 100644 --- a/src/Methods/MasterPassPaymentMethod.php +++ b/src/Methods/MasterPassPaymentMethod.php @@ -1,8 +1,12 @@ configRepo->get('wallee.masterpass_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.MasterPassTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -53,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.masterpass_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.MasterPassDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -68,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.masterpass_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.MasterPassIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/OnlineBankingPaymentMethod.php b/src/Methods/OnlineBankingPaymentMethod.php index 4f0eea1..d5e6eac 100644 --- a/src/Methods/OnlineBankingPaymentMethod.php +++ b/src/Methods/OnlineBankingPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class OnlineBankingPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.onlinebanking_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.OnlineBankingTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.onlinebanking_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.OnlineBankingDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.onlinebanking_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.OnlineBankingIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/PayPalPaymentMethod.php b/src/Methods/PayPalPaymentMethod.php index 3d288df..7d24212 100644 --- a/src/Methods/PayPalPaymentMethod.php +++ b/src/Methods/PayPalPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class PayPalPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paypal_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PayPalTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paypal_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PayPalDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.paypal_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.PayPalIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/PayboxPaymentMethod.php b/src/Methods/PayboxPaymentMethod.php index 472b16f..d049d28 100644 --- a/src/Methods/PayboxPaymentMethod.php +++ b/src/Methods/PayboxPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class PayboxPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paybox_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PayboxTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paybox_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PayboxDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.paybox_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.PayboxIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/PaydirektPaymentMethod.php b/src/Methods/PaydirektPaymentMethod.php index aa87e94..f8b8b31 100644 --- a/src/Methods/PaydirektPaymentMethod.php +++ b/src/Methods/PaydirektPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class PaydirektPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paydirekt_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PaydirektTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paydirekt_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PaydirektDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.paydirekt_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.PaydirektIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/PaylibPaymentMethod.php b/src/Methods/PaylibPaymentMethod.php index 35849b4..3ffd608 100644 --- a/src/Methods/PaylibPaymentMethod.php +++ b/src/Methods/PaylibPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class PaylibPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paylib_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PaylibTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paylib_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PaylibDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.paylib_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.PaylibIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/PaysafecardPaymentMethod.php b/src/Methods/PaysafecardPaymentMethod.php index c438f31..a3bbdb5 100644 --- a/src/Methods/PaysafecardPaymentMethod.php +++ b/src/Methods/PaysafecardPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class PaysafecardPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paysafecard_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PaysafecardTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.paysafecard_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PaysafecardDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.paysafecard_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.PaysafecardIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/PoliPaymentMethod.php b/src/Methods/PoliPaymentMethod.php index 5a30a36..15d54b5 100644 --- a/src/Methods/PoliPaymentMethod.php +++ b/src/Methods/PoliPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class PoliPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.poli_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PoliTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.poli_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.PoliDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.poli_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.PoliIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/Przelewy24PaymentMethod.php b/src/Methods/Przelewy24PaymentMethod.php index da3ef0e..fb1444c 100644 --- a/src/Methods/Przelewy24PaymentMethod.php +++ b/src/Methods/Przelewy24PaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class Przelewy24PaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.przelewy24_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.Przelewy24Title', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.przelewy24_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.Przelewy24Description', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.przelewy24_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.Przelewy24IconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/QiwiPaymentMethod.php b/src/Methods/QiwiPaymentMethod.php index 2f4dd73..1ed3f89 100644 --- a/src/Methods/QiwiPaymentMethod.php +++ b/src/Methods/QiwiPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class QiwiPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.qiwi_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.QiwiTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.qiwi_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.QiwiDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.qiwi_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.QiwiIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/SkrillPaymentMethod.php b/src/Methods/SkrillPaymentMethod.php index 49044a9..6e71557 100644 --- a/src/Methods/SkrillPaymentMethod.php +++ b/src/Methods/SkrillPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class SkrillPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.skrill_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.SkrillTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.skrill_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.SkrillDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.skrill_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.SkrillIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/SofortBankingPaymentMethod.php b/src/Methods/SofortBankingPaymentMethod.php index 15e738e..efadef4 100644 --- a/src/Methods/SofortBankingPaymentMethod.php +++ b/src/Methods/SofortBankingPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class SofortBankingPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.sofortbanking_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.SofortBankingTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.sofortbanking_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.SofortBankingDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.sofortbanking_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.SofortBankingIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/TenpayPaymentMethod.php b/src/Methods/TenpayPaymentMethod.php index ebbdcb5..05f2c2b 100644 --- a/src/Methods/TenpayPaymentMethod.php +++ b/src/Methods/TenpayPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class TenpayPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.tenpay_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.TenpayTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.tenpay_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.TenpayDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.tenpay_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.TenpayIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/TrustlyPaymentMethod.php b/src/Methods/TrustlyPaymentMethod.php index 7fe9bcf..29678cd 100644 --- a/src/Methods/TrustlyPaymentMethod.php +++ b/src/Methods/TrustlyPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class TrustlyPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.trustly_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.TrustlyTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.trustly_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.TrustlyDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.trustly_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.TrustlyIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Methods/TwintPaymentMethod.php b/src/Methods/TwintPaymentMethod.php index 29f4101..1d5f6ad 100644 --- a/src/Methods/TwintPaymentMethod.php +++ b/src/Methods/TwintPaymentMethod.php @@ -2,6 +2,7 @@ namespace Wallee\Methods; use Plenty\Plugin\Log\Loggable; +use Plenty\Plugin\Translation\Translator; class TwintPaymentMethod extends AbstractPaymentMethod { @@ -26,9 +27,12 @@ public function isActive(): bool * * @return string */ - public function getName(): string + public function getName(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.twint_title'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.TwintTitle', [], $lang); if (! empty($title)) { return $title; } else { @@ -56,9 +60,12 @@ public function getFee(): float * * @return string */ - public function getDescription(): string + public function getDescription(string $lang = 'de'): string { - $title = $this->configRepo->get('wallee.twint_description'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $title = $translator->trans('wallee::Payment.TwintDescription', [], $lang); if (! empty($title)) { return $title; } else { @@ -71,9 +78,12 @@ public function getDescription(): string * * @return string */ - public function getIcon(): string + public function getIcon(string $lang = 'de'): string { - $iconUrl = $this->configRepo->get('wallee.twint_icon_url'); + /** @var Translator $translator */ + $translator = pluginApp(Translator::class); + + $iconUrl = $translator->trans('wallee::Payment.TwintIconUrl', [], $lang); if (!empty($iconUrl)) { return $iconUrl; } else { diff --git a/src/Services/WalleeSdkService.php b/src/Services/WalleeSdkService.php index d6e8b83..7df5540 100644 --- a/src/Services/WalleeSdkService.php +++ b/src/Services/WalleeSdkService.php @@ -7,7 +7,7 @@ class WalleeSdkService { - const GATEWAY_BASE_PATH = 'https://app-wallee.com/'; + const GATEWAY_BASE_PATH = 'https://app-wallee.com'; /** * diff --git a/translation.json b/translation.json new file mode 100644 index 0000000..64ab893 --- /dev/null +++ b/translation.json @@ -0,0 +1,7 @@ +{ + "sections":[], + "ignoredTranslationFiles": + [ + "Config.properties" + ] +}