diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php index da91b5ed..cba26fa0 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneFormHandler.php @@ -178,7 +178,7 @@ protected function proccessSofortueberweisung($formData) } } - if (!$formData['mopt_payone__sofort_bic'] && !$formData['mopt_payone__debit_show_sofort_iban_bic']==="") { + if (!$formData['mopt_payone__sofort_bic'] && !$formData['mopt_payone__sofort_show_sofort_iban_bic']==="") { $paymentData['sErrorFlag']['mopt_payone__sofort_bic'] = true; } else { if ($formData['mopt_payone__sofort_bic'] && !$this->isValidBic($formData['mopt_payone__sofort_bic'])){ @@ -776,7 +776,7 @@ protected function proccessRatepayInstallment($formData) $paymentData['formData']['mopt_payone__ratepay_shopid'] = $formData['mopt_payone__ratepay_installment_shopid']; $paymentData['formData']['mopt_payone__ratepay_installment_device_fingerprint'] = $formData['mopt_payone__ratepay_installment_device_fingerprint']; - $paymentData['formData']['mopt_payone__ratepay_installment_installment_amount'] = $formData['mopt_payone__ratepay_installment_amount']; + $paymentData['formData']['mopt_payone__ratepay_installment_amount'] = $formData['mopt_payone__ratepay_installment_amount']; $paymentData['formData']['mopt_payone__ratepay_installment_total'] = $formData['mopt_payone__ratepay_installment_total']; $paymentData['formData']['mopt_payone__ratepay_installment_last_installment_amount'] = $formData['mopt_payone__ratepay_installment_last_installment_amount']; $paymentData['formData']['mopt_payone__ratepay_installment_interest_rate'] = $formData['mopt_payone__ratepay_installment_interest_rate']; diff --git a/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php b/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php index ae73ab2e..275f8cd9 100755 --- a/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php +++ b/Frontend/MoptPaymentPayone/Components/Classes/PayoneParamBuilder.php @@ -740,7 +740,7 @@ public function getPaymentRatepayInvoice($financeType, $paymentData) )); $paydata->addItem(new Payone_Api_Request_Parameter_Paydata_DataItem( - array('key' => 'shop_id', 'data' => $paymentData['mopt_payone__ratepay_invoice_shopid']) + array('key' => 'shop_id', 'data' => $paymentData['mopt_payone__ratepay_shopid']) )); @@ -793,7 +793,7 @@ public function getPaymentRatepayInstallment($financeType, $paymentData) )); $paydata->addItem(new Payone_Api_Request_Parameter_Paydata_DataItem( - array('key' => 'shop_id', 'data' => $paymentData['mopt_payone__ratepay_installment_shopid']) + array('key' => 'shop_id', 'data' => $paymentData['mopt_payone__ratepay_shopid']) )); //toDo direct Debit @@ -866,7 +866,7 @@ public function getPaymentRatepayDirectDebit($financeType, $paymentData) )); $paydata->addItem(new Payone_Api_Request_Parameter_Paydata_DataItem( - array('key' => 'shop_id', 'data' => $paymentData['mopt_payone__ratepay_direct_debit_shopid']) + array('key' => 'shop_id', 'data' => $paymentData['mopt_payone__ratepay_shopid']) )); diff --git a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php index 8f42fe27..09d594a1 100755 --- a/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php +++ b/Frontend/MoptPaymentPayone/Controllers/Frontend/MoptPaymentPayone.php @@ -1759,17 +1759,21 @@ public function payoneSecuredErrorAction() protected function getPaymentData() { $userId = $this->session->sUserId; - + $paymentId = $this->session->sPaymentID; + $moptPayonePaymentHelper = new Mopt_PayonePaymentHelper(); + $paymentName = $moptPayonePaymentHelper->getPaymentNameFromId($paymentId); if ($this->isRecurringOrder()) { - $paymentData = Shopware()->Session()->moptPayment; - } else { + $paymentData = $this->session->moptPayment; + } elseif ($moptPayonePaymentHelper->isPayoneCreditcard($paymentName)) { $sql = 'SELECT `moptCreditcardPaymentData` FROM s_plugin_mopt_payone_creditcard_payment_data WHERE userId = ?'; $paymentData = unserialize(Shopware()->Db()->fetchOne($sql, $userId)); if (!$paymentData && Shopware()->Session()->moptSaveCreditcardData === false) { - $paymentData = Shopware()->Session()->moptPayment; + $paymentData = $this->session->moptPayment; } else { Shopware()->Session()->moptPayment = $paymentData; } + } else { + $paymentData = $this->session->moptPayment; } return $paymentData; diff --git a/Frontend/MoptPaymentPayone/Subscribers/FrontendPostDispatch.php b/Frontend/MoptPaymentPayone/Subscribers/FrontendPostDispatch.php index 3be6d712..7cb66357 100755 --- a/Frontend/MoptPaymentPayone/Subscribers/FrontendPostDispatch.php +++ b/Frontend/MoptPaymentPayone/Subscribers/FrontendPostDispatch.php @@ -168,11 +168,10 @@ public function onPostDispatchFrontend(\Enlight_Controller_ActionEventArgs $args $view->assign('moptRatepayConfig', $moptPayoneData['moptRatepayConfig']); $moptPayoneFormData = array_merge((array)$view->sFormData, $moptPayoneData['sFormData']); - $paymentName = $moptPaymentHelper->getPaymentNameFromId($moptPayoneFormData['payment']); - if ($moptPaymentHelper->isPayoneCreditcardNotGrouped($paymentName)) { + if ($moptPaymentHelper->isPayoneCreditcardNotGrouped($moptPaymentName)) { $moptPayoneFormData['payment'] = 'mopt_payone_creditcard'; } - if ($moptPaymentHelper->isPayoneKlarna($paymentName) && $moptPaymentHelper->isPayoneKlarnaGrouped($moptPayoneData['mopt_payone_klarna']['name'])) { + if ($moptPaymentHelper->isPayoneKlarna($moptPaymentName) && $moptPaymentHelper->isPayoneKlarnaGrouped($moptPayoneData['mopt_payone_klarna']['name'])) { $moptPayoneFormData['payment'] = 'mopt_payone_klarna'; }