Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function execute($request): void |
||
20 | { |
||
21 | RequestNotSupportedException::assertSupports($this, $request); |
||
22 | $details = ArrayObject::ensureArrayObject($request->getModel()); |
||
23 | |||
24 | if (isset($details['iyzico_status'])) { |
||
25 | if (IyzicoBridgeInterface::COMPLETED_STATUS === $details['iyzico_status']) { |
||
26 | $request->markCaptured(); |
||
27 | return; |
||
28 | } |
||
29 | |||
30 | if (IyzicoBridgeInterface::FAILED_STATUS === $details['iyzico_status']) { |
||
31 | $request->markFailed(); |
||
32 | return; |
||
33 | } |
||
34 | } else { |
||
35 | $request->markNew(); |
||
36 | return; |
||
37 | } |
||
54 |