public function getData()
    {
        $data = $this->getBaseAuthorizeData();

        if ($this->getToken() || $this->getCardReference()) {
            // If using a token, then set that data.
            $data = $this->getTokenData($data);
        } else {
            // Otherwise, a credit card has to have been provided.
            $data = $this->getCardData($data);
        }

        // A CVV may be supplied whether using a token or credit card details.
        // On *first* use of a token for which a CVV was provided, that CVV will
        // be used when making a transaction. The CVV will then be deleted by the
        // gateway. For each *resuse* of a cardReference, a new CVV must be provided,
        // if the security rules require it.

        if ($this->getCard()->getCvv() !== null) {
            $data['CV2'] = $this->getCard()->getCvv();
        }

        return $data;
    }