@@ -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 | } |
@@ -75,8 +75,7 @@ |
||
| 75 | 75 | $response = $this->getMapperResponse()->map($responseRaw); |
| 76 | 76 | |
| 77 | 77 | $this->protocol($request, $response); |
| 78 | - } |
|
| 79 | - catch (Exception $e) { |
|
| 78 | + } catch (Exception $e) { |
|
| 80 | 79 | $this->protocolException($e, $request); |
| 81 | 80 | throw $e; |
| 82 | 81 | } |
@@ -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 | |
@@ -45,17 +45,13 @@ |
||
| 45 | 45 | |
| 46 | 46 | if ($this->isValid()) { |
| 47 | 47 | $response = new Payone_Api_Response_3dsCheck_Valid($params); |
| 48 | - } |
|
| 49 | - elseif ($this->isEnrolled()) { |
|
| 48 | + } elseif ($this->isEnrolled()) { |
|
| 50 | 49 | $response = new Payone_Api_Response_3dsCheck_Enrolled($params); |
| 51 | - } |
|
| 52 | - elseif ($this->isInvalid()) { |
|
| 50 | + } elseif ($this->isInvalid()) { |
|
| 53 | 51 | $response = new Payone_Api_Response_3dsCheck_Invalid($params); |
| 54 | - } |
|
| 55 | - elseif ($this->isError()) { |
|
| 52 | + } elseif ($this->isError()) { |
|
| 56 | 53 | $response = new Payone_Api_Response_Error($params); |
| 57 | - } |
|
| 58 | - else { |
|
| 54 | + } else { |
|
| 59 | 55 | throw new Payone_Api_Exception_UnknownStatus(); |
| 60 | 56 | } |
| 61 | 57 | |
@@ -46,17 +46,13 @@ |
||
| 46 | 46 | |
| 47 | 47 | if ($this->isValid()) { |
| 48 | 48 | $response = new Payone_Api_Response_BankAccountCheck_Valid($params); |
| 49 | - } |
|
| 50 | - elseif ($this->isInvalid()) { |
|
| 49 | + } elseif ($this->isInvalid()) { |
|
| 51 | 50 | $response = new Payone_Api_Response_BankAccountCheck_Invalid($params); |
| 52 | - } |
|
| 53 | - elseif ($this->isBlocked()) { |
|
| 51 | + } elseif ($this->isBlocked()) { |
|
| 54 | 52 | $response = new Payone_Api_Response_BankAccountCheck_Blocked($params); |
| 55 | - } |
|
| 56 | - elseif ($this->isError()) { |
|
| 53 | + } elseif ($this->isError()) { |
|
| 57 | 54 | $response = new Payone_Api_Response_Error($params); |
| 58 | - } |
|
| 59 | - else { |
|
| 55 | + } else { |
|
| 60 | 56 | throw new Payone_Api_Exception_UnknownStatus(); |
| 61 | 57 | } |
| 62 | 58 | |
@@ -46,14 +46,11 @@ |
||
| 46 | 46 | |
| 47 | 47 | if ($this->isApproved()) { |
| 48 | 48 | $response = new Payone_Api_Response_Preauthorization_Approved($params); |
| 49 | - } |
|
| 50 | - elseif ($this->isRedirect()) { |
|
| 49 | + } elseif ($this->isRedirect()) { |
|
| 51 | 50 | $response = new Payone_Api_Response_Preauthorization_Redirect($params); |
| 52 | - } |
|
| 53 | - elseif ($this->isError()) { |
|
| 51 | + } elseif ($this->isError()) { |
|
| 54 | 52 | $response = new Payone_Api_Response_Error($params); |
| 55 | - } |
|
| 56 | - else { |
|
| 53 | + } else { |
|
| 57 | 54 | throw new Payone_Api_Exception_UnknownStatus(); |
| 58 | 55 | } |
| 59 | 56 | |
@@ -34,17 +34,13 @@ |
||
| 34 | 34 | |
| 35 | 35 | if ($this->isApproved()) { |
| 36 | 36 | $response = new Payone_Api_Response_Genericpayment_Approved($params); |
| 37 | - } |
|
| 38 | - elseif ($this->isOk()) { |
|
| 37 | + } elseif ($this->isOk()) { |
|
| 39 | 38 | $response = new Payone_Api_Response_Genericpayment_Ok($params); |
| 40 | - } |
|
| 41 | - elseif ($this->isRedirect()) { |
|
| 39 | + } elseif ($this->isRedirect()) { |
|
| 42 | 40 | $response = new Payone_Api_Response_Genericpayment_Redirect($params); |
| 43 | - } |
|
| 44 | - elseif ($this->isError()) { |
|
| 41 | + } elseif ($this->isError()) { |
|
| 45 | 42 | $response = new Payone_Api_Response_Error($params); |
| 46 | - } |
|
| 47 | - else { |
|
| 43 | + } else { |
|
| 48 | 44 | throw new Payone_Api_Exception_UnknownStatus(); |
| 49 | 45 | } |
| 50 | 46 | |
@@ -158,8 +158,7 @@ |
||
| 158 | 158 | { |
| 159 | 159 | if (is_array($this->params) and array_key_exists($key, $this->params)) { |
| 160 | 160 | return $this->params[$key]; |
| 161 | - } |
|
| 162 | - else |
|
| 161 | + } else |
|
| 163 | 162 | { |
| 164 | 163 | return null; |
| 165 | 164 | } |
@@ -45,14 +45,11 @@ |
||
| 45 | 45 | |
| 46 | 46 | if ($this->isValid()) { |
| 47 | 47 | $response = new Payone_Api_Response_AddressCheck_Valid($params); |
| 48 | - } |
|
| 49 | - elseif ($this->isInvalid()) { |
|
| 48 | + } elseif ($this->isInvalid()) { |
|
| 50 | 49 | $response = new Payone_Api_Response_AddressCheck_Invalid($params); |
| 51 | - } |
|
| 52 | - elseif ($this->isError()) { |
|
| 50 | + } elseif ($this->isError()) { |
|
| 53 | 51 | $response = new Payone_Api_Response_Error($params); |
| 54 | - } |
|
| 55 | - else { |
|
| 52 | + } else { |
|
| 56 | 53 | throw new Payone_Api_Exception_UnknownStatus(); |
| 57 | 54 | } |
| 58 | 55 | |