protected function getBaseAuthorizeData()
    {
        $this->validate('amount', 'card', 'transactionId');

        // Start with the authorisation and API version details.
        $data = $this->getBaseData();

        $data['Description'] = $this->getDescription();

        // Money formatted as major unit decimal.
        $data['Amount'] = $this->getAmount();
        $data['Currency'] = $this->getCurrency();

        $data['VendorData'] = $this->getVendorData();
        $data['VendorTxCode'] = $this->getTransactionId();
        $data['ClientIPAddress'] = $this->getClientIp();

        $data['ApplyAVSCV2'] = $this->getApplyAVSCV2() ?: static::APPLY_AVSCV2_DEFAULT;
        $data['Apply3DSecure'] = $this->getApply3DSecure() ?: static::APPLY_3DSECURE_APPLY;

        if ($this->getReferrerId()) {
            $data['ReferrerID'] = $this->getReferrerId();
        }

        // Billing details

        $data = $this->getBillingAddressData($data);

        // Shipping details

        $data = $this->getDeliveryAddressData($data);

        $card = $this->getCard();

        if ($card->getEmail()) {
            $data['CustomerEMail'] = $card->getEmail();
        }

        if ((bool)$this->getUseOldBasketFormat()) {
            $basket = $this->getItemDataNonXML();

            if (!empty($basket)) {
                $data['Basket'] = $basket;
            }
        } else {
            $basketXML = $this->getItemData();

            if (!empty($basketXML)) {
                $data['BasketXML'] = $basketXML;
            }
        }

        $surchargeXml = $this->getSurchargeXml();

        if ($surchargeXml) {
            $data['surchargeXml'] = $surchargeXml;
        }

        return $data;
    }