Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Shopware-310 Integration PIS
Browse files Browse the repository at this point in the history
- changed versionnumber and Update()
- refactored PIS that it shall work as SOFORT
- changed EPS-Workflow that a direct redirect to EPS is done
  • Loading branch information
heidelpay-sp committed Jul 1, 2019
1 parent 5728ffa commit 9b3c380
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,24 +463,14 @@ public function gatewayAction(){
Shopware()->Session()->HPError = $getFormUrl['PROCESSING_RETURN_CODE'];
return $this->forward('fail');
}
//mail("[email protected]","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'].
"&currency=".$getFormUrl['PRESENTATION_CURRENCY'].
"&merchant_name=".Shopware()->Shop()->getName().
"&merchant_address="."Germany".
"&return_url=".$getFormUrl['FRONTEND_RESPONSE_URL']
;
//mail("[email protected]","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*/
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit 9b3c380

Please sign in to comment.