| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 2 | public function execute($request) |
|
| 25 | { |
||
| 26 | 2 | RequestNotSupportedException::assertSupports($this, $request); |
|
| 27 | 2 | $details = ArrayObject::ensureArrayObject($request->getModel()); |
|
| 28 | |||
| 29 | 2 | $httpRequest = new GetHttpRequest(); |
|
| 30 | 2 | $this->gateway->execute($httpRequest); |
|
| 31 | |||
| 32 | 2 | if ($this->api->verifyHash($httpRequest->request) === false) { |
|
| 33 | 1 | throw new HttpResponse('0|CheckMacValue verify fail.', 400, ['Content-Type' => 'text/plain']); |
|
| 34 | } |
||
| 35 | |||
| 36 | 1 | $details->replace($httpRequest->request); |
|
| 37 | |||
| 38 | 1 | throw new HttpResponse('1|OK', 200, ['Content-Type' => 'text/plain']); |
|
| 39 | } |
||
| 40 | |||
| 51 |