diff --git a/Frontend/MoptPaymentPayone/Bootstrap.php b/Frontend/MoptPaymentPayone/Bootstrap.php index 00b029a2..8354734d 100755 --- a/Frontend/MoptPaymentPayone/Bootstrap.php +++ b/Frontend/MoptPaymentPayone/Bootstrap.php @@ -156,6 +156,7 @@ public function install() $this->removePayment('mopt_payone__fin_billsafe'); $this->removePayment('mopt_payone__fin_paypal_installment'); $this->removePayment('mopt_payone__ewallet_paydirekt_express'); + $this->removePayment('mopt_payone__ibt_giropay'); // Only relevant for update, not for reinstall if (!$this->doesCronJobExist('PayoneTransactionForward') && !$this->doesCronJobExist('Shopware_CronJob_PayoneTransactionForward')) { @@ -597,6 +598,16 @@ protected function updatePayments() Shopware()->Models()->persist($payment); Shopware()->Models()->flush(); } + + /** @var Payment $payment */ + $payment = $this->Payments()->findOneBy( + array('name' => 'mopt_payone__ewallet_paydirekt') + ); + if ($payment) { + $payment->setDescription('PAYONE Giropay'); + Shopware()->Models()->persist($payment); + Shopware()->Models()->flush(); + } } @@ -808,6 +819,10 @@ protected function createDatabase() $this->getInstallHelper()->checkAndAddPaypalExpressUseDefaultShipping(); + $this->getInstallHelper()->checkAndAddPaydirektOrderSecured(); + + $this->getInstallHelper()->checkAndAddPaydirektPreauthorizationValidity(); + // Do not add/remove columns to s_plugin_mopt_payone_config, after PPE migration /** @var Payment $payment */ @@ -831,6 +846,11 @@ protected function createDatabase() $this->getInstallHelper()->checkAndUpdateAmazonPayShopModelExtension(); $this->getInstallHelper()->checkAndAddPaypalExpressUseDefaultShipping(); + + $this->getInstallHelper()->checkAndAddPaydirektOrderSecured(); + + $this->getInstallHelper()->checkAndAddPaydirektPreauthorizationValidity(); + $this->getInstallHelper()->moptCreateCreditcardPaymentDataTable(); } diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneConfig.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneConfig.php index e36714a9..445c1806 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneConfig.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneConfig.php @@ -33,7 +33,6 @@ class Mopt_PayoneConfig 'mopt_payone__cc_maestro_international', 'mopt_payone__cc_china_union', 'mopt_payone__ibt_sofortueberweisung', - 'mopt_payone__ibt_giropay', 'mopt_payone__ibt_eps', 'mopt_payone__ibt_post_efinance', 'mopt_payone__ibt_post_finance_card', @@ -84,7 +83,6 @@ class Mopt_PayoneConfig 'mopt_payone__cc_maestro_international', 'mopt_payone__cc_china_union', 'mopt_payone__ibt_sofortueberweisung', - 'mopt_payone__ibt_giropay', 'mopt_payone__ibt_eps', 'mopt_payone__ibt_post_efinance', 'mopt_payone__ibt_post_finance_card', diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php index cba26fa0..92946521 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php @@ -66,10 +66,6 @@ public function processPaymentForm($paymentId, $formData, $paymentHelper) return $this->proccessBancontact($formData); } - if ($paymentHelper->isPayoneGiropay($paymentId)) { - return $this->proccessGiropay($formData); - } - if ($paymentHelper->isPayoneEPS($paymentId)) { return $this->proccessEps($formData); } @@ -236,40 +232,6 @@ protected function proccessBancontact($formData) return $paymentData; } - /** - * process form data - * - * @param array $formData - * @return array - */ - protected function proccessGiropay($formData) - { - $paymentData = array(); - - if (!$formData['mopt_payone__giropay_iban'] || !$this->isValidIban($formData['mopt_payone__giropay_iban'])) { - $paymentData['sErrorFlag']['mopt_payone__giropay_iban'] = true; - } else { - $paymentData['formData']['mopt_payone__giropay_iban'] = $formData['mopt_payone__giropay_iban']; - } - - if (!$formData['mopt_payone__giropay_bic'] || !$this->isValidBic($formData['mopt_payone__giropay_bic']) ) { - $paymentData['sErrorFlag']['mopt_payone__giropay_bic'] = true; - } else { - $paymentData['formData']['mopt_payone__giropay_bic'] = $formData['mopt_payone__giropay_bic']; - } - - if (!empty($paymentData['sErrorFlag']) && count($paymentData['sErrorFlag'])) { - return $paymentData; - } - - $paymentData['formData']['mopt_payone__onlinebanktransfertype'] = Payone_Api_Enum_OnlinebanktransferType::GIROPAY; - $paymentData['formData']['mopt_payone__giropay_bankcountry'] = 'DE'; - - $this->setFormSubmittedFlag(); - - return $paymentData; - } - /** * process form data * diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneInstallHelper.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneInstallHelper.php index 69766ee6..752f66c2 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneInstallHelper.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneInstallHelper.php @@ -424,81 +424,76 @@ public function mopt_payone__getPaymentMethods() 'description' => 'PAYONE SOFORT Überweisung', 'template' => 'mopt_paymentmean_sofort.tpl', 'position' => 10,], - [ - 'name' => 'mopt_payone__ibt_giropay', - 'description' => 'PAYONE Giropay', - 'template' => 'mopt_paymentmean_giropay.tpl', - 'position' => 11,], [ 'name' => 'mopt_payone__ibt_eps', 'description' => 'PAYONE eps', 'template' => 'mopt_paymentmean_eps.tpl', - 'position' => 12,], + 'position' => 11,], [ 'name' => 'mopt_payone__ibt_post_efinance', 'description' => 'PAYONE Post-Finance EFinance', 'template' => null, - 'position' => 13,], + 'position' => 12,], [ 'name' => 'mopt_payone__ibt_post_finance_card', 'description' => 'PAYONE Post-Finance Card', 'template' => null, - 'position' => 14,], + 'position' => 13,], [ 'name' => 'mopt_payone__ibt_ideal', 'description' => 'PAYONE iDeal', 'template' => 'mopt_paymentmean_ideal.tpl', - 'position' => 15,], + 'position' => 14,], [ 'name' => 'mopt_payone__ewallet_paypal', 'description' => 'PAYONE PayPal', 'template' => null, - 'position' => 16,], + 'position' => 15,], [ 'name' => 'mopt_payone__acc_debitnote', 'description' => 'PAYONE Lastschrift', 'template' => 'mopt_paymentmean_debit.tpl', - 'position' => 17,], + 'position' => 16,], [ 'name' => 'mopt_payone__acc_invoice', 'description' => 'PAYONE Offene Rechnung', 'template' => null, - 'position' => 18,], + 'position' => 17,], [ 'name' => 'mopt_payone__acc_payinadvance', 'description' => 'PAYONE Vorkasse', 'template' => null, - 'position' => 19,], + 'position' => 18,], [ 'name' => 'mopt_payone__acc_cashondel', 'description' => 'PAYONE Nachnahme', 'template' => null, - 'position' => 20,], + 'position' => 19,], [ 'name' => 'mopt_payone__fin_kis_klarna_installments', 'description' => 'PAYONE Klarna Slice It', 'template' => 'mopt_paymentmean_klarna.tpl', - 'position' => 22,], + 'position' => 20,], [ 'name' => 'mopt_payone__fin_kiv_klarna_invoice', 'description' => 'PAYONE Klarna Pay Later', 'template' => 'mopt_paymentmean_klarna.tpl', - 'position' => 23,], + 'position' => 21,], [ 'name' => 'mopt_payone__fin_kdd_klarna_direct_debit', 'description' => 'PAYONE Klarna Pay Now', 'template' => 'mopt_paymentmean_klarna.tpl', - 'position' => 24,], + 'position' => 22,], [ 'name' => 'mopt_payone__ibt_p24', 'description' => 'PAYONE P24', 'template' => null, - 'position' => 25,], + 'position' => 23,], [ 'name' => 'mopt_payone__csh_barzahlen', 'description' => 'PAYONE Barzahlen', 'template' => null, - 'position' => 26, + 'position' => 24, 'additionalDescription' => '' @@ -520,92 +515,92 @@ public function mopt_payone__getPaymentMethods() 'name' => 'mopt_payone__ewallet_paydirekt', 'description' => 'PAYONE Paydirekt', 'template' => null, - 'position' => 27,], + 'position' => 25,], [ 'name' => 'mopt_payone__fin_payolution_invoice', 'description' => 'PAYONE Unzer Rechnungskauf', 'template' => 'mopt_paymentmean_payolution_invoice.tpl', - 'position' => 28,], + 'position' => 26,], [ 'name' => 'mopt_payone__fin_payolution_debitnote', 'description' => 'PAYONE Unzer Lastschrift', 'template' => 'mopt_paymentmean_payolution_debitnote.tpl', - 'position' => 29,], + 'position' => 27,], [ 'name' => 'mopt_payone__fin_payolution_installment', 'description' => 'PAYONE Unzer Ratenkauf', 'template' => 'mopt_paymentmean_payolution_installment.tpl', - 'position' => 30,], + 'position' => 28,], [ 'name' => 'mopt_payone__fin_ratepay_invoice', 'description' => 'PAYONE Ratepay Rechnungskauf', 'template' => 'mopt_paymentmean_ratepay_invoice.tpl', - 'position' => 31,], + 'position' => 29,], [ 'name' => 'mopt_payone__fin_ratepay_installment', 'description' => 'PAYONE Ratepay Ratenkauf', 'template' => 'mopt_paymentmean_ratepay_installment.tpl', - 'position' => 32,], + 'position' => 30,], [ 'name' => 'mopt_payone__fin_ratepay_direct_debit', 'description' => 'PAYONE Ratepay Lastschrift', 'template' => 'mopt_paymentmean_ratepay_direct_debit.tpl', - 'position' => 33,], + 'position' => 31,], [ 'name' => 'mopt_payone__acc_payone_safe_invoice', 'description' => 'PAYONE Rechnung mit Zahlungsgarantie', 'template' => 'mopt_paymentmean_payone_safe_invoice.tpl', - 'position' => 34,], + 'position' => 32,], [ 'name' => 'mopt_payone__ibt_bancontact', 'description' => 'PAYONE Bancontact', 'template' => 'mopt_paymentmean_bancontact.tpl', - 'position' => 35,], + 'position' => 33,], [ 'name' => 'mopt_payone__ewallet_amazon_pay', 'description' => 'PAYONE Amazon Pay', 'template' => 'mopt_paymentmean_amazon_ewallet.tpl', - 'position' => 36,], + 'position' => 34,], [ 'name' => 'mopt_payone__ewallet_alipay', 'description' => 'PAYONE AliPay', 'template' => 'mopt_paymentmean_alipay_ewallet.tpl', - 'position' => 37,], + 'position' => 35,], [ 'name' => 'mopt_payone__ewallet_wechatpay', 'description' => 'PAYONE WeChatPay', 'template' => null, - 'position' => 38,], + 'position' => 36,], [ 'name' => 'mopt_payone__ibt_trustly', 'description' => 'PAYONE Trustly', 'template' => 'mopt_paymentmean_trustly.tpl', - 'position' => 39,], + 'position' => 37,], [ 'name' => 'mopt_payone__ewallet_applepay', 'description' => 'PAYONE Apple Pay', 'template' => 'mopt_paymentmean_applepay.tpl', - 'position' => 40,], + 'position' => 38,], [ 'name' => 'mopt_payone__ewallet_paypal_express', 'description' => 'PAYONE PayPal Express', 'template' => null, - 'position' => 41,], + 'position' => 39,], [ 'name' => 'mopt_payone__fin_payone_secured_invoice', 'description' => 'PAYONE Gesicherter Rechnungskauf', 'template' => 'mopt_paymentmean_payone_secured_invoice.tpl', - 'position' => 42,], + 'position' => 40,], [ 'name' => 'mopt_payone__fin_payone_secured_installment', 'description' => 'PAYONE Gesicherter Ratenkauf', 'template' => 'mopt_paymentmean_payone_secured_installment.tpl', - 'position' => 43,], + 'position' => 41,], [ 'name' => 'mopt_payone__fin_payone_secured_directdebit', 'description' => 'PAYONE Gesicherte Lastschrift', 'template' => 'mopt_paymentmean_payone_secured_directdebit.tpl', - 'position' => 44,], + 'position' => 42,], ]; } @@ -2196,5 +2191,62 @@ public function checkAndAddPaypalExpressUseDefaultShipping() } } } + /** + * Checks if paypalExressUseDefaultShipping columns are present and creates + * columns if not present. + * + * @return void + * @throws Zend_Db_Adapter_Exception + * @throws Zend_Db_Statement_Exception + */ + public function checkAndAddPaydirektOrderSecured() + { + $textColumns = ['paydirekt_order_secured']; + $db = Shopware()->Db(); + $dbConfig = $db->getConfig(); + + foreach ($textColumns AS $column) { + $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='s_plugin_mopt_payone_config' + AND TABLE_SCHEMA = '{$dbConfig['dbname']}' + AND COLUMN_NAME = '$column'"; + + $result = $db->query($sql); + + if ($result->rowCount() === 0) { + $sql = "ALTER TABLE `s_plugin_mopt_payone_config` + ADD COLUMN `$column` TINYINT(1) NOT NULL DEFAULT 0;"; + $db->exec($sql); + } + } + } + + /** + * Checks if paypalExressUseDefaultShipping columns are present and creates + * columns if not present. + * + * @return void + * @throws Zend_Db_Adapter_Exception + * @throws Zend_Db_Statement_Exception + */ + public function checkAndAddPaydirektPreauthorizationValidity() + { + $textColumns = ['paydirekt_preauthorization_validity']; + $db = Shopware()->Db(); + $dbConfig = $db->getConfig(); + + foreach ($textColumns AS $column) { + $sql = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='s_plugin_mopt_payone_config' + AND TABLE_SCHEMA = '{$dbConfig['dbname']}' + AND COLUMN_NAME = '$column'"; + + $result = $db->query($sql); + + if ($result->rowCount() === 0) { + $sql = "ALTER TABLE `s_plugin_mopt_payone_config` + ADD COLUMN `$column` TINYINT(2) NOT NULL DEFAULT 0;"; + $db->exec($sql); + } + } + } } diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php index a90647f5..4f8baa03 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php @@ -1003,19 +1003,6 @@ public function getPaymentInstantBankTransfer($router, $paymentData) 'forceSecure' => true, 'appendSession' => false)); } - if ($paymentData['mopt_payone__onlinebanktransfertype'] == 'GPY') { - $params['onlinebanktransfertype'] = 'GPY'; - $params['bankcountry'] = $paymentData['mopt_payone__giropay_bankcountry']; - $params['iban'] = $this->removeWhitespaces($paymentData['mopt_payone__giropay_iban']); - $params['bic'] = $this->removeWhitespaces($paymentData['mopt_payone__giropay_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)); - } - if ($paymentData['mopt_payone__onlinebanktransfertype'] == 'EPS') { $params['onlinebanktransfertype'] = 'EPS'; $params['bankcountry'] = $paymentData['mopt_payone__eps_bankcountry']; diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayonePaymentHelper.php b/Frontend/MoptPaymentPayone/Components/Classes/PayonePaymentHelper.php index c2007071..ef53171d 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayonePaymentHelper.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayonePaymentHelper.php @@ -425,17 +425,6 @@ public function isPayoneBarzahlen($paymentName) return preg_match('#mopt_payone__csh_barzahlen#', $paymentName) ? true : false; } - /** - * check if given payment name is payone giropay payment - * - * @param string $paymentName - * @return boolean - */ - public function isPayoneGiropay($paymentName) - { - return preg_match('#mopt_payone__ibt_giropay#', $paymentName) ? true : false; - } - /** * check if given payment name is payone eps payment * @@ -889,10 +878,6 @@ public function getOnlineBankTransferTypeFromPaymentName($paymentName) return Payone_Api_Enum_OnlinebanktransferType::BANCONTACT; } - if ($this->isPayoneGiropay($paymentName)) { - return Payone_Api_Enum_OnlinebanktransferType::GIROPAY; - } - if ($this->isPayoneEPS($paymentName)) { return Payone_Api_Enum_OnlinebanktransferType::EPS_ONLINE_BANK_TRANSFER; } diff --git a/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/OnlinebanktransferType.php b/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/OnlinebanktransferType.php index bb203985..2b0f02c7 100755 --- a/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/OnlinebanktransferType.php +++ b/Frontend/MoptPaymentPayone/Components/Payone/Api/Enum/OnlinebanktransferType.php @@ -33,7 +33,6 @@ class Payone_Api_Enum_OnlinebanktransferType { const INSTANT_MONEY_TRANSFER = 'PNT'; - const GIROPAY = 'GPY'; const EPS_ONLINE_BANK_TRANSFER = 'EPS'; const POSTFINANCE_EFINANCE = 'PFF'; const POSTFINANCE_CARD = 'PFC'; diff --git a/Frontend/MoptPaymentPayone/Controllers/Backend/FcPayone.php b/Frontend/MoptPaymentPayone/Controllers/Backend/FcPayone.php index 2774918d..738f113c 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Backend/FcPayone.php +++ b/Frontend/MoptPaymentPayone/Controllers/Backend/FcPayone.php @@ -1415,6 +1415,12 @@ public function createPayoneConfig($options) if ($options['paypalExpressUseDefaultShipping'] == "true") { $data->setPaypalExpressUseDefaultShipping(1); } + if ($options['paydirektOrderSecured'] == "false") { + $data->setPaydirektOrderSecured(0); + } + if ($options['paydirektOrderSecured'] == "true") { + $data->setPaydirektOrderSecured(1); + } Shopware()->Models()->flush($data); return $data; diff --git a/Frontend/MoptPaymentPayone/Controllers/Backend/MoptConfigPayone.php b/Frontend/MoptPaymentPayone/Controllers/Backend/MoptConfigPayone.php index 69601b58..cc5f0b75 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Backend/MoptConfigPayone.php +++ b/Frontend/MoptPaymentPayone/Controllers/Backend/MoptConfigPayone.php @@ -177,6 +177,7 @@ protected function validateFormData($data = array()) 'applepayDebug', 'allowDifferentAddresses', 'paypalExpressUseDefaultShipping', + 'paydirektOrderSecured', ); foreach ($fields as $field) { diff --git a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php index d38ecfe4..702790d6 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php +++ b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php @@ -1457,15 +1457,32 @@ protected function buildAndCallPayment( $request->setPaydata($paydata); } - if ($config['paydirektOvercapture'] == 1 && $config['authorisationMethod'] == 'Vorautorisierung' && $this->moptPayonePaymentHelper->isPayonePaydirekt( + if ($config['authorisationMethod'] == 'Vorautorisierung' && $this->moptPayonePaymentHelper->isPayonePaydirekt( $paymentName )) { $paydirektdata = new Payone_Api_Request_Parameter_Paydata_Paydata(); - $paydirektdata->addItem( - new Payone_Api_Request_Parameter_Paydata_DataItem( - array('key' => 'over_capture', 'data' => 'yes') - ) - ); + if ($config['paydirektOrderSecured'] == 1) { + $paydirektdata->addItem( + new Payone_Api_Request_Parameter_Paydata_DataItem( + array('key' => 'order_secured', 'data' => 'yes') + ) + ); + if ($config['paydirektPreauthorizationValidity'] > 0) { + $paydirektdata->addItem( + new Payone_Api_Request_Parameter_Paydata_DataItem( + array('key' => 'preauthorization_validity', 'data' => $config['paydirektPreauthorizationValidity'] ) + ) + ); + + } + } + if ($config['paydirektOvercapture'] == 1) { + $paydirektdata->addItem( + new Payone_Api_Request_Parameter_Paydata_DataItem( + array('key' => 'over_capture', 'data' => 'yes') + ) + ); + } $request->setPaydata($paydirektdata); } if ($this->moptPayonePaymentHelper->isPayoneSafeInvoice($paymentName) || diff --git a/Frontend/MoptPaymentPayone/Models/MoptPayoneConfig/MoptPayoneConfig.php b/Frontend/MoptPaymentPayone/Models/MoptPayoneConfig/MoptPayoneConfig.php index 917c6910..4290c5d6 100755 --- a/Frontend/MoptPaymentPayone/Models/MoptPayoneConfig/MoptPayoneConfig.php +++ b/Frontend/MoptPaymentPayone/Models/MoptPayoneConfig/MoptPayoneConfig.php @@ -655,6 +655,16 @@ class MoptPayoneConfig extends ModelEntity */ private $paypalExpressUseDefaultShipping; + /** + * @ORM\Column(name="paydirekt_order_secured", type="boolean", precision=0, scale=0, nullable=false, unique=false, options={"default" : 0}) + */ + private $paydirektOrderSecured; + + /** + * @ORM\Column(name="paydirekt_preauthorization_validity", type="integer", nullable=true, unique=false) + */ + private $paydirektPreauthorizationValidity; + /** * @return mixed */ @@ -2604,4 +2614,20 @@ public function getPaypalExpressUseDefaultShipping() { return $this->paypalExpressUseDefaultShipping; } + public function setPaydirektOrderSecured($value) { + $this->paydirektOrderSecured = $value; + } + + public function getPaydirektOrderSecured() { + return $this->paydirektOrderSecured; + } + + public function setPaydirektPreauthorizationValidity($value) { + $this->paydirektPreauthorizationValidity = $value; + } + + public function getPaydirektPreauthorizationValidity() { + return $this->paydirektPreauthorizationValidity; + } + } diff --git a/Frontend/MoptPaymentPayone/Snippets/backend/mopt_config_payone/main.ini b/Frontend/MoptPaymentPayone/Snippets/backend/mopt_config_payone/main.ini index 18d592e7..eb18ca4d 100755 --- a/Frontend/MoptPaymentPayone/Snippets/backend/mopt_config_payone/main.ini +++ b/Frontend/MoptPaymentPayone/Snippets/backend/mopt_config_payone/main.ini @@ -58,6 +58,8 @@ 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" +fieldlabel/paydirektOrderSecured = "Giropay Gesicherte Vorbestellung" +fieldlabel/paydirektPreauthorizationValidity = "Giropay Garantiezeitraum" fieldlabel/applepayMerchantID = "Apple Pay MerchantId" fieldlabel/applepayVisa = "Apple Pay Visa erlauben" fieldlabel/applepayMastercard = "Apple Pay Mastercard erlauben" @@ -70,6 +72,8 @@ fieldlabel/applepayPrivateKeyPassword = "Apple Pay Private Key Passwort" fieldlabel/applepayDebug = "Apple Pay Debug" fieldlabelhelp/allowDifferentAdresses = "Hinweis: Muss im PAYONE-Konto freigeschaltet sein!" fieldlabelhelp/paypalExpressUseDefaultShipping = "Wenn aktiviert, werden die vorläufigen Versandkosten mit an Paypal Express übergeben" +fieldlabelhelp/paydirektOrderSecured = "Bei einer gesicherten Vorbestellung wird dem Händler eine Zahlungsgarantie für den gewählten Zeitraum (maximal 15 Kalendertage) gewährt. Captures (Teilzahlungen) müssen immer innerhalb des Garantiezeitraums ausgeführt werden." +fieldlabelhelp/paydirektPreauthorizationValidity = "Gewünschter Garantiezeitraum (maximal 15 Kalendertage) für eine gesicherte Vorbestellung" fieldlabelhelp/applepayMerchantID = "Ihre Apple Pay MerchantId" fieldlabelhelp/applepayVisa = "Erlaubt Visa Karten über Apple Pay" fieldlabelhelp/applepayMastercard = "Erlaubt Mastercard Karten über Apple Pay" @@ -240,6 +244,8 @@ fieldlabel/subaccountId = "subaccount-id" fieldlabel/submitBasket = "basket handover" fieldlabel/allowDifferentAdresses = "allow different shipping addresses" fieldlabel/paypalExpressUseDefaultShipping = "submit pre-calculated Paypal Express shipping costs" +fieldlabel/paydirektOrderSecured = "Giropay Secured pre-order" +fieldlabel/paydirektPreauthorizationValidity = "Giropay Guarantee period" fieldlabel/applepayMerchantID = "Apple Pay MerchantId" fieldlabel/applepayVisa = "allow Apple Pay Visa " fieldlabel/applepayMastercard = "allow Apple Pay Mastercard" @@ -252,6 +258,8 @@ fieldlabel/applepayPrivateKeyPassword = "Apple Pay private key password" fieldlabel/applepayDebug = "Apple Pay Debug" fieldlabelhelp/allowDifferentAdresses = "has to be enabled in the PAYONE account" fieldlabelhelp/paypalExpressUseDefaultShipping = "When active, submit the pre-calculated shipping costs to Paypal" +fieldlabelhelp/paydirektOrderSecured = "In the case of a secured pre-order, the retailer is granted a payment guarantee for the selected period (maximum 15 calendar days). Captures (partial payments) must always be executed within the guarantee period." +fieldlabelhelp/paydirektPreauthorizationValidity = "Desired guarantee period (maximum 15 calendar days) for a secured pre-order" fieldlabelhelp/applepayMerchantID = "Your Apple Pay MerchantId" fieldlabelhelp/applepayVisa = "allow Visa payments with Apple Pay" fieldlabelhelp/applepayMastercard = "allow Mastercard payments with Apple Pay" diff --git a/Frontend/MoptPaymentPayone/Views/backend/fc_payone/ajaxgeneralconfig.tpl b/Frontend/MoptPaymentPayone/Views/backend/fc_payone/ajaxgeneralconfig.tpl index 5c1bd805..2d2f8c00 100755 --- a/Frontend/MoptPaymentPayone/Views/backend/fc_payone/ajaxgeneralconfig.tpl +++ b/Frontend/MoptPaymentPayone/Views/backend/fc_payone/ajaxgeneralconfig.tpl @@ -333,6 +333,29 @@
+ + diff --git a/Frontend/MoptPaymentPayone/Views/backend/mopt_config_payone/model/config.js b/Frontend/MoptPaymentPayone/Views/backend/mopt_config_payone/model/config.js index ed6ceba9..aea7cb2b 100755 --- a/Frontend/MoptPaymentPayone/Views/backend/mopt_config_payone/model/config.js +++ b/Frontend/MoptPaymentPayone/Views/backend/mopt_config_payone/model/config.js @@ -127,6 +127,8 @@ Ext.define('Shopware.apps.MoptConfigPayone.model.Config', { { name: 'allowDifferentAddresses', type: 'boolean'}, { name: 'creditcardDefaultDescription', type: 'string'}, { name: 'paypalExpressUseDefaultShipping', type: 'boolean'}, + { name: 'paydirektOrderSecured', type: 'boolean'}, + { name: 'paydirektPreauthorizationValidity', type: 'int'}, ], /** * Validation diff --git a/Frontend/MoptPaymentPayone/Views/backend/mopt_config_payone/view/main/detail.js b/Frontend/MoptPaymentPayone/Views/backend/mopt_config_payone/view/main/detail.js index 7c86bd90..752ea071 100755 --- a/Frontend/MoptPaymentPayone/Views/backend/mopt_config_payone/view/main/detail.js +++ b/Frontend/MoptPaymentPayone/Views/backend/mopt_config_payone/view/main/detail.js @@ -124,7 +124,7 @@ Ext.define('Shopware.apps.MoptConfigPayone.view.main.Detail', { items: fieldsets, renderTo: document.body, width: 880, - height: 1400 + height: 1500 }]; }, activateField: function (me, field) { @@ -180,8 +180,12 @@ Ext.define('Shopware.apps.MoptConfigPayone.view.main.Detail', { ; if (field === 'paydirekt') { fieldset.items.getAt(23).enable(); + fieldset.items.getAt(39).enable(); + fieldset.items.getAt(40).enable(); } else { fieldset.items.getAt(23).disable(); + fieldset.items.getAt(39).disable(); + fieldset.items.getAt(40).disable(); } ; if (field === 'payonesecured') { @@ -1324,7 +1328,7 @@ Ext.define('Shopware.apps.MoptConfigPayone.view.main.Detail', { }, { xtype: 'combobox', - fieldLabel: '{s name="fieldlabel/paypalExpressUseDefaultShipping"}Vorläufigen Versandkosten beo Paypal Express übergeben{/s}', + fieldLabel: '{s name="fieldlabel/paypalExpressUseDefaultShipping"}Vorläufigen Versandkosten bei Paypal Express übergeben{/s}', helpText: '{s name="fieldlabelhelp/paypalExpressUseDefaultShipping"}Wenn aktiviert, werden die vorläufigen Versandkosten mit an Paypal Express übergeben{/s}', name: 'paypalExpressUseDefaultShipping', store: me.data.yesno, @@ -1335,6 +1339,30 @@ Ext.define('Shopware.apps.MoptConfigPayone.view.main.Detail', { disabled: false, labelWidth: 200 }, + { + xtype: 'combobox', + fieldLabel: '{s name="fieldlabel/paydirektOrderSecured"}Giropay Gesicherte Vorbestellung{/s}', + helpText: '{s name="fieldlabelhelp/paydirektOrderSecured"}Bei einer gesicherten Vorbestellung wird dem Händler eine Zahlungsgarantie für den gewählten Zeitraum (maximal 15 Kalendertage) gewährt. Captures (Teilzahlungen) müssen immer innerhalb des Garantiezeitraums ausgeführt werden.{/s}', + name: 'paydirektOrderSecured', + store: me.data.yesno, + queryMode: 'local', + displayField: 'display', + valueField: 'value', + allowBlank: false, + disabled: false, + labelWidth: 200 + }, + { + //creates Ext.form.field.Text input field + xtype: 'numberfield', + fieldLabel: '{s name="fieldlabel/paydirektPreauthorizationValidity"}Giropay Garantiezeitraum{/s}', + minValue: 1, + maxValue: 15, + helpText: '{s name="fieldlabelhelp/paydirektPreauthorizationValidity"}Gewünschter Garantiezeitraum (maximal 15 Kalendertage) für eine gesicherte Vorbestellung{/s}', + name: 'paydirektPreauthorizationValidity', + allowBlank: false, + labelWidth: 200 + }, ]; }, getPaymentStatus: function () { diff --git a/Frontend/MoptPaymentPayone/Views/frontend/plugins/payment/mopt_paymentmean_giropay.tpl b/Frontend/MoptPaymentPayone/Views/frontend/plugins/payment/mopt_paymentmean_giropay.tpl deleted file mode 100755 index 55a15688..00000000 --- a/Frontend/MoptPaymentPayone/Views/frontend/plugins/payment/mopt_paymentmean_giropay.tpl +++ /dev/null @@ -1,24 +0,0 @@ -{namespace name='frontend/MoptPaymentPayone/payment'} - -