@@ -355,9 +355,9 @@ discard block |
||
| 355 | 355 | |
| 356 | 356 | $aHashParams = array(); |
| 357 | 357 | foreach ($aParameters as $sKey => $sValue) { |
| 358 | - if(array_search($sKey, $aFrontendUnsetParams) !== false) { |
|
| 358 | + if (array_search($sKey, $aFrontendUnsetParams) !== false) { |
|
| 359 | 359 | unset($aParameters[$sKey]); |
| 360 | - } elseif(array_search($sKey, $aFrontendHashParams) !== false || stripos($sKey, '[') !== false) { |
|
| 360 | + } elseif (array_search($sKey, $aFrontendHashParams) !== false || stripos($sKey, '[') !== false) { |
|
| 361 | 361 | $aHashParams[$sKey] = $sValue; |
| 362 | 362 | } |
| 363 | 363 | } |
@@ -365,10 +365,10 @@ discard block |
||
| 365 | 365 | |
| 366 | 366 | $sUrlParams = '?'; |
| 367 | 367 | foreach ($aParameters as $sKey => $sValue) { |
| 368 | - $sUrlParams .= $sKey.'='.urlencode($sValue).'&'; |
|
| 368 | + $sUrlParams .= $sKey . '=' . urlencode($sValue) . '&'; |
|
| 369 | 369 | } |
| 370 | 370 | $sUrlParams = rtrim($sUrlParams, '&'); |
| 371 | - $sFrontendApiUrl = $sFrontendApiUrl.$sUrlParams; |
|
| 371 | + $sFrontendApiUrl = $sFrontendApiUrl . $sUrlParams; |
|
| 372 | 372 | |
| 373 | 373 | return $sFrontendApiUrl; |
| 374 | 374 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | const GIROPAY = 'GPY'; |
| 37 | 37 | const EPS_ONLINE_BANK_TRANSFER = 'EPS'; |
| 38 | 38 | const POSTFINANCE_EFINANCE = 'PFF'; |
| 39 | - const POSTFINANCE_CARD = 'PFC'; |
|
| 39 | + const POSTFINANCE_CARD = 'PFC'; |
|
| 40 | 40 | const IDEAL = 'IDL'; |
| 41 | 41 | const P24 = 'P24'; |
| 42 | 42 | |
@@ -23,12 +23,12 @@ |
||
| 23 | 23 | /** |
| 24 | 24 | * initalize paypal express checkout process |
| 25 | 25 | */ |
| 26 | - const PAYPAL_ECS_SET_EXPRESSCHECKOUT='setexpresscheckout'; |
|
| 26 | + const PAYPAL_ECS_SET_EXPRESSCHECKOUT = 'setexpresscheckout'; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * get customer shipping address from paypal |
| 30 | 30 | */ |
| 31 | - const PAYPAL_ECS_GET_EXPRESSCHECKOUTDETAILS='getexpresscheckoutdetails'; |
|
| 31 | + const PAYPAL_ECS_GET_EXPRESSCHECKOUTDETAILS = 'getexpresscheckoutdetails'; |
|
| 32 | 32 | |
| 33 | 33 | const RATEPAY_PROFILE = 'profile'; |
| 34 | 34 | |
@@ -34,6 +34,6 @@ |
||
| 34 | 34 | { |
| 35 | 35 | const DEVIANT_SURNAME = 'L'; |
| 36 | 36 | const DEVIANT_FIRSTNAME = 'F'; |
| 37 | - const DEVIANT_ADDRESS= 'A'; |
|
| 37 | + const DEVIANT_ADDRESS = 'A'; |
|
| 38 | 38 | const DEVIANT_DATE_OF_BIRTH = 'B'; |
| 39 | 39 | } |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | public function setStreet($street) |
| 160 | 160 | { |
| 161 | 161 | $sNewStreet2 = ''; |
| 162 | - if(stripos($street, '\n') !== false) {//MAGE-195 - split address by the \n and write it in the 2. address field |
|
| 162 | + if (stripos($street, '\n') !== false) {//MAGE-195 - split address by the \n and write it in the 2. address field |
|
| 163 | 163 | $aStreetExpl = explode('\n', $street); |
| 164 | 164 | |
| 165 | 165 | $street = $aStreetExpl[0]; |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | |
| 100 | 100 | protected function _toString($aValue) |
| 101 | 101 | { |
| 102 | - if($this->applyFilters) { |
|
| 102 | + if ($this->applyFilters) { |
|
| 103 | 103 | $result = $this->applyFilters->apply($aValue); |
| 104 | 104 | } else { |
| 105 | 105 | $protocolFactory = new Payone_Protocol_Factory(); |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | |
| 75 | 75 | $requestParams = $this->getMapperRequest()->map($request); |
| 76 | 76 | |
| 77 | - if($request->isFrontendApiCall() === false) { |
|
| 77 | + if ($request->isFrontendApiCall() === false) { |
|
| 78 | 78 | $responseRaw = $this->getAdapter()->request($requestParams); |
| 79 | 79 | } else { |
| 80 | 80 | $responseRaw = $request->getFrontendApiResponse(); |
@@ -91,17 +91,17 @@ discard block |
||
| 91 | 91 | public function __construct(array $data = array()) |
| 92 | 92 | { |
| 93 | 93 | if (empty($data)) { |
| 94 | - if($this->getApiConfig() === null) |
|
| 94 | + if ($this->getApiConfig() === null) |
|
| 95 | 95 | { |
| 96 | 96 | $this->apiConfig = new Payone_Api_Config(); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - if($this->getTransactionStatusConfig() === null) |
|
| 99 | + if ($this->getTransactionStatusConfig() === null) |
|
| 100 | 100 | { |
| 101 | 101 | $this->transactionStatusConfig = new Payone_TransactionStatus_Config(); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - if($this->getSessionStatusConfig() === null) |
|
| 104 | + if ($this->getSessionStatusConfig() === null) |
|
| 105 | 105 | { |
| 106 | 106 | $this->sessionStatusConfig = new Payone_SessionStatus_Config(); |
| 107 | 107 | } |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | $this->config = $this->getDefaultConfigData(); |
| 110 | 110 | } |
| 111 | 111 | else { |
| 112 | - if(array_key_exists('api', $data)) |
|
| 112 | + if (array_key_exists('api', $data)) |
|
| 113 | 113 | $this->setApiConfig($data['api']); |
| 114 | - if(array_key_exists('transaction_status', $data)) |
|
| 114 | + if (array_key_exists('transaction_status', $data)) |
|
| 115 | 115 | $this->setTransactionStatusConfig($data['transaction_status']); |
| 116 | - if(array_key_exists('session_status', $data)) |
|
| 116 | + if (array_key_exists('session_status', $data)) |
|
| 117 | 117 | $this->setSessionStatusConfig($data['session_status']); |
| 118 | 118 | $this->config = $data; |
| 119 | 119 | } |
@@ -453,9 +453,9 @@ discard block |
||
| 453 | 453 | * @param bool $asCdata |
| 454 | 454 | * @return DOMElement |
| 455 | 455 | */ |
| 456 | - protected function appendElement( $parent, $key, $value = null, $asCdata = false) |
|
| 456 | + protected function appendElement($parent, $key, $value = null, $asCdata = false) |
|
| 457 | 457 | { |
| 458 | - if($asCdata === true) |
|
| 458 | + if ($asCdata === true) |
|
| 459 | 459 | { |
| 460 | 460 | $cdata = $this->dom->createCDATASection($value); |
| 461 | 461 | $child = $this->dom->createElement($key); |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | else |
| 465 | 465 | { |
| 466 | 466 | $child = $this->dom->createElement($key); |
| 467 | - if($value !== null) |
|
| 467 | + if ($value !== null) |
|
| 468 | 468 | { |
| 469 | 469 | $domValue = $this->dom->createTextNode($value); |
| 470 | 470 | $child->appendChild($domValue); |