@@ -62,7 +62,7 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | public function __toString() |
| 64 | 64 | { |
| 65 | - if($this->applyFilters) { |
|
| 65 | + if ($this->applyFilters) { |
|
| 66 | 66 | $result = $this->applyFilters->apply($this->toArray()); |
| 67 | 67 | } else { |
| 68 | 68 | $protocolFactory = new Payone_Protocol_Factory(); |
@@ -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]; |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | { |
| 54 | 54 | $result = array(); |
| 55 | 55 | foreach ($this as $key => $data) { |
| 56 | - if (!is_array($data) and ! is_object($data)) { |
|
| 56 | + if (!is_array($data) and !is_object($data)) { |
|
| 57 | 57 | $result[$key] = $data; |
| 58 | 58 | } else if ($data instanceof Payone_Api_Response_Parameter_Interface) { |
| 59 | 59 | /** |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | $requestParams = $this->getMapperRequest()->map($request); |
| 68 | 68 | |
| 69 | - if($request->isFrontendApiCall() === false) { |
|
| 69 | + if ($request->isFrontendApiCall() === false) { |
|
| 70 | 70 | $responseRaw = $this->getAdapter()->request($requestParams); |
| 71 | 71 | } else { |
| 72 | 72 | $responseRaw = $request->getFrontendApiResponse(); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | public function map(Payone_Api_Request_Interface $request) |
| 31 | 31 | { |
| 32 | 32 | /** @var $request Payone_Api_Request_Authorization */ |
| 33 | - if($request->getAmount()) { |
|
| 33 | + if ($request->getAmount()) { |
|
| 34 | 34 | $this->mapAmount($request); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -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 | } |
@@ -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 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | public function __toString() |
| 159 | 159 | { |
| 160 | - if($this->applyFilters) { |
|
| 160 | + if ($this->applyFilters) { |
|
| 161 | 161 | $result = $this->applyFilters->apply($this->toArray()); |
| 162 | 162 | } else { |
| 163 | 163 | $protocolFactory = new Payone_Protocol_Factory(); |
@@ -415,10 +415,10 @@ discard block |
||
| 415 | 415 | |
| 416 | 416 | public function isFrontendApiCall() |
| 417 | 417 | { |
| 418 | - if($this instanceof Payone_Api_Request_Authorization_Abstract) { |
|
| 418 | + if ($this instanceof Payone_Api_Request_Authorization_Abstract) { |
|
| 419 | 419 | $oOrder = Mage::getSingleton('checkout/session')->getQuote(); |
| 420 | 420 | $oPayment = $oOrder->getPayment(); |
| 421 | - if($oPayment->getMethod() == 'payone_creditcard_iframe') { |
|
| 421 | + if ($oPayment->getMethod() == 'payone_creditcard_iframe') { |
|
| 422 | 422 | return true; |
| 423 | 423 | } |
| 424 | 424 | } |
@@ -358,9 +358,9 @@ discard block |
||
| 358 | 358 | |
| 359 | 359 | $aHashParams = array(); |
| 360 | 360 | foreach ($aParameters as $sKey => $sValue) { |
| 361 | - if(array_search($sKey, $aFrontendUnsetParams) !== false) { |
|
| 361 | + if (array_search($sKey, $aFrontendUnsetParams) !== false) { |
|
| 362 | 362 | unset($aParameters[$sKey]); |
| 363 | - } elseif(array_search($sKey, $aFrontendHashParams) !== false || stripos($sKey, '[') !== false) { |
|
| 363 | + } elseif (array_search($sKey, $aFrontendHashParams) !== false || stripos($sKey, '[') !== false) { |
|
| 364 | 364 | $aHashParams[$sKey] = $sValue; |
| 365 | 365 | } |
| 366 | 366 | } |
@@ -369,11 +369,11 @@ discard block |
||
| 369 | 369 | |
| 370 | 370 | $sUrlParams = '?'; |
| 371 | 371 | foreach ($aParameters as $sKey => $sValue) { |
| 372 | - $sUrlParams .= $sKey.'='.urlencode($sValue).'&'; |
|
| 372 | + $sUrlParams .= $sKey . '=' . urlencode($sValue) . '&'; |
|
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | $sUrlParams = rtrim($sUrlParams, '&'); |
| 376 | - $sFrontendApiUrl = $sFrontendApiUrl.$sUrlParams; |
|
| 376 | + $sFrontendApiUrl = $sFrontendApiUrl . $sUrlParams; |
|
| 377 | 377 | |
| 378 | 378 | return $sFrontendApiUrl; |
| 379 | 379 | } |