public function onPaymentStateChange(PaymentEvent $event)
    {
        $payment = $event->getPayment();
        if (!$payment instanceof OrderPayment) {
            return;
        }

        $order = $payment->getOrder();

        $this->stateResolver->resolve($order, $event);

        $this->updateOrder($order, $event, true);
    }
public function onPaymentStateChange(PaymentEvent $event)
    {
        $payment = $event->getPayment();
        if (!$payment instanceof OrderPayment) {
            return;
        }

        $order = $payment->getOrder();

        $this->stateResolver->resolve($order, $event);

        $this->updateOrder($order, $event, true);
    }
public function onPaymentStateChange ( PaymentEvent $ event ) { $ payment = $ event -> getPayment ( ) ; if ( ! $ payment instanceof OrderPayment ) { return ; } $ order = $ payment -> getOrder ( ) ; $ this -> stateResolver -> resolve ( $ order , $ event ) ; $ this -> updateOrder ( $ order , $ event , true ) ; }
Payment state change event handler.

@param PaymentEvent $event
Payment state change event handler .