<?php

	/**
	 * Einstellungen für das Modul "CrefoPay"
	 */

?>

<?php echo wpsg_drawForm_Checkbox('wpsg_mod_crefopay_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_crefopay_sandbox'), array('help' => 'wpsg_mod_crefopay_sandbox')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_merchantID', __('Merchant ID', 'wpsg'), $this->get_option('wpsg_mod_crefopay_merchantID'), array('help' => 'wpsg_mod_crefopay_merchantID')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_shopID', __('Shop ID', 'wpsg'), $this->get_option('wpsg_mod_crefopay_shopID'), array('help' => 'wpsg_mod_crefopay_shopID')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_privateKey', __('Privater Schlüssel', 'wpsg'), $this->get_option('wpsg_mod_crefopay_privateKey'), array('help' => 'wpsg_mod_crefopay_privateKey')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_crefopay_autocapture', __('Autocapture (Nur fullcapture möglich / DIRECT)', 'wpsg'), $this->get_option('wpsg_mod_crefopay_autocapture'), array('help' => 'wpsg_mod_crefopay_autocapture')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_crefopay_capturestatus', __('Bestellstatus für CAPTURE (Nur RETAIL)', 'wpsg'), $this->arStatus, $this->get_option('wpsg_mod_crefopay_capturestatus'), array('help' => 'wpsg_mod_crefopay_capturestatus')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_crefopay_riskclass', __('Risiko Klasse', 'wpsg'), array(
	'0' => __('Gering', 'wpsg'), // trusted transaction
	'1' => __('Normal', 'wpsg'), // default risk transaction
	'2' => __('Stark', 'wpsg') // high risk transaction
), $this->get_option('wpsg_mod_crefopay_riskclass'), array('help' => 'wpsg_mod_crefopay_riskclass')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_currency', __('Währungscode (Standard: EUR)', 'wpsg'), $this->get_option('wpsg_mod_crefopay_currency')); ?>

<br />

<?php echo wpsg_drawForm_Input('wpsg_mod_crefopay_frameheight', __('Höhe des IFrames in px', 'wpsg'), $this->get_option('wpsg_mod_crefopay_frameheight'), array('help' => 'wpsg_mod_crefopay_frameheight')); ?>

<div class="wpsg_form_field ">
	<div class="wpsg_form_left">
		<label for=""><?php echo __('MNS Statuswechsel', 'wpsg'); ?>:</label>
	</div>
	<div class="wpsg_form_right">
		<a href="#" class="wpsg_mod_crefopay_switchstatemapping" onclick="return wpsg_mod_crefopay_mnsstatemapping();"><?php echo __('Bearbeiten', 'wpsg'); ?></a>						
	</div>
	<div class="wpsg_clear"></div>
</div>
<div class="wpsg_mod_crefopay_mnsstatemapping">
	<?php foreach ($this->view['transactionMapping'] as $crefopay_status => $wpsg_status) { ?>
	<?php echo wpsg_drawForm_Select('wpsg_mod_crefopay_statemapping_'.$crefopay_status, __($wpsg_status[1], 'wpsg'), wpsg_array_merge(array('-1' => __('Kein Wechsel', 'wpsg')), $this->arStatus), $this->get_option('wpsg_mod_crefopay_statemapping_'.$crefopay_status)); ?>	
	<?php } ?>
	<br />
</div>

<?php echo wpsg_drawForm_Checkbox('wpsg_mod_crefopay_mns_notice', __('Kunden über Statuswechsel informieren', 'wpsg'), $this->get_option('wpsg_mod_crefopay_mns_notice'), array('labelright' => true)); ?>

<script type="text/javascript">/* <![CDATA[ */

	jQuery(document).ready(function() {

		jQuery('.wpsg_mod_crefopay_switchstatemapping').bind('click', function() {

			jQuery('.wpsg_mod_crefopay_mnsstatemapping').toggle();

			if (jQuery('.wpsg_mod_crefopay_mnsstatemapping').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
			else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
			
			return false;
			
		} );
		
	} );

/* ]]> */</script>

<br />

<?php echo wpsg_drawForm_Input('', __('Redirect URL', 'wpsg'), $this->view['url']['redirect_url'], array('readonly' => true, 'nohspc' => true)); ?>
<?php echo wpsg_drawForm_Input('', __('Warenkorb URL', 'wpsg'), $this->view['url']['basket_url'], array('readonly' => true, 'nohspc' => true)); ?>
<?php echo wpsg_drawForm_Input('', __('AGB URL', 'wpsg'), $this->view['url']['agb_url'], array('readonly' => true, 'nohspc' => true)); ?>
<?php echo wpsg_drawForm_Input('', __('MNS URL', 'wpsg'), $this->view['url']['mns_url'], array('readonly' => true, 'nohspc' => true)); ?>
<?php echo wpsg_drawForm_Input('', __('Jump URL', 'wpsg'), $this->view['url']['jump_url'], array('readonly' => true, 'nohspc' => true)); ?>