supporting text for gateway_selector.php the issue usaepay maverick spreedly spreedly_gateway_type (e.g. 'nmi', etc.) might have multiple spreedly setups with different downstream processors could have multiple maverick accounts, etc. SO -- cannot use a single communities_gateways row for that group, and switch between spreedly_* and maverick_* fields NEED -- to use a separate communities_gateways row for each payment processor "channel" create a unique communities_gateways row for each payment processor configuration the id field must be unique and NOT A SINGLE INTEGER, but this format: group_id-gateway_selector (e.g. 2-1, 2-3, 2-43, ...) Searching for communities_gateways rows with the usual id=2 format will still return the main gateway configuration row, which has significance only in a non-selector environment (i.e. gateway_selection = 0). For gateway_selection = 1 or 2, the unique gateway_selector_* values refer to the Some tools for creating these configurations might be useful one day. two part process 1) select the payment processor to be used 2) load the appropriate gatewayInfo data from the selected payment processor interesting question not every payment processor api access results in a transaction, even when successful. example sequence: validate card number / create bank account / create credit card -> produces payment_token use payment token to run debit/credit on card/ach getGatewayInfoRewards ================================================================================ communities table ================================================================================ record Primary int AUTO_INCREMENT id Index varchar(10) gc_group varchar(10) corp_gateway varchar(2) non-selector gateway 4=spreedly corp_gateway_mode varchar(8) non-selector gateway mode, sandbox/live gateway_selector_mode tinyint 1=round robbin, 2=weighted random gateway_selection tinyint the currently selected gateway selector gateway_selector_1 tinyint unique id for communities_gateways gateway record gateway_weight_1 tinyint gateway_selector_2 tinyint gateway_weight_2 tinyint gateway_selector_3 tinyint gateway_weight_3 tinyint gateway_selector_4 tinyint gateway_weight_4 tinyint gateway_selector_5 tinyint gateway_weight_5 tinyint ================================================================================ communities_gateways table ================================================================================ record Primary int AUTO_INCREMENT id Index varchar(10) gateway_code gateway_mode corp_key varchar(100) corp_ref varchar(20) usaepay_country_code varchar(2) usaepay_currency_code varchar(4) worldpay_country_code varchar(2) worldpay_currency_code varchar(3) worldpay_servicekey varchar(255) worldpay_clientkey varchar(255) spreedly_access_key varchar(40) spreedly_access_secret varchar(80) spreedly_country_code char(2) spreedly_currency_code char(3) spreedly_gateway_token varchar(32) spreedly_transaction_token varchar(32) spreedly_gateway_type varchar(32) spreedly_gateway_value_1 varchar(256) spreedly_gateway_value_2 varchar(256) spreedly_gateway_value_3 varchar(256) spreedly_gateway_value_4 varchar(256) spreedly_gateway_value_5 varchar(256) nuvei_terminal_id varchar(40) nuvei_access_secret varchar(80) nuvei_country_code char(2) nuvei_currency_code char(3) globalpay_merchantid varchar(32) globalpay_secret varchar(32) globalpay_country_code varchar(2) US globalpay_currency_code varchar(3) USD paymentsense_merchantid varchar(40) paymentsense_merchantid_nonca varchar(40) paymentsense_password varchar(40) paymentsense_presharedkey varchar(256) paymentsense_hashmethod varchar(32) paymentsense_domain varchar(80) paymentsense_port varchar(8) paymentsense_secret_key varchar(80) paymentsense_country_code char(3) paymentsense_currency_code char(3) paynamics_merchantid_sale varchar(40) paynamics_merchantkey_sale varchar(40) paynamics_merchantid_rebill varchar(40) paynamics_merchantkey_rebill varchar(40) paynamics_country_code varchar(3) paynamics_currency_code varchar(3) greenmoney_client_id varchar(20) greenmoney_api_password varchar(20) greenmoney_merchant_number varchar(20) greenmoney_country_code varchar(2) greenmoney_currency_code varchar(3) skipify_merchantid varchar(40) skipify_merchantkey varchar(40) skipify_country_code varchar(2) skipify_currency_code varchar(3) skipify_enable varchar(1) paynetworx_base_url varchar(80) paynetworx_access_user varchar(40) paynetworx_access_password varchar(40) paynetworx_country_code varchar(2) paynetworx_currency_code varchar(3) maverick_merchant_id varchar(20) maverick_dba_id varchar(20) maverick_api_token varchar(40) maverick_terminal_id varchar(40) maverick_country_code varchar(2) maverick_currency_code varchar(3) */