public static function requiredFields($gateway)
    {
        $fields = array();

        $requiredFields = self::getConfigSetting($gateway, 'required_fields');

        if (is_array($requiredFields)) {
            $fields = $requiredFields;
        }

        //always require the following for on-site gateways (and not manual)
        if (!self::isOffsite($gateway) && !self::isManual($gateway)) {
            $fields = array_merge(
                $fields,
                array('name', 'number', 'expiryMonth', 'expiryYear', 'cvv')
            );
        }

        return array_unique($fields);
    }
public static function requiredFields($gateway)
    {
        $fields = array();

        $requiredFields = self::getConfigSetting($gateway, 'required_fields');

        if (is_array($requiredFields)) {
            $fields = $requiredFields;
        }

        //always require the following for on-site gateways (and not manual)
        if (!self::isOffsite($gateway) && !self::isManual($gateway)) {
            $fields = array_merge(
                $fields,
                array('name', 'number', 'expiryMonth', 'expiryYear', 'cvv')
            );
        }

        return array_unique($fields);
    }
public static function requiredFields ( $ gateway ) { $ fields = array ( ) ; $ requiredFields = self :: getConfigSetting ( $ gateway , 'required_fields' ) ; if ( is_array ( $ requiredFields ) ) { $ fields = $ requiredFields ; } //always require the following for on-site gateways (and not manual) if ( ! self :: isOffsite ( $ gateway ) && ! self :: isManual ( $ gateway ) ) { $ fields = array_merge ( $ fields , array ( 'name' , 'number' , 'expiryMonth' , 'expiryYear' , 'cvv' ) ) ; } return array_unique ( $ fields ) ; }
Get the required parameters for a given gateway
@param string $gateway gateway name
@return array required parameters
Get the required parameters for a given gateway