src/Genesis/Config.php
public static function setEndpoint($endpointArg)
    {
        $endpointArg = strtolower(trim($endpointArg));

        $aliases = [
            \Genesis\API\Constants\Endpoints::EMERCHANTPAY      => [
                'emp',
                'emerchantpay',
                \Genesis\API\Constants\Endpoints::EMERCHANTPAY
            ],
            \Genesis\API\Constants\Endpoints::ECOMPROCESSING    => [
                'ecp',
                'ecomprocessing',
                'e-comprocessing',
                \Genesis\API\Constants\Endpoints::ECOMPROCESSING
            ]
        ];

        foreach ($aliases as $endpoint => $endpointAlias) {
            foreach ($endpointAlias as $alias) {
                if (stripos($endpointArg, $alias) !== false) {
                    return self::$vault['endpoint'] = $endpoint;
                }
            }
        }

        throw new \Genesis\Exceptions\InvalidArgument(
            'Invalid Endpoint'
        );
    }
public static function setEndpoint($endpointArg)
    {
        $endpointArg = strtolower(trim($endpointArg));

        $aliases = [
            \Genesis\API\Constants\Endpoints::EMERCHANTPAY      => [
                'emp',
                'emerchantpay',
                \Genesis\API\Constants\Endpoints::EMERCHANTPAY
            ],
            \Genesis\API\Constants\Endpoints::ECOMPROCESSING    => [
                'ecp',
                'ecomprocessing',
                'e-comprocessing',
                \Genesis\API\Constants\Endpoints::ECOMPROCESSING
            ]
        ];

        foreach ($aliases as $endpoint => $endpointAlias) {
            foreach ($endpointAlias as $alias) {
                if (stripos($endpointArg, $alias) !== false) {
                    return self::$vault['endpoint'] = $endpoint;
                }
            }
        }

        throw new \Genesis\Exceptions\InvalidArgument(
            'Invalid Endpoint'
        );
    }
public static function setEndpoint ( $ endpointArg ) { $ endpointArg = strtolower ( trim ( $ endpointArg ) ) ; $ aliases = [ \ Genesis \ API \ Constants \ Endpoints :: EMERCHANTPAY => [ 'emp' , 'emerchantpay' , \ Genesis \ API \ Constants \ Endpoints :: EMERCHANTPAY ] , \ Genesis \ API \ Constants \ Endpoints :: ECOMPROCESSING => [ 'ecp' , 'ecomprocessing' , 'e-comprocessing' , \ Genesis \ API \ Constants \ Endpoints :: ECOMPROCESSING ] ] ; foreach ( $ aliases as $ endpoint => $ endpointAlias ) { foreach ( $ endpointAlias as $ alias ) { if ( stripos ( $ endpointArg , $ alias ) !== false ) { return self :: $ vault [ 'endpoint' ] = $ endpoint ; } } } throw new \ Genesis \ Exceptions \ InvalidArgument ( 'Invalid Endpoint' ) ; }
Set Genesis Endpoint

@param   string  $endpointArg
@return  string

@throws \Genesis\Exceptions\InvalidArgument
Set Genesis Endpoint