| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | public function build(array $buildSubject) |
||
| 51 | { |
||
| 52 | if (!isset($buildSubject['payment']) |
||
| 53 | || !$buildSubject['payment'] instanceof PaymentDataObjectInterface |
||
| 54 | ) { |
||
| 55 | throw new InvalidArgumentException('Payment data object should be provided'); |
||
| 56 | } |
||
| 57 | |||
| 58 | $paymentDO = $buildSubject['payment']; |
||
| 59 | |||
| 60 | $payment = $paymentDO->getPayment(); |
||
| 61 | |||
| 62 | $order = $payment->getOrder(); |
||
| 63 | |||
| 64 | return [ |
||
| 65 | self::GETNET_ORDER_ID => $order->getExtOrderId(), |
||
| 66 | self::ORDER_STATE => $order->getState(), |
||
| 67 | ]; |
||
| 70 |