<?php

namespace Omnipay\PaymentExpress\Message;

/**
 * PaymentExpress PxPost Create Credit Card Request
 */
class PxPayCreateCardRequest extends PxPayAuthorizeRequest
{
    public function getData()
    {
        $this->setAmount('1.00');
        $this->setCurrency('NZD');

        $data = parent::getData();
        $data->EnableAddBillCard = 1;

        return $data;
    }
}

<?php

namespace Omnipay\PaymentExpress\Message;

/**
 * PaymentExpress PxPost Create Credit Card Request
 */
class PxPayCreateCardRequest extends PxPayAuthorizeRequest
{
    public function getData()
    {
        $amount = $this->getAmount() ? $this->getAmount() : '1.00';
        $this->setAmount($amount);

        $this->setCurrency('NZD');

        $data = parent::getData();
        $data->EnableAddBillCard = 1;

        return $data;
    }
}

Allow amount to be set by the calling function as it is valid to pass a greater amount as part of the initial payment express transaction
Allow amount to be set by the calling function as it is valid to pass a greater amount as part of the initial payment express transaction
