@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function __construct($fqcn, $logger, $priority, $message, $timeStamp = null, Exception $throwable = null) { |
| 129 | 129 | $this->fqcn = $fqcn; |
| 130 | - if($logger instanceof Payone_Log4php_Logger) { |
|
| 130 | + if ($logger instanceof Payone_Log4php_Logger) { |
|
| 131 | 131 | $this->logger = $logger; |
| 132 | 132 | $this->categoryName = $logger->getName(); |
| 133 | 133 | } else { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | } |
| 136 | 136 | $this->level = $priority; |
| 137 | 137 | $this->message = $message; |
| 138 | - if($timeStamp !== null && is_float($timeStamp)) { |
|
| 138 | + if ($timeStamp !== null && is_float($timeStamp)) { |
|
| 139 | 139 | $this->timeStamp = $timeStamp; |
| 140 | 140 | } else { |
| 141 | 141 | $this->timeStamp = microtime(true); |
@@ -164,18 +164,18 @@ discard block |
||
| 164 | 164 | * @return Payone_Log4php_LoggerLocationInfo |
| 165 | 165 | */ |
| 166 | 166 | public function getLocationInformation() { |
| 167 | - if($this->locationInfo === null) { |
|
| 167 | + if ($this->locationInfo === null) { |
|
| 168 | 168 | |
| 169 | 169 | $locationInfo = array(); |
| 170 | 170 | $trace = debug_backtrace(); |
| 171 | 171 | $prevHop = null; |
| 172 | 172 | // make a downsearch to identify the caller |
| 173 | 173 | $hop = array_pop($trace); |
| 174 | - while($hop !== null) { |
|
| 175 | - if(isset($hop['class'])) { |
|
| 174 | + while ($hop !== null) { |
|
| 175 | + if (isset($hop['class'])) { |
|
| 176 | 176 | // we are sometimes in functions = no class available: avoid php warning here |
| 177 | 177 | $className = strtolower($hop['class']); |
| 178 | - if(!empty($className) and ($className == 'logger' or |
|
| 178 | + if (!empty($className) and ($className == 'logger' or |
|
| 179 | 179 | strtolower(get_parent_class($className)) == 'logger')) { |
| 180 | 180 | $locationInfo['line'] = $hop['line']; |
| 181 | 181 | $locationInfo['file'] = $hop['file']; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $hop = array_pop($trace); |
| 187 | 187 | } |
| 188 | 188 | $locationInfo['class'] = isset($prevHop['class']) ? $prevHop['class'] : 'main'; |
| 189 | - if(isset($prevHop['function']) and |
|
| 189 | + if (isset($prevHop['function']) and |
|
| 190 | 190 | $prevHop['function'] !== 'include' and |
| 191 | 191 | $prevHop['function'] !== 'include_once' and |
| 192 | 192 | $prevHop['function'] !== 'require' and |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | * @return mixed |
| 239 | 239 | */ |
| 240 | 240 | public function getMessage() { |
| 241 | - if($this->message !== null) { |
|
| 241 | + if ($this->message !== null) { |
|
| 242 | 242 | return $this->message; |
| 243 | 243 | } else { |
| 244 | 244 | return $this->getRenderedMessage(); |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | * @return string |
| 254 | 254 | */ |
| 255 | 255 | public function getNDC() { |
| 256 | - if($this->ndcLookupRequired) { |
|
| 256 | + if ($this->ndcLookupRequired) { |
|
| 257 | 257 | $this->ndcLookupRequired = false; |
| 258 | 258 | $this->ndc = Payone_Log4php_LoggerNDC::get(); |
| 259 | 259 | } |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | * Returns the entire MDC context. |
| 274 | 274 | * @return array |
| 275 | 275 | */ |
| 276 | - public function getMDCMap () { |
|
| 276 | + public function getMDCMap() { |
|
| 277 | 277 | return Payone_Log4php_LoggerMDC::getMap(); |
| 278 | 278 | } |
| 279 | 279 | |
@@ -282,12 +282,12 @@ discard block |
||
| 282 | 282 | * @return string |
| 283 | 283 | */ |
| 284 | 284 | public function getRenderedMessage() { |
| 285 | - if($this->renderedMessage === null and $this->message !== null) { |
|
| 286 | - if(is_string($this->message)) { |
|
| 285 | + if ($this->renderedMessage === null and $this->message !== null) { |
|
| 286 | + if (is_string($this->message)) { |
|
| 287 | 287 | $this->renderedMessage = $this->message; |
| 288 | 288 | } else { |
| 289 | 289 | $rendererMap = Payone_Log4php_Logger::getHierarchy()->getRendererMap(); |
| 290 | - $this->renderedMessage= $rendererMap->findAndRender($this->message); |
|
| 290 | + $this->renderedMessage = $rendererMap->findAndRender($this->message); |
|
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | return $this->renderedMessage; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | * @return float |
| 300 | 300 | */ |
| 301 | 301 | public static function getStartTime() { |
| 302 | - if(!isset(self::$startTime)) { |
|
| 302 | + if (!isset(self::$startTime)) { |
|
| 303 | 303 | self::$startTime = microtime(true); |
| 304 | 304 | } |
| 305 | 305 | return self::$startTime; |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | /** |
| 627 | 627 | * @param string $clearing_bankaccount |
| 628 | 628 | */ |
| 629 | - public function setClearingBankaccount( $clearing_bankaccount) |
|
| 629 | + public function setClearingBankaccount($clearing_bankaccount) |
|
| 630 | 630 | { |
| 631 | 631 | $this->clearing_bankaccount = $clearing_bankaccount; |
| 632 | 632 | } |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | /** |
| 643 | 643 | * @param string $clearing_bankaccountholder |
| 644 | 644 | */ |
| 645 | - public function setClearingBankaccountholder( $clearing_bankaccountholder) |
|
| 645 | + public function setClearingBankaccountholder($clearing_bankaccountholder) |
|
| 646 | 646 | { |
| 647 | 647 | $this->clearing_bankaccountholder = $clearing_bankaccountholder; |
| 648 | 648 | } |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | /** |
| 659 | 659 | * @param string $clearing_bankbic |
| 660 | 660 | */ |
| 661 | - public function setClearingBankbic( $clearing_bankbic) |
|
| 661 | + public function setClearingBankbic($clearing_bankbic) |
|
| 662 | 662 | { |
| 663 | 663 | $this->clearing_bankbic = $clearing_bankbic; |
| 664 | 664 | } |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | /** |
| 675 | 675 | * @param string $clearing_bankcity |
| 676 | 676 | */ |
| 677 | - public function setClearingBankcity( $clearing_bankcity) |
|
| 677 | + public function setClearingBankcity($clearing_bankcity) |
|
| 678 | 678 | { |
| 679 | 679 | $this->clearing_bankcity = $clearing_bankcity; |
| 680 | 680 | } |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | /** |
| 691 | 691 | * @param string $clearing_bankcode |
| 692 | 692 | */ |
| 693 | - public function setClearingBankcode( $clearing_bankcode) |
|
| 693 | + public function setClearingBankcode($clearing_bankcode) |
|
| 694 | 694 | { |
| 695 | 695 | $this->clearing_bankcode = $clearing_bankcode; |
| 696 | 696 | } |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | /** |
| 707 | 707 | * @param string $clearing_bankcountry |
| 708 | 708 | */ |
| 709 | - public function setClearingBankcountry( $clearing_bankcountry) |
|
| 709 | + public function setClearingBankcountry($clearing_bankcountry) |
|
| 710 | 710 | { |
| 711 | 711 | $this->clearing_bankcountry = $clearing_bankcountry; |
| 712 | 712 | } |
@@ -722,7 +722,7 @@ discard block |
||
| 722 | 722 | /** |
| 723 | 723 | * @param string $clearing_bankiban |
| 724 | 724 | */ |
| 725 | - public function setClearingBankiban( $clearing_bankiban) |
|
| 725 | + public function setClearingBankiban($clearing_bankiban) |
|
| 726 | 726 | { |
| 727 | 727 | $this->clearing_bankiban = $clearing_bankiban; |
| 728 | 728 | } |
@@ -738,7 +738,7 @@ discard block |
||
| 738 | 738 | /** |
| 739 | 739 | * @param string $clearing_bankname |
| 740 | 740 | */ |
| 741 | - public function setClearingBankname( $clearing_bankname) |
|
| 741 | + public function setClearingBankname($clearing_bankname) |
|
| 742 | 742 | { |
| 743 | 743 | $this->clearing_bankname = $clearing_bankname; |
| 744 | 744 | } |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | /** |
| 755 | 755 | * @param string $clearing_duedate |
| 756 | 756 | */ |
| 757 | - public function setClearingDuedate( $clearing_duedate) |
|
| 757 | + public function setClearingDuedate($clearing_duedate) |
|
| 758 | 758 | { |
| 759 | 759 | $this->clearing_duedate = $clearing_duedate; |
| 760 | 760 | } |
@@ -770,7 +770,7 @@ discard block |
||
| 770 | 770 | /** |
| 771 | 771 | * @param string $clearing_instructionnote |
| 772 | 772 | */ |
| 773 | - public function setClearingInstructionnote( $clearing_instructionnote) |
|
| 773 | + public function setClearingInstructionnote($clearing_instructionnote) |
|
| 774 | 774 | { |
| 775 | 775 | $this->clearing_instructionnote = $clearing_instructionnote; |
| 776 | 776 | } |
@@ -786,7 +786,7 @@ discard block |
||
| 786 | 786 | /** |
| 787 | 787 | * @param string $clearing_legalnote |
| 788 | 788 | */ |
| 789 | - public function setClearingLegalnote( $clearing_legalnote) |
|
| 789 | + public function setClearingLegalnote($clearing_legalnote) |
|
| 790 | 790 | { |
| 791 | 791 | $this->clearing_legalnote = $clearing_legalnote; |
| 792 | 792 | } |
@@ -802,7 +802,7 @@ discard block |
||
| 802 | 802 | /** |
| 803 | 803 | * @param string $clearing_reference |
| 804 | 804 | */ |
| 805 | - public function setClearingReference( $clearing_reference) |
|
| 805 | + public function setClearingReference($clearing_reference) |
|
| 806 | 806 | { |
| 807 | 807 | $this->clearing_reference = $clearing_reference; |
| 808 | 808 | } |
@@ -42,6 +42,6 @@ |
||
| 42 | 42 | const REMINDER = 'reminder'; |
| 43 | 43 | const VAUTHORIZATION = 'vauthorization'; |
| 44 | 44 | const VSETTLEMENT = 'vsettlement'; |
| 45 | - const TRANSFER= 'transfer'; |
|
| 46 | - const INVOICE= 'invoice'; |
|
| 45 | + const TRANSFER = 'transfer'; |
|
| 46 | + const INVOICE = 'invoice'; |
|
| 47 | 47 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | // |
| 98 | 98 | $response = new Payone_TransactionStatus_Response('TSOK'); |
| 99 | 99 | |
| 100 | - if($request->getClearingtype() == 'cc') { |
|
| 100 | + if ($request->getClearingtype() == 'cc') { |
|
| 101 | 101 | $this->_handleTransactionId($request); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $oFactory = new Payone_Core_Model_Factory(); |
| 117 | 117 | $oTransaction = $oFactory->getModelTransaction(); |
| 118 | 118 | $oTransaction->load($oRequest->getReference(), 'reference'); |
| 119 | - if($oTransaction->getFrontendApiCall() == 1 && !$oTransaction->getTxid()) { |
|
| 119 | + if ($oTransaction->getFrontendApiCall() == 1 && !$oTransaction->getTxid()) { |
|
| 120 | 120 | $oTransaction->setTxid($oRequest->getTxid()); |
| 121 | 121 | $oTransaction->save(); |
| 122 | 122 | } |
@@ -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 | |
@@ -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 | |