@@ -41,8 +41,9 @@ |
||
| 41 | 41 | ], json_encode($request)); |
| 42 | 42 | $httpResponse = $httpRequest->send(); |
| 43 | 43 | return $httpResponse->json() == 1; |
| 44 | - } else |
|
| 45 | - return false; |
|
| 44 | + } else { |
|
| 45 | + return false; |
|
| 46 | + } |
|
| 46 | 47 | } |
| 47 | 48 | |
| 48 | 49 | public function isCancelled() |
@@ -24,8 +24,12 @@ |
||
| 24 | 24 | $data['CustomerIndexField'] = $this->getCard()->getPostcode(); |
| 25 | 25 | $data['CustomerCountryField'] = $this->getCard()->getCountry(); |
| 26 | 26 | $data['EmailField'] = $this->getCard()->getEmail(); |
| 27 | - if($this->getParameter('Language')) $data['Language'] = $this->getParameter('Language');
|
|
| 28 | - if($this->getParameter('QAResultStatus')) $data['QAResultStatus'] = $this->getParameter('QAResultStatus');
|
|
| 27 | + if($this->getParameter('Language')) { |
|
| 28 | + $data['Language'] = $this->getParameter('Language'); |
|
| 29 | + } |
|
| 30 | + if($this->getParameter('QAResultStatus')) { |
|
| 31 | + $data['QAResultStatus'] = $this->getParameter('QAResultStatus'); |
|
| 32 | + } |
|
| 29 | 33 | return $data; |
| 30 | 34 | } |
| 31 | 35 | |
@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | $this->request['user'] = 'testpelecard3'; |
| 28 | 28 | $this->request['password'] = 'Q3EJB8Ah'; |
| 29 | 29 | $this->request['terminal'] = '0962210'; |
| 30 | - } |
|
| 31 | - else{ |
|
| 30 | + } else{ |
|
| 32 | 31 | $this->request['user'] = $this->getParameter('user'); |
| 33 | 32 | $this->request['password'] = $this->getParameter('password'); |
| 34 | 33 | $this->request['terminal'] = $this->getParameter('terminal'); |
@@ -141,12 +140,15 @@ discard block |
||
| 141 | 140 | if ($value !== null) { |
| 142 | 141 | $value = strtoupper($value); |
| 143 | 142 | } |
| 144 | - if ($value == 'NIS') |
|
| 145 | - return $this->setParameter('currency', 1); |
|
| 146 | - if ($value == 'USD') |
|
| 147 | - return $this->setParameter('currency', 2); |
|
| 148 | - if ($value == 'EUR') |
|
| 149 | - return $this->setParameter('currency', 978); |
|
| 143 | + if ($value == 'NIS') { |
|
| 144 | + return $this->setParameter('currency', 1); |
|
| 145 | + } |
|
| 146 | + if ($value == 'USD') { |
|
| 147 | + return $this->setParameter('currency', 2); |
|
| 148 | + } |
|
| 149 | + if ($value == 'EUR') { |
|
| 150 | + return $this->setParameter('currency', 978); |
|
| 151 | + } |
|
| 150 | 152 | throw new RuntimeException('Unknown currency'); |
| 151 | 153 | } |
| 152 | 154 | |