From 9b3c38085c8c2bcfdb79cf87127afcd7b21d2e7d Mon Sep 17 00:00:00 2001 From: heidelpay-sp Date: Mon, 1 Jul 2019 09:55:41 +0200 Subject: [PATCH] Shopware-310 Integration PIS - changed versionnumber and Update() - refactored PIS that it shall work as SOFORT - changed EPS-Workflow that a direct redirect to EPS is done --- .../Controllers/Frontend/PaymentHgw.php | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php b/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php index b9a242a..82fa25c 100644 --- a/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php +++ b/Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php @@ -463,24 +463,14 @@ public function gatewayAction(){ Shopware()->Session()->HPError = $getFormUrl['PROCESSING_RETURN_CODE']; return $this->forward('fail'); } -//mail("sascha.pflueger@heidelpay.com","getFormUrl",print_r($getFormUrl,1)); - if ($activePayment == 'gir') { + + // direct redirect to paymentprovider sites for Giropay, EPS and Flexipay Pis + if ( + $activePayment == 'gir' || + $activePayment == 'pis' || + $activePayment == 'eps' + ) { return $this->redirect($getFormUrl['FRONTEND_REDIRECT_URL']); - } elseif ($activePayment == 'pis'){ - $additionalStringForUrl = - "&amount=".$getFormUrl['PRESENTATION_AMOUNT']. - "¤cy=".$getFormUrl['PRESENTATION_CURRENCY']. - "&merchant_name=".Shopware()->Shop()->getName(). - "&merchant_address="."Germany". - "&return_url=".$getFormUrl['FRONTEND_RESPONSE_URL'] - ; -//mail("sascha.pflueger@heidelpay.com","Url zum weiterleiten",print_r($getFormUrl['PROCESSING_REDIRECT_URL'].$additionalStringForUrl,1)); -/* - * INFO: Frontend.Enabled ist auf False gesetzt um die URL zu Flexipay direkt zu erhalten um daran Parameter anhängen zu können - * Da Frontend.Enabled = False gesetzt ist muss anstelle des Params FRONTEND_REDIRECT_URL der Param PROCESSING_REDIRECT_URL benutzt werden - */ -// return $this->redirect($getFormUrl['[FRONTEND_REDIRECT_URL'].$additionalStringForUrl ); - return $this->redirect($getFormUrl['PROCESSING_REDIRECT_URL'].$additionalStringForUrl ); } /* Paymentmethod Sofortueberweisung, Prezlewy24, iDeal, EPS*/ @@ -3441,8 +3431,7 @@ 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['ACCOUNT.BRAND'] = "PIS"; -// $params['FRONTEND.ENABLED'] = "true"; - $params['FRONTEND.ENABLED'] = "false"; + $params['FRONTEND.ENABLED'] = "true"; break; /* griopay */ case 'gir':