public function submitCode()
    {
        if (!$this->model->validate()) {
            throw new PhoneConfirmationException('Form validation failed');
        }

        try {
            Contact::perform('confirm-phone', [
                'id' => $this->model->id,
                'type' => $this->model->type,
                'phone' => $this->model->phone,
                'code' => $this->model->code,
            ]);
        } catch (ResponseErrorException $e) {
            if ($e->getMessage() === 'wrong code') {
                throw new PhoneConfirmationException(Yii::t('hipanel:client', 'Wrong confirmation code'));
            }

            throw new PhoneConfirmationException($e->getMessage());
        }

        return true;
    }