public function initiate($data = array())
    {
        if ($this->payment->Status !== 'Created') {
            throw new InvalidStateException('Cannot create a card for this payment. Status is not "Created"');
        }

        if (!$this->payment->isInDB()) {
            $this->payment->write();
        }

        $gateway = $this->oGateway();
        if (!$gateway->supportsCreateCard()) {
            throw new InvalidConfigurationException(
                sprintf('The gateway "%s" doesn\'t support create card', $this->payment->Gateway)
            );
        }

        $gatewayData = $this->gatherGatewayData($data);

        $this->extend('onBeforeCreateCard', $gatewayData);
        $request = $this->oGateway()->createCard($gatewayData);
        $this->extend('onAfterCreateCard', $request);

        $this->createMessage(Message\CreateCardRequest::class, $request);

        try {
            $response = $this->response = $request->send();
        } catch (\Omnipay\Common\Exception\OmnipayException $e) {
            $this->createMessage(Message\CreateCardError::class, $e);
            // create an error response
            return $this->generateServiceResponse(ServiceResponse::SERVICE_ERROR);
        }

        ErrorHandling::safeExtend($this, 'onAfterSendCreateCard', $request, $response);

        $serviceResponse = $this->wrapOmnipayResponse($response);

        if ($serviceResponse->isRedirect() || $serviceResponse->isAwaitingNotification()) {
            $this->payment->Status = 'PendingCreateCard';
            $this->payment->write();

            $this->createMessage(
                $serviceResponse->isRedirect() ? Message\CreateCardRedirectResponse::class : Message\AwaitingCreateCardResponse::class,
                $response
            );
        } elseif ($serviceResponse->isError()) {
            $this->createMessage(Message\CreateCardError::class, $response);
        } else {
            $this->markCompleted('CardCreated', $serviceResponse, $response);
        }

        return $serviceResponse;
    }