@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function __toString() |
| 158 | 158 | { |
| 159 | - if($this->applyFilters) { |
|
| 159 | + if ($this->applyFilters) { |
|
| 160 | 160 | $result = $this->applyFilters->apply($this->toArray()); |
| 161 | 161 | } else { |
| 162 | 162 | $protocolFactory = new Payone_Protocol_Factory(); |
@@ -409,10 +409,10 @@ discard block |
||
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | public function isFrontendApiCall() { |
| 412 | - if($this instanceof Payone_Api_Request_Authorization_Abstract) { |
|
| 412 | + if ($this instanceof Payone_Api_Request_Authorization_Abstract) { |
|
| 413 | 413 | $oOrder = Mage::getSingleton('checkout/session')->getQuote(); |
| 414 | 414 | $oPayment = $oOrder->getPayment(); |
| 415 | - if($oPayment->getMethod() == 'payone_creditcard_iframe') { |
|
| 415 | + if ($oPayment->getMethod() == 'payone_creditcard_iframe') { |
|
| 416 | 416 | return true; |
| 417 | 417 | } |
| 418 | 418 | } |
@@ -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 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | public function toArray() { |
| 50 | 50 | $result = array(); |
| 51 | 51 | foreach ($this as $key => $data) { |
| 52 | - if (!is_array($data) and ! is_object($data)) { |
|
| 52 | + if (!is_array($data) and !is_object($data)) { |
|
| 53 | 53 | $result[$key] = $data; |
| 54 | 54 | } else if ($data instanceof Payone_Api_Response_Parameter_Interface) { |
| 55 | 55 | /** |
@@ -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(); |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | */ |
| 90 | 90 | public function getPayDataArray() { |
| 91 | 91 | $aPayData = array(); |
| 92 | - foreach($this->getPayData()->getItems() as $item) { |
|
| 92 | + foreach ($this->getPayData()->getItems() as $item) { |
|
| 93 | 93 | $sCorrectedKey = strtolower($item->getKey()); |
| 94 | 94 | $sCorrectedKey = str_replace('-', '_', $sCorrectedKey); |
| 95 | 95 | $aPayData[$sCorrectedKey] = $item->getData(); |