/**
* Display the gateway settings in admin
*
* @since 1.0.0
*/
public function show_gateways( $prefive_payment_gateways, $arr, $arr_pages ) {
//Withdrawal mode start
$enable_tab_arr = array(
'disabled' => __( 'Disabled', 'prefive-sample' ),
'manual' => __( 'Manual', 'prefive-sample' ),
'automatic' => __( 'Automatic', 'prefive-sample' ),
'both' => __( 'Both', 'prefive-sample' )
); ?>
<style>.sample-automatic { display: none; }</style>
<script>
jQuery( document ).ready( function( $ ) {
$( '#prefive_sample_withdrawal_enable' ).on( 'change rightnow', function() {
if ( $( this ).val() == 'automatic' || $( this ).val() == 'both' ) {
$( '.sample-automatic' ).show();
} else { $( '.sample-automatic' ).hide(); }
}).triggerHandler( 'rightnow' );
});
</script>
<!-- Withdrawal mode end -->
<!-- Show Withdrawal settings start -->
<table width="100%" class="wpj-admin-table">
<tr>
<td></td>
<td><h2><?php _e("Withdrawals", "prefive"); ?></h2></td>
<td></td>
</tr>
<tr>
<td valign=top width="22"><?php prefive_theme_bullet( __( 'Enable/Disable Sample withdrawal payment gateway', 'prefive-sample' ) ); ?></td>
<td width="200"><?php _e( 'Enable:', 'prefive-sample' ); ?></td>
<td><?php echo prefive_get_option_drop_down( $enable_tab_arr, 'prefive_sample_withdrawal_enable' ); ?></td>
</tr>
<tr class="sample-automatic">
<td valign=top width="22"><?php prefive_theme_bullet( __( 'Enable/Disable sample withdrawal test mode.', 'prefive-sample' ) ); ?></td>
<td width="200"><?php _e( 'Enable Test Mode:', 'prefive-sample' ); ?></td>
<td><?php echo prefive_get_option_drop_down( $arr, 'prefive_sample_withdraw_enablesandbox', 'no' ); ?></td>
</tr>
<!—Gateway API ID, KEYS REQUIRED FOR AUTOMATIC WITHDRAWALS -->
<tr class="sample-automatic">
<td valign=top width="22"><?php prefive_theme_bullet( __( 'Your Sample Clinet ID', 'prefive-sample' ) ); ?></td>
<td ><?php _e( 'Sample Client ID:', 'prefive-sample' ); ?></td>
<td><input type="text" size="45" name="prefive_sample_client_id" value="<?php echo apply_filters('wpj_sensitive_info_credentials', get_option( 'prefive_sample_client_id' ) ); ?>" /></td>
</tr>
<tr class="sample-automatic">
<td valign=top width="22"><?php prefive_theme_bullet( __( 'Your Sample Secret key', 'prefive-sample' ) ); ?></td>
<td ><?php _e( 'Sample Secret Key:', 'prefive-sample' ); ?></td>
<td><input type="text" size="45" name="prefive_sample_secret_key" value="<?php echo apply_filters('wpj_sensitive_info_credentials', get_option( 'prefive_sample_secret_key' ) ); ?>" /></td>
</tr>
</table>
<!-- Show Withdrawal settings end -->
<?php }
Was this article helpful to you?
Yes
No