@@ -225,6 +225,9 @@ |
||
| 225 | 225 | ); |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | + /** |
|
| 229 | + * @param string $message |
|
| 230 | + */ |
|
| 228 | 231 | private function errorResponse($message) |
| 229 | 232 | { |
| 230 | 233 | $content = $this->templating->render( |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | return $this->successResponse($payment); |
| 104 | 104 | } |
| 105 | 105 | } catch (Exception\Declined $e) { |
| 106 | - return $this->errorResponse('Payment declined: ' . print_r($e->getErrors(), true)); |
|
| 106 | + return $this->errorResponse('Payment declined: '.print_r($e->getErrors(), true)); |
|
| 107 | 107 | } catch (Exception\Runtime $e) { |
| 108 | - return $this->errorResponse('Unexpected error occured: ' . print_r($e, true)); |
|
| 108 | + return $this->errorResponse('Unexpected error occured: '.print_r($e, true)); |
|
| 109 | 109 | }; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | return new RedirectResponse($this->router->generate('cardinity_client.payment_success')); |
| 166 | 166 | } |
| 167 | 167 | } catch (Exception\Runtime $e) { |
| 168 | - return $this->errorResponse('Unexpected error occured. ' . $e->getMessage() . ': ' . print_r($e->getErrors(), true)); |
|
| 168 | + return $this->errorResponse('Unexpected error occured. '.$e->getMessage().': '.print_r($e->getErrors(), true)); |
|
| 169 | 169 | }; |
| 170 | 170 | |
| 171 | 171 | return $this->errorResponse('Unexpected response while finalizing payment'); |