public static function getSupportedGateways($nice = true)
    {
        $allowed = Payment::config()->allowed_gateways;

        if (!is_array($allowed) || empty($allowed)) {
            throw new InvalidConfigurationException(
                'No allowed gateways configured. Use SilverStripe\Omnipay\Model\Payment.allowed_gateways config.'
            );
        }

        $allowed = array_combine($allowed, $allowed);

        if ($nice) {
            $allowed = array_map('SilverStripe\Omnipay\GatewayInfo::niceTitle', $allowed);
        }

        return $allowed;
    }
public static function getSupportedGateways($nice = true)
    {
        $allowed = Payment::config()->allowed_gateways;

        if (!is_array($allowed) || empty($allowed)) {
            throw new InvalidConfigurationException(
                'No allowed gateways configured. Use SilverStripe\Omnipay\Model\Payment.allowed_gateways config.'
            );
        }

        $allowed = array_combine($allowed, $allowed);

        if ($nice) {
            $allowed = array_map('SilverStripe\Omnipay\GatewayInfo::niceTitle', $allowed);
        }

        return $allowed;
    }
public static function getSupportedGateways ( $ nice = true ) { $ allowed = Payment :: config ( ) -> allowed_gateways ; if ( ! is_array ( $ allowed ) || empty ( $ allowed ) ) { throw new InvalidConfigurationException ( 'No allowed gateways configured. Use SilverStripe\Omnipay\Model\Payment.allowed_gateways config.' ) ; } $ allowed = array_combine ( $ allowed , $ allowed ) ; if ( $ nice ) { $ allowed = array_map ( 'SilverStripe\Omnipay\GatewayInfo::niceTitle' , $ allowed ) ; } return $ allowed ; }
Get the available configured payment types, optionally with i18n readable names.

@param bool $nice make the array values i18n readable.

@return array map of gateway short name to translated long name.
@throws InvalidConfigurationException
Get the available configured payment types optionally with i18n readable names .