summaryrefslogtreecommitdiff
path: root/views/mods/mod_creditcard
diff options
context:
space:
mode:
authorhartmut <noreply@maennchen1.de>2016-10-21 14:14:00 +0000
committerhartmut <noreply@maennchen1.de>2016-10-21 14:14:00 +0000
commitad164f505a7bd14de7a7d177a8be256499974c09 (patch)
treed942e84a53752041f8d59ca68e97ae871adaf68a /views/mods/mod_creditcard
parent1f48113a90c745e51778d7c8801ca138f4661edb (diff)
Shop4 Korrekturen
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5866 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_creditcard')
-rw-r--r--views/mods/mod_creditcard/paymenthint.phtml155
-rw-r--r--views/mods/mod_creditcard/settings_edit.phtml17
2 files changed, 172 insertions, 0 deletions
diff --git a/views/mods/mod_creditcard/paymenthint.phtml b/views/mods/mod_creditcard/paymenthint.phtml
new file mode 100644
index 0000000..5ffda92
--- /dev/null
+++ b/views/mods/mod_creditcard/paymenthint.phtml
@@ -0,0 +1,155 @@
+<?php
+
+ /**
+ * Template für die Integration der Kundeneingaben für das Modul "Kreditkarte" in den Checkout2
+ */
+
+?>
+<br /><br />
+<div class="wpsg_mod_creditcard">
+
+ <div class="wpsg_mod_creditcard_name wpsg_mod_creditcard_field">
+ <label>
+ <?php echo __('Typ der Kreditkarte', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <!-- <input class="<?php echo ((in_array("mod_creditcard_typ",
+ (array)$this->view['error']))?'wpsg_error':''); ?>"
+ type="text" name="wpsg_mod_creditcard[typ]"
+ value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['typ']); ?>" />
+ -->
+ <select name="wpsg_mod_creditcard[typ]" id="wpsg_mod_creditcard_typ"
+ class="<?php echo ((in_array('mod_creditcard_typ', (array)$this->view['error']))?'wpsg_error':''); ?>" >
+ <option value="VISA" selected="selected">VISA</option>
+ <option value="MasterCard" >MasterCard</option>
+ </select>
+
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_mod_creditcard_inhaber wpsg_mod_creditcard_field">
+ <label>
+ <?php echo __('Inhaber', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_creditcard_inhaber", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[inhaber]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['inhaber']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_mod_creditcard_knr wpsg_mod_creditcard_field">
+ <label>
+ <?php echo __('Kartennummer', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_creditcard_knr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_mod_creditcard_knr" name="wpsg_mod_creditcard[knr]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['knr']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_mod_creditcard_knr wpsg_mod_creditcard_field">
+ <label>
+ <?php echo __('Prüfziffer', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <input class="<?php echo ((in_array("mod_creditcard_pruefz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[pruefz]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['pruefz']); ?>" />
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+
+ <div class="wpsg_mod_creditcard_knr wpsg_mod_creditcard_field">
+ <label>
+ <?php echo __('Gültigkeit', 'wpsg'); ?><span class="wpsg_required">*</span>:
+ <!-- <input class="<?php echo ((in_array("mod_creditcard_gueltig", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[gueltig]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['gueltig']); ?>" /> -->
+
+ <select name="wpsg_mod_creditcard[gueltigm]" id="wpsg_mod_creditcard_gueltigm"
+ class="<?php echo ((in_array('mod_creditcard_gueltigm', (array)$this->view['error']))?'wpsg_error':''); ?>" >
+ <option value="01">01</option>
+ <option value="02">02</option>
+ <option value="03">03</option>
+ <option value="04">04</option>
+ <option value="05">05</option>
+ <option value="06">06</option>
+ <option value="07">07</option>
+ <option value="08">08</option>
+ <option value="09">09</option>
+ <option value="10">10</option>
+ <option value="11">11</option>
+ <option value="12" selected="selected">12</option>
+ </select>
+ <select name="wpsg_mod_creditcard[gueltigj]" id="wpsg_mod_creditcard_gueltigj"
+ class="<?php echo ((in_array('mod_creditcard_gueltigj', (array)$this->view['error']))?'wpsg_error':''); ?>" >
+
+ </select>
+ </label>
+ </div>
+ <div class="wpsg_clear"></div>
+
+
+ <div class="wpsg_mandatoryfield_hint">
+ <?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
+ </div>
+
+</div>
+
+<script>
+
+jQuery(document).ready(function() {
+ var gm,
+ gj,
+ sel1,
+ i,
+ dt,
+ garr;
+
+ gm="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['gueltigm']); ?>";
+ gj="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['gueltigj']); ?>";
+
+ dt = new Date();
+ dt = dt.getFullYear();
+ sel1 = document.getElementById("wpsg_mod_creditcard_gueltigj");
+ for (i = 0; i < 6; i++) {
+ newopt = new Option(dt + i, dt + i, false, false);
+ sel1.options[i] = newopt;
+ }
+ //gm = '06';
+ //gj = '2018';
+ jQuery('#wpsg_mod_creditcard_gueltigm').val(gm);
+ jQuery('#wpsg_mod_creditcard_gueltigj').val(gj);
+
+
+});
+
+//alert(jQuery("#wpsg_mod_creditcard_knr").length);
+//$(document).on("input", "#wpsg_mod_creditcard_knr", function () {
+jQuery("#wpsg_mod_creditcard_knr").on("input", function () {
+ var
+ knr,
+ typ,
+ a1,
+ ai,
+ isANumber,
+ bb = true,
+ sum = 0,
+ k = 2,
+ i;
+ //alert("onchange");
+ knr = jQuery('#wpsg_mod_creditcard_knr').val();
+ typ = jQuery('#wpsg_mod_creditcard_typ').val();
+ knr = knr.replace(/ /g, "");
+ if (knr.length < 16) { return; }
+
+ isANumber = (isNaN(knr) === false);
+ if (isANumber === false) { bb = false; }
+ a1 = knr.substr(0, 1);
+ ai = parseInt(knr.substr(15, 1), 10);
+ if (!(((a1 === "4") && (typ === "VISA")) || ((a1 === "5") && (typ === "MasterCard")))) { bb = false; }
+ for (i = 14; i >= 0; i--) {
+ sum = sum + k * parseInt(knr.substr(i, 1), 10);
+ if (k === 2) { k = 1; } else { k = 2; }
+ }
+ sum = sum % 10;
+ if (sum > 0) { sum = 10 - sum; }
+ if (sum !== ai) { bb = false; }
+
+ if (bb === false) {
+ alert('Kartennummer fehlerhaft');
+ }
+
+});
+
+
+</script> \ No newline at end of file
diff --git a/views/mods/mod_creditcard/settings_edit.phtml b/views/mods/mod_creditcard/settings_edit.phtml
new file mode 100644
index 0000000..d8ec516
--- /dev/null
+++ b/views/mods/mod_creditcard/settings_edit.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des Moduls "Kreditkarte"
+ */
+
+?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_creditcard_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_creditcard_bezeichnung'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_creditcard_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_creditcard_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_creditcard_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_creditcard_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+
+<br />
+<?php echo wpsg_drawForm_Input('wpsg_mod_creditcard_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_creditcard_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+<?php echo wpsg_drawForm_Select('wpsg_mod_creditcard_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_creditcard_mwst')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_creditcard_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_creditcard_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_creditcard_iban', __('IBAN/BIC statt Kontonummer/BLZ verwenden', 'wpsg'), $this->get_option('wpsg_mod_creditcard_iban'), array('help' => 'wpsg_mod_creditcard_iban')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_creditcard_schluessel', __('Schluessel', 'wpsg'), $this->get_option('wpsg_mod_creditcard_schluessel'), array('help' => 'wpsg_shippay_name')); ?>