From 758e24e5e9f964d572ea88dec002824470aae428 Mon Sep 17 00:00:00 2001 From: Stefan Mueller Date: Wed, 15 Jan 2025 09:53:32 +0100 Subject: [PATCH] SW-458: removed Trustly and Maestro international * remove unused DB columns from payone config --- Frontend/MoptPaymentPayone/Bootstrap.php | 9 +- .../Components/Classes/PayoneConfig.php | 4 - .../Components/Classes/PayoneFormHandler.php | 40 ----- .../Classes/PayoneInstallHelper.php | 166 +++++++++++------- .../Components/Classes/PayoneParamBuilder.php | 18 +- .../Classes/PayonePaymentHelper.php | 23 --- .../Payone/Api/Enum/CreditcardType.php | 6 - .../Api/Enum/OnlinebanktransferType.php | 1 - .../Controllers/Backend/MoptConfigPayone.php | 1 - .../Frontend/MoptPaymentPayone.php | 47 ----- .../MoptPayoneConfig/MoptPayoneConfig.php | 21 --- .../backend/mopt_config_payone/main.ini | 4 - .../Subscribers/FrontendPostDispatch.php | 5 - .../backend/fc_payone/ajaxgeneralconfig.tpl | 10 -- .../mopt_config_payone/model/config.js | 1 - .../mopt_config_payone/view/main/detail.js | 13 -- .../payment/mopt_paymentmean_trustly.tpl | 39 ---- 17 files changed, 108 insertions(+), 300 deletions(-) delete mode 100755 Frontend/MoptPaymentPayone/Views/frontend/plugins/payment/mopt_paymentmean_trustly.tpl diff --git a/Frontend/MoptPaymentPayone/Bootstrap.php b/Frontend/MoptPaymentPayone/Bootstrap.php index fa9dffed..d722a37e 100755 --- a/Frontend/MoptPaymentPayone/Bootstrap.php +++ b/Frontend/MoptPaymentPayone/Bootstrap.php @@ -159,6 +159,8 @@ public function install() $this->removePayment('mopt_payone__ewallet_paydirekt'); $this->removePayment('mopt_payone__ibt_giropay'); $this->removePayment('mopt_payone__csh_barzahlen'); + $this->removePayment('mopt_payone__ibt_trustly'); + $this->removePayment('mopt_payone__cc_maestro_international'); // Only relevant for update, not for reinstall if (!$this->doesCronJobExist('PayoneTransactionForward') && !$this->doesCronJobExist('Shopware_CronJob_PayoneTransactionForward')) { @@ -795,9 +797,6 @@ protected function createDatabase() // Add config field for global Ratepay SnippetId setting. $this->getInstallHelper()->checkAndAddRatepaySnippetIdColumn(); - // Add config field for trustly show iban bic setting. - $this->getInstallHelper()->checkAndAddTrustlyShowIbanBic(); - // Applepay fields $this->getInstallHelper()->checkAndAddApplepayConfig(); @@ -843,6 +842,10 @@ protected function createDatabase() $this->getInstallHelper()->checkAndAddPaypalV2ButtonShape(); + $this->getInstallHelper()->checkAndRemovePaydirektExtension(); + + $this->getInstallHelper()->checkAndRemoveTrustlyExtension(); + } /** diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneConfig.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneConfig.php index cdfdf6bd..be34693c 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneConfig.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneConfig.php @@ -30,7 +30,6 @@ class Mopt_PayoneConfig 'mopt_payone__cc_carte_blue', 'mopt_payone__cc_diners_club', 'mopt_payone__cc_jcb', - 'mopt_payone__cc_maestro_international', 'mopt_payone__cc_china_union', 'mopt_payone__ibt_sofortueberweisung', 'mopt_payone__ibt_eps', @@ -57,7 +56,6 @@ class Mopt_PayoneConfig 'mopt_payone__ibt_bancontact', 'mopt_payone__ewallet_amazon_pay', 'mopt_payone__ewallet_alipay', - 'mopt_payone__ibt_trustly', 'mopt_payone__ewallet_wechatpay', 'mopt_payone__fin_payone_secured_invoice', 'mopt_payone__fin_payone_secured_installment', @@ -82,7 +80,6 @@ class Mopt_PayoneConfig 'mopt_payone__cc_carte_blue', 'mopt_payone__cc_diners_club', 'mopt_payone__cc_jcb', - 'mopt_payone__cc_maestro_international', 'mopt_payone__cc_china_union', 'mopt_payone__ibt_sofortueberweisung', 'mopt_payone__ibt_eps', @@ -107,7 +104,6 @@ class Mopt_PayoneConfig 'mopt_payone__acc_payone_safe_invoice', 'mopt_payone__ibt_bancontact', 'mopt_payone__ewallet_alipay', - 'mopt_payone__ibt_trustly', 'mopt_payone__ewallet_wechatpay', ]; diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php index a21008ab..e711189e 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php @@ -118,10 +118,6 @@ public function processPaymentForm($paymentId, $formData, $paymentHelper) return $this->proccessPayoneSafeInvoice($formData); } - if ($paymentHelper->isPayoneTrustly($paymentId)) { - return $this->proccessPayoneTrustly($formData); - } - if ($paymentHelper->isPayoneSecuredInvoice($paymentId)) { return $this->proccessPayoneSecuredInvoice($formData); } @@ -834,42 +830,6 @@ protected function proccessPayoneSafeInvoice($formData) return $paymentData; } - /** - * process form data - * - * @param array $formData - * @return array - */ - protected function proccessPayoneTrustly($formData) - { - $paymentData = array(); - - if ($formData['mopt_payone__trustly_show_iban_bic'] == "1") { - if (!$formData['mopt_payone__trustly_iban'] || !$this->isValidIban($formData['mopt_payone__trustly_iban'])) { - $paymentData['sErrorFlag']['mopt_payone__trustly_iban'] = true; - } else { - $paymentData['formData']['mopt_payone__trustly_iban'] = $formData['mopt_payone__trustly_iban']; - } - - if (!$formData['mopt_payone__trustly_bic'] || !$this->isValidBic($formData['mopt_payone__trustly_bic']) ) { - $paymentData['sErrorFlag']['mopt_payone__trustly_bic'] = true; - } else { - $paymentData['formData']['mopt_payone__trustly_bic'] = $formData['mopt_payone__trustly_bic']; - } - - if (!empty($paymentData['sErrorFlag']) && count($paymentData['sErrorFlag'])) { - return $paymentData; - } - - } - - $paymentData['formData']['mopt_payone__onlinebanktransfertype'] = Payone_Api_Enum_OnlinebanktransferType::TRUSTLY; - - $this->setFormSubmittedFlag(); - - return $paymentData; - } - /** * process form data * diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneInstallHelper.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneInstallHelper.php index 9f792836..2f5ac651 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneInstallHelper.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneInstallHelper.php @@ -409,181 +409,171 @@ public function mopt_payone__getPaymentMethods() 'description' => 'PAYONE JCB', 'template' => 'mopt_paymentmean_creditcard.tpl', 'position' => 7,], - [ - 'name' => 'mopt_payone__cc_maestro_international', - 'description' => 'PAYONE Maestro International', - 'template' => 'mopt_paymentmean_creditcard.tpl', - 'position' => 8,], [ 'name' => 'mopt_payone__cc_china_union', 'description' => 'PAYONE China Union Pay', 'template' => 'mopt_paymentmean_creditcard.tpl', - 'position' => 9,], + 'position' => 8,], [ 'name' => 'mopt_payone__ibt_sofortueberweisung', 'description' => 'PAYONE SOFORT Überweisung', 'template' => 'mopt_paymentmean_sofort.tpl', - 'position' => 10,], + 'position' => 9,], [ 'name' => 'mopt_payone__ibt_eps', 'description' => 'PAYONE eps', 'template' => 'mopt_paymentmean_eps.tpl', - 'position' => 11,], + 'position' => 10,], [ 'name' => 'mopt_payone__ibt_post_efinance', 'description' => 'PAYONE Post-Finance EFinance', 'template' => null, - 'position' => 12,], + 'position' => 11,], [ 'name' => 'mopt_payone__ibt_post_finance_card', 'description' => 'PAYONE Post-Finance Card', 'template' => null, - 'position' => 13,], + 'position' => 12,], [ 'name' => 'mopt_payone__ibt_ideal', 'description' => 'PAYONE iDeal', 'template' => 'mopt_paymentmean_ideal.tpl', - 'position' => 14,], + 'position' => 13,], [ 'name' => 'mopt_payone__ewallet_paypal', 'description' => 'PAYONE PayPal', 'template' => null, - 'position' => 15,], + 'position' => 14,], [ 'name' => 'mopt_payone__acc_debitnote', 'description' => 'PAYONE Lastschrift', 'template' => 'mopt_paymentmean_debit.tpl', - 'position' => 16,], + 'position' => 15,], [ 'name' => 'mopt_payone__acc_invoice', 'description' => 'PAYONE Offene Rechnung', 'template' => null, - 'position' => 17,], + 'position' => 16,], [ 'name' => 'mopt_payone__acc_payinadvance', 'description' => 'PAYONE Vorkasse', 'template' => null, - 'position' => 18,], + 'position' => 17,], [ 'name' => 'mopt_payone__acc_cashondel', 'description' => 'PAYONE Nachnahme', 'template' => null, - 'position' => 19,], + 'position' => 18,], [ 'name' => 'mopt_payone__fin_kis_klarna_installments', 'description' => 'PAYONE Klarna Slice It', 'template' => 'mopt_paymentmean_klarna.tpl', - 'position' => 20,], + 'position' => 19,], [ 'name' => 'mopt_payone__fin_kiv_klarna_invoice', 'description' => 'PAYONE Klarna Pay Later', 'template' => 'mopt_paymentmean_klarna.tpl', - 'position' => 21,], + 'position' => 20,], [ 'name' => 'mopt_payone__fin_kdd_klarna_direct_debit', 'description' => 'PAYONE Klarna Pay Now', 'template' => 'mopt_paymentmean_klarna.tpl', - 'position' => 22,], + 'position' => 21,], [ 'name' => 'mopt_payone__ibt_p24', 'description' => 'PAYONE P24', 'template' => null, - 'position' => 23,], + 'position' => 22,], [ 'name' => 'mopt_payone__fin_payolution_invoice', 'description' => 'PAYONE Unzer Rechnungskauf', 'template' => 'mopt_paymentmean_payolution_invoice.tpl', - 'position' => 25,], + 'position' => 23,], [ 'name' => 'mopt_payone__fin_payolution_debitnote', - 'description' => 'PAYONE Unzer Lastschrift', + 'description' => 'PAYONE Unzer lsLastschrift', 'template' => 'mopt_paymentmean_payolution_debitnote.tpl', - 'position' => 26,], + 'position' => 24,], [ 'name' => 'mopt_payone__fin_payolution_installment', 'description' => 'PAYONE Unzer Ratenkauf', 'template' => 'mopt_paymentmean_payolution_installment.tpl', - 'position' => 27,], + 'position' => 25,], [ 'name' => 'mopt_payone__fin_ratepay_invoice', 'description' => 'PAYONE Ratepay Rechnungskauf', 'template' => 'mopt_paymentmean_ratepay_invoice.tpl', - 'position' => 28,], + 'position' => 26,], [ 'name' => 'mopt_payone__fin_ratepay_installment', 'description' => 'PAYONE Ratepay Ratenkauf', 'template' => 'mopt_paymentmean_ratepay_installment.tpl', - 'position' => 29,], + 'position' => 27,], [ 'name' => 'mopt_payone__fin_ratepay_direct_debit', 'description' => 'PAYONE Ratepay Lastschrift', 'template' => 'mopt_paymentmean_ratepay_direct_debit.tpl', - 'position' => 30,], + 'position' => 28,], [ 'name' => 'mopt_payone__acc_payone_safe_invoice', 'description' => 'PAYONE Rechnung mit Zahlungsgarantie', 'template' => 'mopt_paymentmean_payone_safe_invoice.tpl', - 'position' => 31,], + 'position' => 29,], [ 'name' => 'mopt_payone__ibt_bancontact', 'description' => 'PAYONE Bancontact', 'template' => 'mopt_paymentmean_bancontact.tpl', - 'position' => 32,], + 'position' => 30,], [ 'name' => 'mopt_payone__ewallet_amazon_pay', 'description' => 'PAYONE Amazon Pay', 'template' => 'mopt_paymentmean_amazon_ewallet.tpl', - 'position' => 33,], + 'position' => 31,], [ 'name' => 'mopt_payone__ewallet_alipay', 'description' => 'PAYONE AliPay', 'template' => 'mopt_paymentmean_alipay_ewallet.tpl', - 'position' => 34,], + 'position' => 32,], [ 'name' => 'mopt_payone__ewallet_wechatpay', 'description' => 'PAYONE WeChatPay', 'template' => null, - 'position' => 35,], - [ - 'name' => 'mopt_payone__ibt_trustly', - 'description' => 'PAYONE Trustly', - 'template' => 'mopt_paymentmean_trustly.tpl', - 'position' => 36,], + 'position' => 33,], [ 'name' => 'mopt_payone__ewallet_applepay', 'description' => 'PAYONE Apple Pay', 'template' => 'mopt_paymentmean_applepay.tpl', - 'position' => 37,], + 'position' => 34,], [ 'name' => 'mopt_payone__ewallet_paypal_express', 'description' => 'PAYONE PayPal Express', 'template' => null, - 'position' => 38,], + 'position' => 35,], [ 'name' => 'mopt_payone__fin_payone_secured_invoice', 'description' => 'PAYONE Gesicherter Rechnungskauf', 'template' => 'mopt_paymentmean_payone_secured_invoice.tpl', - 'position' => 39,], + 'position' => 36,], [ 'name' => 'mopt_payone__fin_payone_secured_installment', 'description' => 'PAYONE Gesicherter Ratenkauf', 'template' => 'mopt_paymentmean_payone_secured_installment.tpl', - 'position' => 40,], + 'position' => 37,], [ 'name' => 'mopt_payone__fin_payone_secured_directdebit', 'description' => 'PAYONE Gesicherte Lastschrift', 'template' => 'mopt_paymentmean_payone_secured_directdebit.tpl', - 'position' => 41,], + 'position' => 38,], [ 'name' => 'mopt_payone__ewallet_paypalv2', 'description' => 'PAYONE PayPal v2', 'template' => null, - 'position' => 42,], + 'position' => 39,], [ 'name' => 'mopt_payone__ewallet_paypal_expressv2', 'description' => 'PAYONE PayPal Express v2', 'template' => null, - 'position' => 43,], + 'position' => 40,], ]; } @@ -1835,28 +1825,6 @@ public function checkAndAddRatepaySnippetIdColumn() } - /** - * Checks if ratepay global snippetid column is present and creates - * column if not present. - * @return void - */ - public function checkAndAddTrustlyShowIbanBic() - { - $db = Shopware()->Db(); - $DBConfig = $db->getConfig(); - $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='s_plugin_mopt_payone_config' - AND TABLE_SCHEMA='" . $DBConfig['dbname'] . "' - AND COLUMN_NAME ='trustly_show_iban_bic'"; - $result = $db->query($sql); - - if ($result->rowCount() === 0) { - $sql = "ALTER TABLE `s_plugin_mopt_payone_config` " - . "ADD COLUMN `trustly_show_iban_bic` BOOLEAN NULL DEFAULT false;"; - $db->exec($sql); - } - - } - /** * Checks if applepay columns are present and creates * columns if not present. @@ -1996,6 +1964,72 @@ public function checkAndRemovePayPalLocaleModelExtension() } + /** + * check if paypal configuration is already extended lcoale + * + * @return void + */ + public function checkAndRemoveTrustlyExtension() + { + $db = Shopware()->Db(); + $DBConfig = $db->getConfig(); + $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='s_plugin_mopt_payone_config' + AND TABLE_SCHEMA='" . $DBConfig['dbname'] . "' + AND COLUMN_NAME ='trustly_show_iban_bic'"; + $result = $db->query($sql); + + if ($result->rowCount() > 0) { + $sql = "ALTER TABLE `s_plugin_mopt_payone_config` " + . "DROP COLUMN trustly_show_iban_bic;"; + $db->exec($sql); + } + + } + + /** + * check if paypal configuration is already extended lcoale + * + * @return void + */ + public function checkAndRemovePaydirektExtension() + { + $db = Shopware()->Db(); + $DBConfig = $db->getConfig(); + $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='s_plugin_mopt_payone_config' + AND TABLE_SCHEMA='" . $DBConfig['dbname'] . "' + AND COLUMN_NAME ='paydirekt_overcapture'"; + $result = $db->query($sql); + + if ($result->rowCount() > 0) { + $sql = "ALTER TABLE `s_plugin_mopt_payone_config` " + . "DROP COLUMN paydirekt_overcapture;"; + $db->exec($sql); + } + + $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='s_plugin_mopt_payone_config' + AND TABLE_SCHEMA='" . $DBConfig['dbname'] . "' + AND COLUMN_NAME ='paydirekt_order_secured'"; + $result = $db->query($sql); + + if ($result->rowCount() > 0) { + $sql = "ALTER TABLE `s_plugin_mopt_payone_config` " + . "DROP COLUMN paydirekt_order_secured;"; + $db->exec($sql); + } + + $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='s_plugin_mopt_payone_config' + AND TABLE_SCHEMA='" . $DBConfig['dbname'] . "' + AND COLUMN_NAME ='paydirekt_preauthorization_validity'"; + $result = $db->query($sql); + + if ($result->rowCount() > 0) { + $sql = "ALTER TABLE `s_plugin_mopt_payone_config` " + . "DROP COLUMN paydirekt_preauthorization_validity;"; + $db->exec($sql); + } + + } + /** * @return void */ diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php index e0c79e71..f58ebbc0 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php @@ -111,11 +111,10 @@ public function buildOrderCapture($order, $postionIds, $finalize, $includeShipme $business = new Payone_Api_Request_Parameter_Capture_Business(); if (($this->payonePaymentHelper->isPayonePayInAdvance($paymentName) || - $this->payonePaymentHelper->isPayoneInstantBankTransfer($paymentName)) && - ! $this->payonePaymentHelper->isPayoneTrustly($paymentName) + $this->payonePaymentHelper->isPayoneInstantBankTransfer($paymentName)) ) { $business->setSettleaccount($finalize ? Payone_Api_Enum_Settleaccount::YES : Payone_Api_Enum_Settleaccount::NO); - } elseif ($this->payonePaymentHelper->isPayoneInvoice($paymentName) || $this->payonePaymentHelper->isPayoneTrustly($paymentName) || $this->payonePaymentHelper->isPayoneWechatpay($paymentName) ) { + } elseif ($this->payonePaymentHelper->isPayoneInvoice($paymentName) || $this->payonePaymentHelper->isPayoneWechatpay($paymentName) ) { $business->setSettleaccount($finalize ? Payone_Api_Enum_Settleaccount::AUTO : Payone_Api_Enum_Settleaccount::NO); } else { $business->setSettleaccount(Payone_Api_Enum_Settleaccount::AUTO); @@ -1063,19 +1062,6 @@ public function getPaymentInstantBankTransfer($router, $paymentData) 'forceSecure' => true, 'appendSession' => false)); } - if ($paymentData['mopt_payone__onlinebanktransfertype'] == 'TRL') { - $params['onlinebanktransfertype'] = 'TRL'; - $params['bankcountry'] = 'DE'; - $params['iban'] = $this->removeWhitespaces($paymentData['mopt_payone__trustly_iban']); - $params['bic'] = $this->removeWhitespaces($paymentData['mopt_payone__trustly_bic']); - $params['successurl'] = $this->payonePaymentHelper->assembleTokenizedUrl($router, array('action' => 'success', - 'forceSecure' => true, 'appendSession' => false)); - $params['errorurl'] = $router->assemble(array('action' => 'failure', - 'forceSecure' => true, 'appendSession' => false)); - $params['backurl'] = $router->assemble(array('action' => 'cancel', - 'forceSecure' => true, 'appendSession' => false)); - } - $payment = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_OnlineBankTransfer($params); return $payment; } diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayonePaymentHelper.php b/Frontend/MoptPaymentPayone/Components/Classes/PayonePaymentHelper.php index 3efadb09..47f0f46f 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayonePaymentHelper.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayonePaymentHelper.php @@ -770,17 +770,6 @@ public function isPayoneAlipay($paymentName) return preg_match('#mopt_payone__ewallet_alipay#', $paymentName) ? true : false; } - /** - * check if given payment name is payone trustly payment - * - * @param string $paymentName - * @return boolean - */ - public function isPayoneTrustly($paymentName) - { - return preg_match('#mopt_payone__ibt_trustly#', $paymentName) ? true : false; - } - /** * check if given payment name is payone secured invoice * @@ -872,10 +861,6 @@ public function getOnlineBankTransferTypeFromPaymentName($paymentName) return Payone_Api_Enum_OnlinebanktransferType::P24; } - if ($this->isPayoneTrustly($paymentName)) { - return Payone_Api_Enum_OnlinebanktransferType::TRUSTLY; - } - return ''; } @@ -1415,19 +1400,12 @@ public function getActionFromPaymentName($paymentShortName) return 'finance'; } - if ($this->isPayoneBarzahlen($paymentShortName)) { - return 'barzahlen'; - } - if ($this->isPayoneAlipay($paymentShortName)) { return 'alipay'; } if ($this->isPayoneWechatpay($paymentShortName)) { return 'wechatpay'; } - if ($this->isPayoneTrustly($paymentShortName)) { - return 'trustly'; - } if ($this->isPayoneApplepay($paymentShortName)) { return 'applepay'; } @@ -1485,7 +1463,6 @@ public function groupCreditcards($paymentMeans) 'mopt_payone__cc_carte_blue' => 'b', 'mopt_payone__cc_diners_club' => 'd', 'mopt_payone__cc_jcb' => 'j', - 'mopt_payone__cc_maestro_international' => 'o', ); foreach ($paymentMeans as $key => $paymentmean) { diff --git a/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/CreditcardType.php b/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/CreditcardType.php index 8ade5c0c..f84d59d8 100755 --- a/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/CreditcardType.php +++ b/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/CreditcardType.php @@ -42,10 +42,4 @@ class Payone_Api_Enum_CreditcardType const DINERS = 'D'; //J: JCB const JCB = 'J'; - //O: Maestro International - const MAESTRO_INTERNATIONAL = 'O'; - //U: Maestro UK - const MAESTRO_UK = 'U'; - //B: Carte Bleue - const CARTE_BLEUE = 'B'; } diff --git a/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/OnlinebanktransferType.php b/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/OnlinebanktransferType.php index 2b0f02c7..c8224312 100755 --- a/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/OnlinebanktransferType.php +++ b/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/OnlinebanktransferType.php @@ -39,5 +39,4 @@ class Payone_Api_Enum_OnlinebanktransferType const IDEAL = 'IDL'; const P24 = 'P24'; const BANCONTACT = 'BCT'; - const TRUSTLY = 'TRL'; } diff --git a/Frontend/MoptPaymentPayone/Controllers/Backend/MoptConfigPayone.php b/Frontend/MoptPaymentPayone/Controllers/Backend/MoptConfigPayone.php index be9d60d3..a5938a7e 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Backend/MoptConfigPayone.php +++ b/Frontend/MoptPaymentPayone/Controllers/Backend/MoptConfigPayone.php @@ -169,7 +169,6 @@ protected function validateFormData($data = array()) 'sendOrdernumberAsReference', 'transLogging', 'changeOrderOnTXS', - 'trustlyShowIbanBic', 'applepayVisa', 'applepayMastercard', 'applepayGirocard', diff --git a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php index eb9408b2..33c38c64 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php +++ b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php @@ -285,12 +285,6 @@ public function alipayAction() $this->mopt_payone__handleRedirectFeedback($response); } - public function trustlyAction() - { - $response = $this->mopt_payone__instanttransfer(); - $this->mopt_payone__handleRedirectFeedback($response); - } - public function wechatpayAction() { $response = $this->mopt_payone__wechatpay(); @@ -790,43 +784,6 @@ protected function mopt_payone__alipay() return $response; } - /** - * @return Payone_Api_Response_Authorization_Approved|Payone_Api_Response_Preauthorization_Approved|Payone_Api_Response_Error|Payone_Api_Response_Invalid $response - */ - protected function mopt_payone__trustly() - { - $config = $this->moptPayoneMain->getPayoneConfig($this->getPaymentId()); - $recurringOrder = false; - $isInitialRecurringRequest = false; - $forceAuthorize = false; - - if ($this->isRecurringOrder() || $this->moptPayoneMain->getHelper()->isAboCommerceArticleInBasket()) { - $recurringOrder = true; - $forceAuthorize = true; - } - - if ($recurringOrder && !isset(Shopware()->Session()->moptIsTrustlyRecurringOrder)) { - $isInitialRecurringRequest = true; - $forceAuthorize = false; - } - - $payment = $this->moptPayoneMain->getParamBuilder()->getPaymentTrustly( - $this->Front()->Router(), - $isInitialRecurringRequest - ); - $response = $this->buildAndCallPayment( - $config, - 'wlt', - $payment, - false, - $recurringOrder, - $isInitialRecurringRequest, - $forceAuthorize - ); - - return $response; - } - /** * @return Payone_Api_Response_Authorization_Approved|Payone_Api_Response_Preauthorization_Approved|Payone_Api_Response_Error|Payone_Api_Response_Invalid $response */ @@ -1795,10 +1752,6 @@ public function recurringAction() Shopware()->Session()->moptIsAlipayRecurringOrder = true; } - if ($this->moptPayonePaymentHelper->isPayoneTrustly($this->getPaymentShortName())) { - Shopware()->Session()->moptIsTrustlyRecurringOrder = true; - } - $action = 'mopt_payone__' . $this->moptPayonePaymentHelper ->getActionFromPaymentName($this->getPaymentShortName()); diff --git a/Frontend/MoptPaymentPayone/Models/MoptPayoneConfig/MoptPayoneConfig.php b/Frontend/MoptPaymentPayone/Models/MoptPayoneConfig/MoptPayoneConfig.php index ac5f80b5..a30058cf 100755 --- a/Frontend/MoptPaymentPayone/Models/MoptPayoneConfig/MoptPayoneConfig.php +++ b/Frontend/MoptPaymentPayone/Models/MoptPayoneConfig/MoptPayoneConfig.php @@ -581,11 +581,6 @@ class MoptPayoneConfig extends ModelEntity */ private $ratepaySnippetId; - /** - * @ORM\Column(name="trustly_show_iban_bic", type="boolean", precision=0, scale=0, nullable=false, unique=false) - */ - private $trustlyShowIbanBic; - /** * @ORM\Column(name="applepay_merchant_id", type="string", nullable=true, unique=false) */ @@ -2395,22 +2390,6 @@ public function setRatepaySnippetId($ratepaySnippetId) $this->ratepaySnippetId = $ratepaySnippetId; } - /** - * @return mixed - */ - public function getTrustlyShowIbanBic() - { - return $this->trustlyShowIbanBic; - } - - /** - * @param $trustlyShowIbanBic - */ - public function setTrustlyShowIbanBic($trustlyShowIbanBic) - { - $this->trustlyShowIbanBic = $trustlyShowIbanBic; - } - public function getApplepayMerchantId() { return $this->applepayMerchantId; diff --git a/Frontend/MoptPaymentPayone/Snippets/backend/mopt_config_payone/main.ini b/Frontend/MoptPaymentPayone/Snippets/backend/mopt_config_payone/main.ini index a111b51f..a812000d 100755 --- a/Frontend/MoptPaymentPayone/Snippets/backend/mopt_config_payone/main.ini +++ b/Frontend/MoptPaymentPayone/Snippets/backend/mopt_config_payone/main.ini @@ -54,7 +54,6 @@ fieldlabel/shippingAddress = "Lieferadresse" fieldlabel/showAccountnumber = "Zusätzlich Kontonummer/Bankleitzahl anzeigen?" fieldlabel/showBIC = "Zusätzlich zur IBAN auch BIC abfragen?" fieldlabel/showSofortIbanBic = "Bei SOFORT Überweisung IBAN und BIC abfragen?" -fieldlabel/trustlyShowIbanBic = "Bei Trustly IBAN und BIC abfragen?" fieldlabel/subaccountId = "Subaccount-ID" fieldlabel/submitBasket = "Warenkorbübergabe" fieldlabel/paypalExpressUseDefaultShipping = "Vorläufige Versandkosten bei Paypal Express übergeben" @@ -109,7 +108,6 @@ fieldlabelhelp/changeOrderOnTXS = "Setze das changed Datum einer Bestellung, wen fieldlabelhelp/showAccountnumber = "Nur bei deutschen Konten können zusätzlich Kontonummer/Bankleitzahl angezeigt werden." fieldlabelhelp/showBIC = "Zusätzlich zur IBAN auch BIC abfragen?" fieldlabelhelp/showSofortIbanBic = "Bei SOFORT Überweisung IBAN und BIC abfragen?" -fieldlabelhelp/trustlyShowIbanBic = "Bei Trustly IBAN und BIC abfragen?" fieldlabelhelp/subaccountId = "ID des zu verwendenden SubAccounts" fieldlabelhelp/submitBasket = "Soll der Warenkorbinhalt an PAYONE übermittelt werden?" fieldvalue/authorisation = "Autorisierung" @@ -247,7 +245,6 @@ fieldlabel/shippingAddress = "shipping address" fieldlabel/showAccountnumber = "Additionally Show account number / bank code" fieldlabel/showBIC = "in addition to IBAN query also BIC?" fieldlabel/showSofortIbanBic = "query IBAN and BIC for SOFORT payments" -fieldlabel/trustlyShowIbanBic = "query IBAN and BIC for Trustly payments?" fieldlabel/subaccountId = "subaccount-id" fieldlabel/submitBasket = "basket handover" fieldlabel/allowDifferentAdresses = "allow different shipping addresses" @@ -300,7 +297,6 @@ fieldlabel/changeOrderOnTXS = "update order timestamp on notify" fieldlabelhelp/changeOrderOnTXS = "update changed timstamp when receiving PAYONE notifies. Only for SW 5.5.0 and alter"; fieldlabelhelp/showAccountnumber = "show bank-account-number and bank-code fields (only available for german bank accounts)" fieldlabelhelp/showBIC = "in addition to IBAN query also BIC?" -fieldlabelhelp/trustlyShowIbanBic = "query IBAN and BIC for Trustly payments?" fieldlabelhelp/subaccountId = "ID of your PAYONE subaccount" fieldlabelhelp/submitBasket = "should the content of the basket be send to PAYONE?" fieldvalue/authorisation = "authorisation" diff --git a/Frontend/MoptPaymentPayone/Subscribers/FrontendPostDispatch.php b/Frontend/MoptPaymentPayone/Subscribers/FrontendPostDispatch.php index 671534c3..9c27bdad 100755 --- a/Frontend/MoptPaymentPayone/Subscribers/FrontendPostDispatch.php +++ b/Frontend/MoptPaymentPayone/Subscribers/FrontendPostDispatch.php @@ -535,11 +535,6 @@ protected function moptPayoneCheckEnvironment($controllerName = false) $data['moptShowSofortIbanBic'] = $sofortConfig['showSofortIbanBic']; } - if ($moptPayoneMain->getPaymentHelper()->isPayoneTrustly($paymentMean['name'])) { - $trustlyConfig = $moptPayoneMain->getPayoneConfig($paymentMean['id']); - $data['moptTrustlyShowIbanBic'] = (int) $trustlyConfig['trustlyShowIbanBic']; - } - if ($moptPayoneMain->getPaymentHelper()->isPayoneApplepay($paymentMean['name'])) { $data['moptApplepayConfig'] = $moptPayoneMain->getPayoneConfig($paymentMean['id']); } diff --git a/Frontend/MoptPaymentPayone/Views/backend/fc_payone/ajaxgeneralconfig.tpl b/Frontend/MoptPaymentPayone/Views/backend/fc_payone/ajaxgeneralconfig.tpl index 9b5f9590..bb39e2ef 100755 --- a/Frontend/MoptPaymentPayone/Views/backend/fc_payone/ajaxgeneralconfig.tpl +++ b/Frontend/MoptPaymentPayone/Views/backend/fc_payone/ajaxgeneralconfig.tpl @@ -158,16 +158,6 @@
-