From 8787b5d03b149bfe40e26f787b7442d82eb15593 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Mon, 9 Dec 2019 10:34:14 +0100 Subject: [PATCH 01/20] SHOPWARE-581_BugfixForQaIssues * fixed behavior no paymentmethod was saved after registration of DD --- Frontend/HeidelGateway/Bootstrap.php | 32 ++++++++----------- .../Controllers/Frontend/PaymentHgw.php | 24 ++++++++------ .../frontend/register/hp_payment_ivb2b.tpl | 1 - .../frontend/register/hp_payment.tpl | 9 ++++-- .../frontend/register/hp_payment53_dd.tpl | 2 +- .../frontend/register/hp_payment55.tpl | 1 - .../frontend/register/hp_payment_ivb2b.tpl | 1 - 7 files changed, 36 insertions(+), 34 deletions(-) diff --git a/Frontend/HeidelGateway/Bootstrap.php b/Frontend/HeidelGateway/Bootstrap.php index 0cd48b3..3476cc4 100644 --- a/Frontend/HeidelGateway/Bootstrap.php +++ b/Frontend/HeidelGateway/Bootstrap.php @@ -28,7 +28,7 @@ class Shopware_Plugins_Frontend_HeidelGateway_Bootstrap extends Shopware_Compone * @return string version number */ public function getVersion(){ - return '19.09.26'; + return '19.11.25'; } /** @@ -993,21 +993,25 @@ public function update($oldVersion){ } catch (Exception $e) { $this->logError($msg,$e); } - + // Compatibility for SW 5.6 + case '19.08.21': // Fix for no additional E-Mail for invoice B2B is sent after an order // Feature setting article in stock in case of an order without session // Fix for redirect after saving registered paymentdata in savePaymentAction + // Fix for switching to paymentmethod dd with reg + // Fix for a php-fatal exception could be thrown in case of incoming pushes "Call to a member function getPrevious() on null" case '19.09.16': + case '19.10.31': try{ - $msg .= '* update 19.09.16
'; + $msg .= '* update 19.10.31
'; } catch (Exception $e) { $this->logError($msg,$e); } - // Fix for switching to paymentmethod dd with reg - case '19.09.26': + + case '19.11.25': try{ - $msg .= '* update 19.09.
'; - } catch (Exception $e) { + $msg .= '* update 19.11.25
'; + } catch (Exception $e){ $this->logError($msg,$e); } @@ -1868,6 +1872,7 @@ public static function onGetControllerPathFrontend(Enlight_Event_EventArgs $args /** * Hook for custom code before document is renderd + * */ public function onBeforeRenderDocument(Enlight_Hook_HookArgs $args){ try{ @@ -2497,16 +2502,6 @@ public function onPostDispatch(Enlight_Event_EventArgs $args){ $view->extendsTemplate('register/hp_checkout_confirmreg.tpl'); break; } -// if( -// ($user['additional']['payment']['name'] == 'hgw_mpa') -//// || -//// ($user['additional']['payment']['name'] == 'hgw_cc') || -//// ($user['additional']['payment']['name'] == 'hgw_dc') || -//// ($user['additional']['payment']['name'] == 'hgw_dd') -// -// ){ // or every other wallet -// $view->extendsTemplate('register/hp_checkout_confirm.tpl'); -// } } if($_SESSION['Shopware']['HPWallet'] == '1'){ @@ -5093,13 +5088,12 @@ public function saveRes($data){ try { Shopware()->Db()->query($sql, $params); } catch (Exception $e) { - // if entry is in db yet do not write again + // if entry is in db yet do not write again if($e->getPrevious()->errorInfo['1'] != '1062'){ Shopware()->Plugins()->Frontend()->HeidelGateway()->Logging('saveRes | '.$e->getMessage()); } return; } - } /** diff --git a/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php b/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php index 83f662a..9911e5f 100644 --- a/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php +++ b/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php @@ -148,7 +148,11 @@ public function gatewayAction(){ $shippingHash = $this->createShippingHash($user, $activePayment); $last = mktime(23,59,00,$reg['expMonth']+1,0,$reg['expYear']); // timestamp: last day of registration month - if(!empty($reg) && ($reg['uid'] != '') && ((($reg['expMonth'] == '0') && ($reg['expYear'] == '0')) || ($last > time())) && (($reg['shippingHash'] == $shippingHash) || ($this->Config()->HGW_SHIPPINGHASH == 1))){ + if( + !empty($reg) && ($reg['uid'] != '') && ((($reg['expMonth'] == '0') && ($reg['expYear'] == '0')) || + ($last > time())) && (($reg['shippingHash'] == $shippingHash) || + ($this->Config()->HGW_SHIPPINGHASH == 1)) + ){ $ppd_config = $this->hgw()->ppd_config($this->Config()->$booking, $activePayment, $reg['uid'], true); $ppd_user = $this->hgw()->ppd_user(NULL, $activePayment); @@ -229,7 +233,6 @@ public function gatewayAction(){ $getFormUrl = $this->getFormUrl($activePayment, $this->Config()->$booking, $user['additional']['user']['id'], $tempID, $uid, $basket, $ppd_crit); unset(Shopware()->Session()->HPGateway); - $cardBrands[$activePayment] = json_decode($getFormUrl['CONFIG_BRANDS'], true); $bankCountry[$activePayment] = json_decode($getFormUrl['CONFIG_BANKCOUNTRY'], true); @@ -1297,20 +1300,24 @@ public function responseRegAction() { Shopware()->Session()->$token = $resp['__csrf_token']; $this->Request()->setPost('sTarget',$resp['var_sTarget']); - $registrierteZahlart = $resp['var_Register']; $this->Request()->setPost('register', $registrierteZahlart['payment']); //Fallback case if target is not set if(empty($resp['var_sTarget'])){$resp['var_sTarget'] = 'checkout';} +// print Shopware()->Front()->Router()->assemble(array( +// 'forceSecure' => 1, +// 'controller' => 'PaymentHgw', +// 'action' => 'savePayment', +// 'sRegister' => $registrierteZahlart['payment'], +// 'sTarget' => $resp['var_sTarget'], +// 'txnId' => $resp['IDENTIFICATION_TRANSACTIONID'], +// )); print Shopware()->Front()->Router()->assemble(array( 'forceSecure' => 1, - 'controller' => 'PaymentHgw', - 'action' => 'savePayment', - 'sRegister' => $registrierteZahlart['payment'], - 'sTarget' => $resp['var_sTarget'], - 'txnId' => $resp['IDENTIFICATION_TRANSACTIONID'], + 'controller' => 'checkout', + 'action' => 'confirm', )); return; break; @@ -1662,7 +1669,6 @@ public function savePaymentAction(){ $_SERVER['REQUEST_METHOD'] = 'GET'; $this->Request()->setPost('isPost', 'true'); $transaction = $this->getHgwTransactions($this->Request()->txnId); - $token = json_decode($transaction['jsonresponse']); $tokenNameSession = 'X-CSRF-Token'; diff --git a/Frontend/HeidelGateway/Views/frontend/register/hp_payment_ivb2b.tpl b/Frontend/HeidelGateway/Views/frontend/register/hp_payment_ivb2b.tpl index 840682f..fccf46d 100644 --- a/Frontend/HeidelGateway/Views/frontend/register/hp_payment_ivb2b.tpl +++ b/Frontend/HeidelGateway/Views/frontend/register/hp_payment_ivb2b.tpl @@ -1,5 +1,4 @@ {block name="hp_payment_papg"} - {*{debug}*}
diff --git a/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment.tpl b/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment.tpl index d825a4e..ce453bf 100644 --- a/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment.tpl +++ b/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment.tpl @@ -73,7 +73,8 @@ {if $action == 'shippingPayment'} {else} - +{* *} + {/if} {/block} @@ -160,7 +161,11 @@ {if $action == 'shippingPayment'}
{block name="hp_radio"}{/block} -
+
+ {elseif isset($useOnePageCheckout)} +
+ {block name="hp_radio"}{/block} +
{else} {block name="hp_radio"}{/block} {/if} diff --git a/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment53_dd.tpl b/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment53_dd.tpl index bd7efb0..b41b2b0 100644 --- a/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment53_dd.tpl +++ b/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment53_dd.tpl @@ -49,7 +49,7 @@ {if isset($regData)} {html_select_date|utf8_encode prefix='DateDD_' - time=$birthdateDD.birthdate.formatted + time=$birthdateDD start_year='-10' end_year='-100' reverse_years='true' diff --git a/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment55.tpl b/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment55.tpl index d619627..5c1b05e 100644 --- a/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment55.tpl +++ b/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment55.tpl @@ -86,7 +86,6 @@ {assign var='pm' value=$payment_mean.name|substr:($bar_at+1)} {if $pm == 'pay'}{assign var='pm' value='va'}{/if} {if $payment_mean.name == "hgw_cc" && $heidel_bm_cc && ($formUrl.$pm != '')} - {include file="{$tPath|substr:1}/Views/responsive/frontend/register/hp_payment53_cc.tpl"} {elseif $payment_mean.name == "hgw_dc" && $heidel_bm_dc && ($formUrl.$pm != '')} {include file="{$tPath|substr:1}/Views/responsive/frontend/register/hp_payment53_dc.tpl"} diff --git a/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment_ivb2b.tpl b/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment_ivb2b.tpl index 7eeb110..7e3c5b9 100644 --- a/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment_ivb2b.tpl +++ b/Frontend/HeidelGateway/Views/responsive/frontend/register/hp_payment_ivb2b.tpl @@ -1,5 +1,4 @@ {block name="hp_payment_papg"} - {*{debug}*}
From 6d86ee63b62190c838775440e86f6e5f15f08f98 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Thu, 12 Dec 2019 09:45:48 +0100 Subject: [PATCH 02/20] SHOPWARE-581_BugfixForQaIssues * added a try-catch --- .../Controllers/Frontend/PaymentHgw.php | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php b/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php index 9911e5f..f3aef18 100644 --- a/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php +++ b/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php @@ -2536,6 +2536,8 @@ public function getOrderBySession($sessionId){ public function addOrderInfos($transactionID, $params, $status=NULL){ try{ Shopware()->Models()->clear(); + + /** @var Shopware\Models\Order\Order $orderModel */ $orderModel = Shopware() ->Models() ->getRepository('Shopware\Models\Order\Order') @@ -2552,14 +2554,21 @@ public function addOrderInfos($transactionID, $params, $status=NULL){ { $orderModel->setClearedDate(date('d.m.Y H:i:s')); } - // if internalComment is set, read old commment and add time stamp - $alterWert = $orderModel->getInternalComment(); - if(!empty($params['internalcomment'])){ - $params['internalcomment'] = date('d.m.Y H:i:s') . "\n" . $params['internalcomment'] . "\n \n" . $alterWert; - }else{ - $params['internalcomment'] = $alterWert; + + try { + // if internalComment is set, read old commment and add time stamp + $alterWert = $orderModel->getInternalComment(); + if(!empty($params['internalcomment'])){ + $params['internalcomment'] = date('d.m.Y H:i:s') . "\n" . $params['internalcomment'] . "\n \n" . $alterWert; + }else{ + $params['internalcomment'] = $alterWert; + } + } catch (Exception $ex) { + Shopware()->Container()->get('pluginlogger')->error('addOrderInfos failed cannot write order comment | '.$ex->getMessage()); } + + // mapping database -> model $orderMappings = array( 'ordernumber' => 'number', From bfb1322b2d16f7bd7bc3591ebac9f6e20fe12443 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Tue, 17 Dec 2019 13:32:26 +0100 Subject: [PATCH 03/20] SHOPWARE-581_BugfixForQaIssues * changed Versionnumber --- Frontend/HeidelGateway/Bootstrap.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Frontend/HeidelGateway/Bootstrap.php b/Frontend/HeidelGateway/Bootstrap.php index 3476cc4..6482109 100644 --- a/Frontend/HeidelGateway/Bootstrap.php +++ b/Frontend/HeidelGateway/Bootstrap.php @@ -28,7 +28,7 @@ class Shopware_Plugins_Frontend_HeidelGateway_Bootstrap extends Shopware_Compone * @return string version number */ public function getVersion(){ - return '19.11.25'; + return '19.12.12'; } /** @@ -1008,9 +1008,9 @@ public function update($oldVersion){ $this->logError($msg,$e); } - case '19.11.25': + case '19.12.12': try{ - $msg .= '* update 19.11.25
'; + $msg .= '* update 19.12.12
'; } catch (Exception $e){ $this->logError($msg,$e); } From 1ef4b1a7911114fd49bd1d54b6e5eb4e0d3faa70 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Tue, 14 Jan 2020 10:30:24 +0100 Subject: [PATCH 04/20] SHOPWARE-581_BugfixForQaIssues * activated again Refund and Reversal-Buttons for invoice-payment-method --- .../Controllers/Backend/BackendHgw.php | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php b/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php index e14c7c1..b089f9a 100644 --- a/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php +++ b/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php @@ -120,6 +120,7 @@ public function requestAction(){ $payName = 'ot'; break; case 'bs': + case 'iv': case 'san': case 'ivpd': case 'papg': @@ -274,7 +275,7 @@ public function requestAction(){ $data[$newKey] = $value; unset($data[$key]); } - + $resp = $this->callDoRequest($data); Shopware()->Plugins()->Frontend()->HeidelGateway()->saveRes($resp); @@ -462,6 +463,7 @@ public function getButtons($transactions, $payName, $beLocaleId){ $btns['fi']['name'] = 'Finalize'; $btns['fi']['icon'] = 'fa-truck'; $btns['fi']['active'] = 'false'; + if($this->showButtons){ foreach(array_reverse($transactions) as $key => $value){ if($payName == 'pay'){ $payName = 'va'; } @@ -470,11 +472,12 @@ public function getButtons($transactions, $payName, $beLocaleId){ if($value['TRANSACTION_CHANNEL'] != $this->FrontendConfigHGW()->$payChan){ break; } $payInfo = $this->getPayInfo($value['PAYMENT_CODE'], $beLocaleId); - + if($payName == 'papg'){ $payName = 'iv'; $papg = true; } if($payName == 'ivb2b'){ $payName = 'iv'; $ivb2b = true; } if($payName == 'san'){ $payName = 'iv'; $san = true; } if($payName == 'ivpd'){ $payName = 'iv'; $ivpd = true; } + if($payName == 'iv'){ $payName = 'iv'; $iv = true; } switch($payName){ case 'cc': @@ -520,6 +523,25 @@ public function getButtons($transactions, $payName, $beLocaleId){ break; case 'bs': case 'iv': + if($iv){ + if($payInfo['payType'] == 'pa') { + $btns['rv']['active'] = 'true'; + + $maxRv = $value['PRESENTATION_AMOUNT']; + } + if($payInfo['payType'] == 'rv') { + mail("sascha.pflueger@heidelpay.com","Transaktion",print_r($value,1)); + $btns['rv']['active'] = 'false'; + $maxRv = $value['PRESENTATION_AMOUNT']; + } + + if($payInfo['payType'] == 'rc'){ + $btns['rv']['active'] = 'false'; + $btns['rf']['active'] = 'true'; + if(!isset($maxRf)){ $maxRf = $value['PRESENTATION_AMOUNT']; } + $btns['rf']['trans'][] = $this->storeTrans($value, $payName, $payInfo); + } + } if($ivpd || $san) { if($payInfo['payType'] == 'pa'){ @@ -552,6 +574,7 @@ public function getButtons($transactions, $payName, $beLocaleId){ } } } elseif ($papg || $ivb2b){ +mail("sascha.pflueger@heidelpay.com","Ges. Rech B2C B2B",print_r("",1)); if ($payInfo['payType'] == 'pa') { $btns['rv']['active'] = $btns['fi']['active'] = 'true'; @@ -613,9 +636,10 @@ public function getButtons($transactions, $payName, $beLocaleId){ } else { - $btns['rv']['active'] = $btns['fi']['active'] = 'false'; - $btns['fi']['active'] = 'false'; - $btns['rv']['active'] = 'true'; +//mail("sascha.pflueger@heidelpay.com","ELSE",print_r("",1)); +// $btns['rv']['active'] = $btns['fi']['active'] = 'false'; +// $btns['fi']['active'] = 'false'; +// $btns['rv']['active'] = 'true'; } // if($payInfo['payType'] == 'pa'){ @@ -714,6 +738,7 @@ public function getButtons($transactions, $payName, $beLocaleId){ if($ivb2b) { $payName = 'ivb2b'; $ivb2b = false; } if($san) { $payName = 'san'; $san = false; } if($ivpd) { $payName = 'ivpd'; $ivpd = false; } + if($iv) { $payName = 'iv'; $iv = false; } } $btns['rf']['trans'][0]['maxRf'] = number_format($maxRf, 2,'.',''); From d04e38106d8126bb5ae8d9b49db2db565e602830 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Tue, 14 Jan 2020 10:53:30 +0100 Subject: [PATCH 05/20] SHOPWARE-581_BugfixForQaIssues * removed debugging --- Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php b/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php index b089f9a..141d3f7 100644 --- a/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php +++ b/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php @@ -574,7 +574,6 @@ public function getButtons($transactions, $payName, $beLocaleId){ } } } elseif ($papg || $ivb2b){ -mail("sascha.pflueger@heidelpay.com","Ges. Rech B2C B2B",print_r("",1)); if ($payInfo['payType'] == 'pa') { $btns['rv']['active'] = $btns['fi']['active'] = 'true'; From 66b51acd201dec03fd9cd199edb8cb7270fabc54 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Tue, 14 Jan 2020 10:58:41 +0100 Subject: [PATCH 06/20] SHOPWARE-581_BugfixForQaIssues * removed debugging --- Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php b/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php index 141d3f7..48fb25f 100644 --- a/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php +++ b/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php @@ -530,7 +530,6 @@ public function getButtons($transactions, $payName, $beLocaleId){ $maxRv = $value['PRESENTATION_AMOUNT']; } if($payInfo['payType'] == 'rv') { - mail("sascha.pflueger@heidelpay.com","Transaktion",print_r($value,1)); $btns['rv']['active'] = 'false'; $maxRv = $value['PRESENTATION_AMOUNT']; } From 90645c7ee7cdbd53c0982dbcbcf7ead6ec7500e1 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Wed, 15 Jan 2020 13:49:21 +0100 Subject: [PATCH 07/20] SHOPWARE-581_BugfixForQaIssues * some code cleaning --- .../Controllers/Backend/BackendHgw.php | 75 +++++-------------- 1 file changed, 18 insertions(+), 57 deletions(-) diff --git a/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php b/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php index 48fb25f..baa18f4 100644 --- a/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php +++ b/Frontend/HeidelGateway/Controllers/Backend/BackendHgw.php @@ -446,7 +446,8 @@ public function getButtons($transactions, $payName, $beLocaleId){ $btns['rv']['name'] = 'Reversal'; $btns['rv']['icon'] = 'fa-reply'; $btns['rv']['active'] = 'false'; - if(in_array($payName,["papg","ivb2b"]) /*&& Factoring ist aktiv*/){ + /* && Factoring ist aktiv */ + if(in_array($payName,["papg","ivb2b"])){ $btns['rv1']['name'] = 'Reversal Storno'; $btns['rv1']['icon'] = 'fa-reply'; $btns['rv1']['active'] = 'false'; @@ -472,12 +473,12 @@ public function getButtons($transactions, $payName, $beLocaleId){ if($value['TRANSACTION_CHANNEL'] != $this->FrontendConfigHGW()->$payChan){ break; } $payInfo = $this->getPayInfo($value['PAYMENT_CODE'], $beLocaleId); - + + if($payName == 'iv'){ $payName = 'iv'; $iv = true; } if($payName == 'papg'){ $payName = 'iv'; $papg = true; } if($payName == 'ivb2b'){ $payName = 'iv'; $ivb2b = true; } if($payName == 'san'){ $payName = 'iv'; $san = true; } if($payName == 'ivpd'){ $payName = 'iv'; $ivpd = true; } - if($payName == 'iv'){ $payName = 'iv'; $iv = true; } switch($payName){ case 'cc': @@ -572,7 +573,8 @@ public function getButtons($transactions, $payName, $beLocaleId){ $btns['rv']['active'] = 'true'; } } - } elseif ($papg || $ivb2b){ + } + if ($papg || $ivb2b){ if ($payInfo['payType'] == 'pa') { $btns['rv']['active'] = $btns['fi']['active'] = 'true'; @@ -593,24 +595,28 @@ public function getButtons($transactions, $payName, $beLocaleId){ $maxRv1 = $maxRv2 = $maxRv3 = $value['PRESENTATION_AMOUNT']; unset($btns['rv']); } - } if ( ($payInfo['payType'] == 'fi') && ($value['PROCESSING_RESULT'] == "ACK") ) { - $maxRv = $maxFi = $value['PRESENTATION_AMOUNT']; - $btns['rv']['active'] = 'true'; + $maxRf = $maxFi = $value['PRESENTATION_AMOUNT']; $btns['fi']['active'] = 'false'; -// $btns['rf']['active'] = 'true'; -// if(!isset($maxRf)){ $maxRf = $value['PRESENTATION_AMOUNT']; } + $btns['rv']['active'] = 'false'; } else { $maxRv = $maxFi = $value['PRESENTATION_AMOUNT']; $btns['rv']['active'] = $btns['fi']['active'] = 'true'; } + if ($payInfo['payType'] == 'rv') { + $btns['fi']['active'] = + $btns['rv']['active'] = 'true'; +// $maxRv = $maxFi = $value['PRESENTATION_AMOUNT']; + $maxRv = $maxFi = $btns['fi']['trans']['0']['amount']; + } + if ($payInfo['payType'] == 'rc') { $btns['rv']['active'] = $btns['rv1']['active'] = @@ -625,54 +631,9 @@ public function getButtons($transactions, $payName, $beLocaleId){ $btns['rf']['trans'][] = $this->storeTrans($value, $payName, $payInfo); } - if ($payInfo['payType'] == 'rv') { - $btns['fi']['active'] = - $btns['rv']['active'] = 'true'; -// $maxRv = $maxFi = $value['PRESENTATION_AMOUNT']; - $maxRv = $maxFi = $btns['fi']['trans']['0']['amount']; - } - } - else { -//mail("sascha.pflueger@heidelpay.com","ELSE",print_r("",1)); -// $btns['rv']['active'] = $btns['fi']['active'] = 'false'; -// $btns['fi']['active'] = 'false'; -// $btns['rv']['active'] = 'true'; - } -// if($payInfo['payType'] == 'pa'){ -// $btns['rv']['active'] = $btns['fi']['active'] = 'true'; -// -// $maxRv = $maxFi = $value['PRESENTATION_AMOUNT']; -// $btns['rv']['trans'][] = $btns['fi']['trans'][] = $this->storeTrans($value, $payName, $payInfo); -// } -// if($payInfo['payType'] == 'rc'){ -// $btns['rv']['active'] = $btns['fi']['active'] = 'false'; -// $btns['rf']['active'] = 'true'; -// -// if(!isset($maxRf)){ $maxRf = $value['PRESENTATION_AMOUNT']; } -// $btns['rf']['trans'][] = $this->storeTrans($value, $payName, $payInfo); -// } -// if($payInfo['payType'] == 'fi'){ -// $maxRv = $maxFi = $value['PRESENTATION_AMOUNT']; -// -// if( -// $ivpd -//// || $san -// ){ -// $btns['fi']['active'] = $btns['rv']['active'] ='false'; -// $btns['rf']['active'] = 'true'; -// -// if(!isset($maxRf)){ $maxRf = $value['PRESENTATION_AMOUNT']; } -// $btns['rf']['trans'][] = $this->storeTrans($value, $payName, $payInfo); -// } else { -// $btns['fi']['active'] = 'false'; -// $btns['rv']['active'] = 'true'; -// } - //$btns['rv']['active'] = $btns['fi']['active'] = 'false'; -// $btns['fi']['active'] = 'false'; -// $btns['rv']['active'] = 'true'; -// } + } break; case 'pp': if($payInfo['payType'] == 'pa'){ @@ -722,10 +683,10 @@ public function getButtons($transactions, $payName, $beLocaleId){ $maxRv2 = number_format($maxRv2, 2,'.','') - $value['PRESENTATION_AMOUNT']; $maxRv3 = number_format($maxRv3, 2,'.','') - $value['PRESENTATION_AMOUNT']; } - if($maxCp <= 0){ $btns['cp']['active'] = 'false'; }else{ $btns['cp']['active'] = 'true'; } + if($maxCp <= 0){ $btns['cp']['active'] = 'false'; } //else{ $btns['cp']['active'] = 'true'; } if($maxRf <= 0){ $btns['rf']['active'] = 'false'; } if($maxRv <= 0){ $btns['rv']['active'] = 'false'; } - if($maxRv <= 0){ $btns['rv']['active'] = 'false'; } +// if($maxRv <= 0){ $btns['rv']['active'] = 'false'; } if($maxFi <= 0){ $btns['fi']['active'] = 'false'; } if($maxRv1 <= 0){ $btns['rv1']['active'] = 'false'; } if($maxRv2 <= 0){ $btns['rv2']['active'] = 'false'; } From 19871a9728b40e2c2f9b5ea464afb3387450f248 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Wed, 15 Jan 2020 13:50:13 +0100 Subject: [PATCH 08/20] SHOPWARE-581_BugfixForQaIssues * Bugfix for EPS-Connector issues --- Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php b/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php index f3aef18..3e803c3 100644 --- a/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php +++ b/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php @@ -3482,6 +3482,8 @@ public function preparePostData($config = array(), $frontend = array(), $userDat $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE']; $params['PAYMENT.CODE'] = "OT.".$type; $params['FRONTEND.ENABLED'] = "true"; + $params['ACCOUNT.COUNTRY'] = "AT"; + // $params['ACCOUNT.BRAND'] = "EPS"; break; /* postfinance */ From 2e4cffc9b38e1d9a7db41a454787fd7cd5a54aa9 Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Wed, 15 Jan 2020 13:52:05 +0100 Subject: [PATCH 09/20] SHOPWARE-581_BugfixForQaIssues * added styles inline to use iFrame-For on mobile devices --- Frontend/HeidelGateway/Views/frontend/payment_hgw/gateway.tpl | 2 +- .../HeidelGateway/Views/frontend/register/hp_payment_cc.tpl | 2 +- .../HeidelGateway/Views/frontend/register/hp_payment_dc.tpl | 2 +- .../Views/responsive/frontend/payment_hgw/gateway.tpl | 2 +- .../Views/responsive/frontend/register/hp_payment53_cc.tpl | 2 +- .../Views/responsive/frontend/register/hp_payment53_dc.tpl | 2 +- .../Views/responsive/frontend/register/hp_payment_cc.tpl | 2 +- .../Views/responsive/frontend/register/hp_payment_dc.tpl | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Frontend/HeidelGateway/Views/frontend/payment_hgw/gateway.tpl b/Frontend/HeidelGateway/Views/frontend/payment_hgw/gateway.tpl index cc71f47..a444842 100644 --- a/Frontend/HeidelGateway/Views/frontend/payment_hgw/gateway.tpl +++ b/Frontend/HeidelGateway/Views/frontend/payment_hgw/gateway.tpl @@ -38,7 +38,7 @@ {assign var='formTarget' value='payment_frame'}

{s name='PaymentHeader' namespace='frontend/payment_heidelpay/gateway'}{/s}

- + + {/if}
diff --git a/Frontend/HeidelGateway/Views/frontend/register/hp_payment_dc.tpl b/Frontend/HeidelGateway/Views/frontend/register/hp_payment_dc.tpl index a35d1bd..03948b6 100644 --- a/Frontend/HeidelGateway/Views/frontend/register/hp_payment_dc.tpl +++ b/Frontend/HeidelGateway/Views/frontend/register/hp_payment_dc.tpl @@ -15,7 +15,7 @@