Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function build(array $buildSubject) |
||
31 | { |
||
32 | if (!isset($buildSubject['payment']) |
||
33 | || !$buildSubject['payment'] instanceof PaymentDataObjectInterface |
||
34 | ) { |
||
35 | throw new InvalidArgumentException('Payment data object should be provided'); |
||
36 | } |
||
37 | |||
38 | $paymentDO = $buildSubject['payment']; |
||
39 | |||
40 | $payment = $paymentDO->getPayment(); |
||
41 | |||
42 | return [ |
||
43 | self::GETNET_PAYMENT_ID => $payment->getLastTransId(), |
||
44 | ]; |
||
47 |