Conditions | 3 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | public function handle(array $handlingSubject, array $response) |
||
39 | { |
||
40 | if (!isset($handlingSubject['payment']) |
||
41 | || !$handlingSubject['payment'] instanceof PaymentDataObjectInterface |
||
42 | ) { |
||
43 | throw new InvalidArgumentException('Payment data object should be provided'); |
||
44 | } |
||
45 | |||
46 | $paymentDO = $handlingSubject['payment']; |
||
47 | |||
48 | $payment = $paymentDO->getPayment(); |
||
49 | |||
50 | $order = $payment->getOrder(); |
||
51 | |||
52 | $payBoleto = $response[self::RESPONSE_BOLETO]; |
||
53 | |||
54 | $order->setExtOrderId($payBoleto[self::RESPONSE_BOLETO_ID]); |
||
55 | } |
||
57 |