<# _.each( data.payment_gateway, function( payment_gateway ) { #>

{{ payment_gateway.name }}

<# if( payment_gateway.account_name_test !== '' ) { #> {{ payment_gateway.account_name_test }} <# } #> <# if( payment_gateway.account_name_live !== '' ) { #> {{ payment_gateway.account_name_live }} <# } #> <# if( payment_gateway.connection_layout === 'authentication' ) { #> <# if( !payment_gateway.mode_live_configured ) { #>
{{ payment_gateway.name[ 0 ] }} {{ data.lang.payment_gateway_connect.replace( "%s", payment_gateway.name ) }}
<# } else { #>
{{ data.lang.payment_gateway_disconnect }}
<# } #> <# if( !payment_gateway.mode_test_configured ) { #>
{{ payment_gateway.name[ 0 ] }} {{ data.lang.payment_gateway_connect.replace( "%s", payment_gateway.name ) }}
<# } else { #>
{{ data.lang.payment_gateway_disconnect }}
<# } #> <# } else { #>
<# if( payment_gateway.mode_live_configured ) { #> {{ data.lang.payment_gateway_settings_edit }} checkmark <# } else { #> {{ data.lang.payment_gateway_settings_set }} <# } #>
<# if( payment_gateway.mode_test_configured ) { #> {{ data.lang.payment_gateway_settings_edit }} checkmark <# } else { #> {{ data.lang.payment_gateway_settings_set }} <# } #>
<# } #>
{{ data.lang.payment_gateway_mode_test }} {{ data.lang.payment_gateway_mode_live }}
{{ payment_gateway.name }}
{{{ payment_gateway.description }}} <# if( typeof payment_gateway.webhook_settings !== "undefined" && ( payment_gateway.webhook_settings.test_available || payment_gateway.webhook_settings.live_available ) ) { #> <# let _title = ''; #>
<# if( payment_gateway.webhook_settings.live_available ) { #> <# _title = payment_gateway.webhook_settings.title_popup + ' ' + data.lang.payment_gateway_mode_live + '' #>

{{{ payment_gateway.webhook_settings.title }}} {{ data.lang.payment_gateway_mode_live }}

<# if( parseInt( payment_gateway.webhook_settings.live_configured ) ) { #> checkmark <# } #>
<# } #> <# if( payment_gateway.webhook_settings.test_available ) { #> <# _title = payment_gateway.webhook_settings.title_popup + ' ' + data.lang.payment_gateway_mode_test + '' #>

{{{ payment_gateway.webhook_settings.title }}} {{ data.lang.payment_gateway_mode_test }}

<# if( parseInt( payment_gateway.webhook_settings.test_configured ) ) { #> checkmark <# } #>
<# } #>
<# } #>
<# _.each( payment_gateway.payment_methods, function( payment_method ) { #> <# }) #>
{{ data.lang.payment_methods_title }} {{ data.lang.payment_methods_status }}
{{{ payment_method.description }}} <# if( !payment_method.is_available ) { #>

{{{ data.lang.upgrade_payment_gateway.replace( "%s", payment_method.name ).replace( "%s", '' + data.lang.upgrade + '' ) }}}

<# } else { #> <# if( typeof payment_method.settings !== "undefined" ) { #>
<# _.each( payment_method.settings, function( information ) { #> <# let _title = information.title.replace( "%s", '' + data.lang.payment_gateway_mode_live + '' ) #>

{{{ _title }}}

<# if( parseInt( information.live_configured ) ) { #> checkmark <# } #>
<# _title = information.title.replace( "%s", '' + data.lang.payment_gateway_mode_test + '' ) #>

{{{ _title }}}

<# if( parseInt( information.test_configured ) ) { #> checkmark <# } #>
<# }) #>
<# } #> <# } #>
<# if( payment_method.is_available && ( payment_gateway.mode_live_configured || payment_gateway.mode_test_configured ) ) { #> <# if( typeof payment_method.requires_https !== 'undefined' && payment_method.requires_https && !parseInt( ChinaPayments.settings.is_https ) ) { #> <# } else { #> <# } #> <# } #>
<# }) #>