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