Rev 7214 | Rev 7874 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
/**
* Template für die Einstellungen des PayPal API Moduls
*/
?>
<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_version', __('API Version', 'wpsg'), ['v1' => 'V1', 'v2' => 'V2'], $this->get_option('wpsg_mod_paypalapi_version'), []); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid', 'hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret', 'hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_sandbox', __('Sandbox', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
<div class="wpsg_mod_sandbox_layer" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_sandbox_clientid', __('Client ID (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_sandbox_secret', __('Secret (Sandbox)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret')); ?>
<br />
</div>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_currency', __('Währungscode (Standard: EUR)'), $this->get_option('wpsg_mod_paypalapi_currency'), array('help' => 'wpsg_mod_paypal_currency')); ?>
<br />
<?php echo wpsg_drawForm_Input('', __('WebHook URL', 'wpsg'), $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'webHook', array(), true), array('readonly' => true, 'help' => 'wpsg_mod_paypal_webhook_url')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_create', __('Beim speichern versuchen den WebHook anzumelden.', 'wpsg'), 0, array('labelright' => true, 'noDoubleDot' => true, 'help' => 'wpsg_mod_paypal_createwebhook')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_webhook_log', __('WebHook Anfragen protokollieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_webhook_log'), array('labelright' => true)); ?>
<div class="layer_wpsg_mod_paypalapi_webhook_log layer_wpsg_mod_paypalapi_webhook_log_1">
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_webhook_logfile', '', $this->get_option('wpsg_mod_paypalapi_webhook_logfile'), array('hint' => __('Absoluter Pfad zur Protokolldatei, Schreibrechte beachten.', 'wpsg'))); ?>
</div>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_paypalapi_gebuehr')), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_paypalapi_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
<br />
<?php echo wpsg_drawForm_Link('wpsg_mod_paypalapi_link', __('Stornierung bei Statuswechsel', 'wpsg'),
__('Bearbeiten', 'wpsg'), array('help' => 'wpsg_mod_paypalapi_link', 'class' => 'wpsg_mod_paypalapi_stornostate')); ?>
<div class="wpsg_mod_paypalapi_stornostate_layer" style="display:none;">
<?php foreach ($this->arStatus as $status_id => $status_label) { $arStornoStatus = (array)$this->get_option('wpsg_mod_paypalapi_stornostate'); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_stornostate['.$status_id.']', __($status_label, 'wpsg'), wpsg_getInt($arStornoStatus[$status_id]), array('labelright' => true)); ?>
<?php } ?>
<br />
</div>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_aktiv', __('PayPal für neue Bestellungen erlauben', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_aktiv', __('PayPal Plus aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_aktiv'), array('help' => 'wpsg_mod_paypalapi_plus_aktiv')); ?>
<div class="wpsg_mod_paypalapi_plus_aktiv_layer wpsg_mod_paypalapi_plus_aktiv_layer_1">
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_basket', __('Zahlungsauswahl im Warenkorb', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_basket'), array('help' => 'wpsg_mod_paypalapi_plus_basket')); ?>
</div>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress', __('PayPal Express aktivieren (Button im Warenkorb)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress'), array('help' => 'wpsg_mod_paypalapi_paypalexpress')); ?>
<div class="wpsg_mod_paypalapi_plus_aktiv">
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_forceSSL', __('SSL für ReturnURL erzwingen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_forceSSL'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_forceSSL')); ?>
<?php echo wpsg_drawForm_Input('', __('Return URL', 'wpsg'), $this->getUrl(
wpsg_ShopController::URL_BASKET,
'wpsg_mod_paypalapi',
'startPayPalExpress',
array(),
((wpsg_isSizedInt($this->get_option('wpsg_mod_paypalapi_paypalexpress_forceSSL')))?true:false)
), array('readonly' => true, 'help' => 'wpsg_mod_paypalapi_paypalexpress_returnurl')); ?>
<br />
</div>
<div class="wpsg_mod_paypalapi_plus_inaktiv">
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_autostart'), array('help' => 'wpsg_shippay_paystart')); ?>
-
-</div>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_details', __('Warenkorbdetails übertragen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_details'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_details')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_label', __('Bezeichnung im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_label'), array('help' => 'wpsg_mod_paypalapi_experience_label', 'hint' => __('Max. 127 Zeichen', 'wpsg'))); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_logo', __('URL für ein Logo im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_logo'), array('help' => 'wpsg_mod_paypalapi_experience_logo', 'hint' => __('gif|png|jpg, Max. 190x60', 'wpsg'))); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_experience_locale_code', __('Sprache im PayPal Zahlungsinterface', 'wpsg'), array(
'DE' => __('Deutsch', 'wpsg'),
'GB' => __('Englisch', 'wpsg'),
'FR' => __('Französisch', 'wpsg')
), $this->get_option('wpsg_mod_paypalapi_experience_locale_code'), array('help' => 'wpsg_mod_paypalapi_experience_locale_code')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_paypalexpress_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_name'), array('help' => 'wpsg_shippay_name')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_paypalexpress_subject', __('Betreff für Zahlung', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_paypalapi_plus_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_hint'), array('help' => 'wpsg_shippay_hint')); ?>
<script>
jQuery(document).ready(function() {
var wpsg_mod_paypalapi_version = jQuery('#wpsg_mod_paypalapi_version').val();
jQuery('#wpsg_mod_paypalapi_version').on('change', function() {
if (jQuery(this).val() === 'v2' && wpsg_mod_paypalapi_version === 'v1') {
alert('<?php echo __('Beim Wechseln von V1 auf V2 sollte eine neue App im PayPal Developer Intervace angelegt werden.', 'wpsg'); ?>');
}
});
jQuery('#wpsg_mod_paypalapi_plus_aktiv').on('change', function() {
jQuery('.wpsg_mod_paypalapi_plus_aktiv_layer').hide();
jQuery('.wpsg_mod_paypalapi_plus_aktiv_layer_' + jQuery(this).val()).show();
} ).change();
jQuery('#wpsg_mod_paypalapi_webhook_log').bind('change', function() {
jQuery('.layer_wpsg_mod_paypalapi_webhook_log').hide();
if (jQuery(this).is(':checked'))
{
jQuery('.layer_wpsg_mod_paypalapi_webhook_log_1').show();
}
} ).change();
jQuery('#wpsg_mod_paypalapi_sandbox').bind('change', function() {
if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_sandbox_layer').show();
else jQuery('.wpsg_mod_sandbox_layer').hide();
} ).change();
jQuery('#wpsg_mod_paypalapi_plus_aktiv').bind('change', function() {
if (jQuery(this).is(':checked'))
{
jQuery('.wpsg_mod_paypalapi_plus_aktiv').show();
jQuery('.wpsg_mod_paypalapi_plus_inaktiv').hide();
}
else
{
jQuery('.wpsg_mod_paypalapi_plus_aktiv').hide();
jQuery('.wpsg_mod_paypalapi_plus_inaktiv').show();
}
} ).change();
jQuery('.wpsg_mod_paypalapi_stornostate').bind('click', function() {
jQuery('.wpsg_mod_paypalapi_stornostate_layer').toggle();
if (jQuery('.wpsg_mod_paypalapi_stornostate_layer').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
return false;
} );
} );
</script>