public function onRefunded($response)
    {
        $order = $this->owner->Invoice();

        if ($order->exists()) {
            $order->markRefunded();
            $order->write();
        }
    }
public function onRefunded($response)
    {
        $order = $this->owner->Invoice();

        if ($order->exists()) {
            $order->markRefunded();
            $order->write();
        }
    }
public function onRefunded ( $ response ) { $ order = $ this -> owner -> Invoice ( ) ; if ( $ order -> exists ( ) ) { $ order -> markRefunded ( ) ; $ order -> write ( ) ; } }
Process attached order when payment is refunded

@param ServiceResponse $response
@return void
Process attached order when payment is refunded