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

Commit

Permalink
Merge branch 'develop' into develop_SHOPWARE-683_PayPalFixRegistration
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha authored Apr 7, 2020
2 parents d68089c + 35407ef commit 5a3e56e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Frontend/HeidelGateway/Controllers/Frontend/PaymentHgw.php
Original file line number Diff line number Diff line change
Expand Up @@ -2150,7 +2150,7 @@ public function successAction(){
Shopware()->Session()->sOrderVariables['accountBrand'] = $this->getBrandName($parameters->ACCOUNT_BRAND);
break;

case 'iv';
case 'iv':
// setting Comments for frontend and Backend
Shopware()->Session()->sOrderVariables['prepaymentText'] = $comment;
// Santander saving birthdate
Expand Down Expand Up @@ -2247,7 +2247,7 @@ public function successAction(){

Shopware()->Session()->sOrderVariables['prepaymentText'] = $comment;

// sendeing Prepayment Email
// sending Prepayment Email
if($this->Config()->HGW_PP_MAIL > 0){
$repl = array(
'{AMOUNT}' => str_replace(".",",",$parameters->PRESENTATION_AMOUNT),
Expand Down Expand Up @@ -2739,10 +2739,12 @@ public function rawnotifyAction(){

$this->hgw()->createTransactionsTable();
try{
$duplicateEntry = false;
$this->hgw()->saveRes($xmlData);
}catch(Exception $e){
// message 1062: Duplicate entry '%s' for key %d | https://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html
if($e->getPrevious()->errorInfo['1'] == '1062'){
$duplicateEntry = true;
// check if PUSH 'result', 'statuscode', 'return' or 'returncode' differ from DB entry and update, if so.
$sql = '
SELECT * FROM `s_plugin_hgw_transactions`
Expand All @@ -2752,7 +2754,6 @@ public function rawnotifyAction(){

$params = array($xmlData['IDENTIFICATION_TRANSACTIONID'], $xmlData['IDENTIFICATION_UNIQUEID']);
$data = Shopware()->Db()->fetchRow($sql, $params);

if(
($data['result'] != $xmlData['PROCESSING_RESULT']) ||
($data['statuscode'] != $xmlData['PROCESSING_STATUS_CODE']) ||
Expand Down Expand Up @@ -2794,7 +2795,7 @@ public function rawnotifyAction(){
if(!empty($url)){
$this->hgw()->doRequest($xmlData, $url); // send response to shop via POST
}else{
if($e->getPrevious()->errorInfo['1'] != '1062'){
if(!$duplicateEntry){
$this->hgw()->Logging('rawnotifyAction | response_url missing');
}
}
Expand All @@ -2807,7 +2808,6 @@ public function rawnotifyAction(){
}
}
}

header('HTTP/1.1 200 OK');
$this->View()->MES = 'OK';
}catch(Exception $e){
Expand Down Expand Up @@ -4154,7 +4154,7 @@ public function convertOrder($transactionData, $paymentStatus = 12)
// Casting null values to empty strings to fulfill the restrictions of the s_order_billingaddress table
$billingAddress = [
'id' => !empty($customerDbResult[0]['customer']['billing']['id']) ? $customerDbResult[0]['customer']['billing']['id'] : ' ',
'id' => !empty($customerDbResult[0]['customer']['billing']['customerId']) ? $customerDbResult[0]['customer']['billing']['customerId'] : ' ',
'customerId' => !empty($customerDbResult[0]['customer']['billing']['customerId']) ? $customerDbResult[0]['customer']['billing']['customerId'] : ' ',
'company' => !empty($customerDbResult[0]['customer']['billing']['company']) ? $customerDbResult[0]['customer']['billing']['company'] : ' ',
'department' => !empty($customerDbResult[0]['customer']['billing']['department']) ? $customerDbResult[0]['customer']['billing']['department'] : ' ',
'title' => !empty($customerDbResult[0]['customer']['billing']['title']) ? $customerDbResult[0]['customer']['billing']['title'] : ' ',
Expand Down

0 comments on commit 5a3e56e

Please sign in to comment.