| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function execute($request): void |
||
| 21 | { |
||
| 22 | RequestNotSupportedException::assertSupports($this, $request); |
||
| 23 | |||
| 24 | /** @var PaymentInterface $payment */ |
||
| 25 | $payment = $request->getSource(); |
||
| 26 | |||
| 27 | $details = ArrayObject::ensureArrayObject($payment->getDetails()); |
||
| 28 | |||
| 29 | $this->gateway->execute($currency = new GetCurrency($payment->getCurrencyCode())); |
||
| 30 | |||
| 31 | $details['amount'] = $payment->getTotalAmount() / 10 ** $currency->exp; |
||
| 32 | |||
| 33 | $details['orderId'] = $payment->getNumber(); |
||
| 34 | |||
| 35 | $request->setResult((array) $details); |
||
| 36 | } |
||
| 47 |