Completed
Push — master ( 959b11...15c9ac )
by Marcus
02:05
created
src/Controller/Shop/Paypalnotify.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $postdata = '';
76 76
 
77 77
             foreach ($_POST as $i => $v) {
78
-                $postdata .= $i . '=' . urlencode($v) . '&';
78
+                $postdata .= $i.'='.urlencode($v).'&';
79 79
             }
80 80
             $postdata .= 'cmd=_notify-validate';
81 81
             $web = parse_url(HelperConfig::$shop['paypal']['url']);
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
                 $web['port'] = 80;
88 88
                 $ssl = '';
89 89
             }
90
-            $fp = @fsockopen($ssl . $web['host'], $web['port'], $errnum, $errstr, 30);
90
+            $fp = @fsockopen($ssl.$web['host'], $web['port'], $errnum, $errstr, 30);
91 91
 
92 92
             if ($fp) {
93
-                fwrite($fp, 'POST ' . $web['path'] . " HTTP/1.1\r\n");
94
-                fwrite($fp, 'Host: ' . $web['host'] . "\r\n");
93
+                fwrite($fp, 'POST '.$web['path']." HTTP/1.1\r\n");
94
+                fwrite($fp, 'Host: '.$web['host']."\r\n");
95 95
                 fwrite($fp, "Content-type: application/x-www-form-urlencoded\r\n");
96
-                fwrite($fp, 'Content-length: ' . strlen($postdata) . "\r\n");
96
+                fwrite($fp, 'Content-length: '.strlen($postdata)."\r\n");
97 97
                 fwrite($fp, "Connection: close\r\n\r\n");
98
-                fwrite($fp, $postdata . "\r\n\r\n");
98
+                fwrite($fp, $postdata."\r\n\r\n");
99 99
 
100 100
                 $info = [];
101 101
                 while (!feof($fp)) {
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
                 $info = implode(',', $info);
106 106
                 if (!(strpos($info, 'VERIFIED') === false)) {
107 107
 
108
-                    $sLogData .= '-- new entry - ' . date(HelperConfig::$core['locale_format_date_time']) . " --\n\n";
108
+                    $sLogData .= '-- new entry - '.date(HelperConfig::$core['locale_format_date_time'])." --\n\n";
109 109
                     $sLogData .= "W00T!\n\n";
110
-                    $sLogData .= \HaaseIT\Toolbox\Tools::debug($_REQUEST, '', true, true) . "\n\n";
110
+                    $sLogData .= \HaaseIT\Toolbox\Tools::debug($_REQUEST, '', true, true)."\n\n";
111 111
 
112 112
                     // Check if the transaction id has been used before
113 113
                     $queryBuilder = $this->dbal->createQueryBuilder();
@@ -136,27 +136,27 @@  discard block
 block discarded – undo
136 136
                                 ->setParameter(1, $iId);
137 137
                             $queryBuilder->execute();
138 138
 
139
-                            $sLogData .= '-- Alles ok. Zahlung erfolgreich. TXNID: ' . $_REQUEST['txn_id'] . " --\n\n";
139
+                            $sLogData .= '-- Alles ok. Zahlung erfolgreich. TXNID: '.$_REQUEST['txn_id']." --\n\n";
140 140
                         } else {
141 141
                             $sLogData .= "-- In my country we have problem; Problem is evaluation. Throw the data down the log!\n";
142
-                            $sLogData .= 'mc_gross: ' . $_REQUEST['mc_gross'] . ' - number_format($fGesamtbrutto, 2, \'.\', \'\'): ' . number_format($fGesamtbrutto,
143
-                                    2, '.', '') . "\n";
144
-                            $sLogData .= 'custom: ' . $_REQUEST['custom'] . ' - $aOrder[\'o_id\']: ' . $aOrder['o_id'] . "\n";
145
-                            $sLogData .= 'payment_status: ' . $_REQUEST['payment_status'] . "\n";
146
-                            $sLogData .= 'mc_currency: ' . $_REQUEST['mc_currency'] . ' - HelperConfig::$shop["paypal"]["currency_id"]: ' . HelperConfig::$shop['paypal']['currency_id'] . "\n";
147
-                            $sLogData .= 'business: ' . $_REQUEST['receiver_email'] . ' - HelperConfig::$shop["paypal"]["business"]: ' . HelperConfig::$shop['paypal']['business'] . "\n\n";
142
+                            $sLogData .= 'mc_gross: '.$_REQUEST['mc_gross'].' - number_format($fGesamtbrutto, 2, \'.\', \'\'): '.number_format($fGesamtbrutto,
143
+                                    2, '.', '')."\n";
144
+                            $sLogData .= 'custom: '.$_REQUEST['custom'].' - $aOrder[\'o_id\']: '.$aOrder['o_id']."\n";
145
+                            $sLogData .= 'payment_status: '.$_REQUEST['payment_status']."\n";
146
+                            $sLogData .= 'mc_currency: '.$_REQUEST['mc_currency'].' - HelperConfig::$shop["paypal"]["currency_id"]: '.HelperConfig::$shop['paypal']['currency_id']."\n";
147
+                            $sLogData .= 'business: '.$_REQUEST['receiver_email'].' - HelperConfig::$shop["paypal"]["business"]: '.HelperConfig::$shop['paypal']['business']."\n\n";
148 148
                         }
149 149
                     } else {
150 150
                         // INVALID LOGGING ERROR
151
-                        $sLogData .= '-- new entry - ' . date(HelperConfig::$core['locale_format_date_time']) . " --\n\nPHAIL\n\n";
152
-                        $sLogData .= '!!! JEMAND HAT EINE ALTE TXN_ID BENUTZT: ' . $_REQUEST['txn_id'] . " !!!\n\n";
151
+                        $sLogData .= '-- new entry - '.date(HelperConfig::$core['locale_format_date_time'])." --\n\nPHAIL\n\n";
152
+                        $sLogData .= '!!! JEMAND HAT EINE ALTE TXN_ID BENUTZT: '.$_REQUEST['txn_id']." !!!\n\n";
153 153
                         $sLogData .= "!!! INVALID !!!\n\n";
154 154
                     }
155 155
                 } else {
156
-                    $sLogData .= '-- new entry - ' . date(HelperConfig::$core['locale_format_date_time']) . " --\n\nPHAIL - Transaktion fehlgeschlagen. TXNID: " . $_REQUEST['txn_id'] . "\n" . $info . "\n\n";
156
+                    $sLogData .= '-- new entry - '.date(HelperConfig::$core['locale_format_date_time'])." --\n\nPHAIL - Transaktion fehlgeschlagen. TXNID: ".$_REQUEST['txn_id']."\n".$info."\n\n";
157 157
                 }
158 158
 
159
-                file_put_contents(PATH_LOGS . FILE_PAYPALLOG, $sLogData, FILE_APPEND);
159
+                file_put_contents(PATH_LOGS.FILE_PAYPALLOG, $sLogData, FILE_APPEND);
160 160
             }
161 161
         }
162 162
 
Please login to merge, or discard this patch.
src/Controller/Shop/Myorders.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             if (filter_input(INPUT_GET, 'id') !== null && filter_input(INPUT_GET, 'action') === 'show') {
64 64
                 $iId = \filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);
65 65
 
66
-                $sql = 'SELECT * FROM ' . 'orders WHERE o_id = :id AND o_custno = \'' . $_SESSION['user']['cust_no'] . '\' AND o_ordercompleted != \'d\'';
66
+                $sql = 'SELECT * FROM '.'orders WHERE o_id = :id AND o_custno = \''.$_SESSION['user']['cust_no'].'\' AND o_ordercompleted != \'d\'';
67 67
                 $hResult = $this->db->prepare($sql);
68 68
                 $hResult->bindValue(':id', $iId);
69 69
                 $hResult->execute();
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                         $aOrder['o_ordertimestamp']
77 77
                     );
78 78
                     $this->P->cb_customdata['orderdata']['orderremarks'] = $aOrder['o_remarks'];
79
-                    $this->P->cb_customdata['orderdata']['paymentmethod'] = $this->textcats->T('order_paymentmethod_' . $aOrder['o_paymentmethod']);
79
+                    $this->P->cb_customdata['orderdata']['paymentmethod'] = $this->textcats->T('order_paymentmethod_'.$aOrder['o_paymentmethod']);
80 80
                     $this->P->cb_customdata['orderdata']['paymentcompleted'] = (($aOrder['o_paymentcompleted'] === 'y') ? $this->textcats->T('myorders_paymentstatus_completed') : $this->textcats->T('myorders_paymentstatus_open'));
81 81
                     $this->P->cb_customdata['orderdata']['orderstatus'] = SHelper::showOrderStatusText($this->textcats, $aOrder['o_ordercompleted']);
82 82
                     $this->P->cb_customdata['orderdata']['shippingservice'] = $aOrder['o_shipping_service'];
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
118 118
                 }
119 119
             } else {
120 120
                 $COList = [
121
-                    ['title' => $this->textcats->T('order_head_orderdate'), 'key' => 'o_ordertime', 'width' => 110, 'linked' => false,],
122
-                    ['title' => $this->textcats->T('order_head_paymenthethod'), 'key' => 'o_paymentmethod', 'width' => 125, 'linked' => false,],
123
-                    ['title' => $this->textcats->T('order_head_paid'), 'key' => 'o_paymentcompleted', 'width' => 60, 'linked' => false,],
124
-                    ['title' => $this->textcats->T('order_head_status'), 'key' => 'o_order_status', 'width' => 80, 'linked' => false,],
125
-                    ['title' => $this->textcats->T('order_head_shipping_service'), 'key' => 'o_shipping_service', 'width' => 90, 'linked' => false,],
126
-                    ['title' => $this->textcats->T('order_head_shipping_trackingno'), 'key' => 'o_shipping_trackingno', 'width' => 130, 'linked' => false,],
121
+                    ['title' => $this->textcats->T('order_head_orderdate'), 'key' => 'o_ordertime', 'width' => 110, 'linked' => false, ],
122
+                    ['title' => $this->textcats->T('order_head_paymenthethod'), 'key' => 'o_paymentmethod', 'width' => 125, 'linked' => false, ],
123
+                    ['title' => $this->textcats->T('order_head_paid'), 'key' => 'o_paymentcompleted', 'width' => 60, 'linked' => false, ],
124
+                    ['title' => $this->textcats->T('order_head_status'), 'key' => 'o_order_status', 'width' => 80, 'linked' => false, ],
125
+                    ['title' => $this->textcats->T('order_head_shipping_service'), 'key' => 'o_shipping_service', 'width' => 90, 'linked' => false, ],
126
+                    ['title' => $this->textcats->T('order_head_shipping_trackingno'), 'key' => 'o_shipping_trackingno', 'width' => 130, 'linked' => false, ],
127 127
                     [
128 128
                         'title' => $this->textcats->T('order_show'),
129 129
                         'key' => 'o_id',
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                         'linked' => true,
132 132
                         'ltarget' => '/_misc/myorders.html',
133 133
                         'lkeyname' => 'id',
134
-                        'lgetvars' => ['action' => 'show',],
134
+                        'lgetvars' => ['action' => 'show', ],
135 135
                     ],
136 136
                 ];
137 137
 
Please login to merge, or discard this patch.