Index: /controller/wpsg_AdminController.class.php
===================================================================
--- /controller/wpsg_AdminController.class.php	(revision 7513)
+++ /controller/wpsg_AdminController.class.php	(revision 7514)
@@ -277,5 +277,5 @@
 			    $this->shop->update_option('wpsg_shopdata_tel', $_REQUEST['wpsg_shopdata_tel'], false, true, WPSG_SANITIZE_TEXTFIELD);
 			    $this->shop->update_option('wpsg_shopdata_fax', $_REQUEST['wpsg_shopdata_fax'], false, true, WPSG_SANITIZE_TEXTFIELD);
-			    $this->shop->update_option('wpsg_shopdata_email', $_REQUEST['wpsg_shopdata_email'], false, true, WSPG_SANITIZE_EMAIL);
+			    $this->shop->update_option('wpsg_shopdata_email', $_REQUEST['wpsg_shopdata_email'], false, true, WPSG_SANITIZE_EMAIL);
 			    $this->shop->update_option('wpsg_shopdata_taxnr', $_REQUEST['wpsg_shopdata_taxnr'], false, true, WPSG_SANITIZE_TEXTFIELD);
 			    $this->shop->update_option('wpsg_shopdata_ustidnr', $_REQUEST['wpsg_shopdata_ustidnr'], false, true, WPSG_SANITIZE_TEXTFIELD);
@@ -292,5 +292,5 @@
 				$this->shop->update_option('wpsg_shopdata_2_tel', $_REQUEST['wpsg_shopdata_2_tel'], false, true, WPSG_SANITIZE_TEXTFIELD);
 				$this->shop->update_option('wpsg_shopdata_2_fax', $_REQUEST['wpsg_shopdata_2_fax'], false, true, WPSG_SANITIZE_TEXTFIELD);
-				$this->shop->update_option('wpsg_shopdata_2_email', $_REQUEST['wpsg_shopdata_2_email'], false, true, WSPG_SANITIZE_EMAIL);
+				$this->shop->update_option('wpsg_shopdata_2_email', $_REQUEST['wpsg_shopdata_2_email'], false, true, WPSG_SANITIZE_EMAIL);
 				
 				$this->shop->update_option('wpsg_shopdata_eu', $_REQUEST['wpsg_shopdata_eu'], false, true, WPSG_SANITIZE_VALUES, [0, 1, 2]);
@@ -298,5 +298,5 @@
 				$this->shop->update_option('wpsg_shopdata_eu_tel', $_REQUEST['wpsg_shopdata_eu_tel'], false, true, WPSG_SANITIZE_TEXTFIELD);
 				$this->shop->update_option('wpsg_shopdata_eu_fax', $_REQUEST['wpsg_shopdata_eu_fax'], false, true, WPSG_SANITIZE_TEXTFIELD);
-				$this->shop->update_option('wpsg_shopdata_eu_email', $_REQUEST['wpsg_shopdata_eu_email'], false, true, WSPG_SANITIZE_EMAIL);
+				$this->shop->update_option('wpsg_shopdata_eu_email', $_REQUEST['wpsg_shopdata_eu_email'], false, true, WPSG_SANITIZE_EMAIL);
 				$this->shop->update_option('wpsg_shopdata_eu_street', $_REQUEST['wpsg_shopdata_eu_street'], false, true, WPSG_SANITIZE_TEXTFIELD);
 				$this->shop->update_option('wpsg_shopdata_eu_zip', $_REQUEST['wpsg_shopdata_eu_zip'], false, true, WPSG_SANITIZE_TEXTFIELD);
@@ -307,5 +307,5 @@
 				$this->shop->update_option('dataprotectioncommissioner_name', $_REQUEST['dataprotectioncommissioner_name'], false, true, WPSG_SANITIZE_TEXTFIELD);
 				$this->shop->update_option('dataprotectioncommissioner_tel', $_REQUEST['dataprotectioncommissioner_tel'], false, true, WPSG_SANITIZE_TEXTFIELD);
-				$this->shop->update_option('dataprotectioncommissioner_email', $_REQUEST['dataprotectioncommissioner_email'], false, true, WSPG_SANITIZE_EMAIL);
+				$this->shop->update_option('dataprotectioncommissioner_email', $_REQUEST['dataprotectioncommissioner_email'], false, true, WPSG_SANITIZE_EMAIL);
 				$this->shop->update_option('dataprotectioncommissioner_baskettext', $_REQUEST['dataprotectioncommissioner_baskettext'], false, true, WPSG_SANITIZE_TEXTFIELD);
 				$this->shop->update_option('dataprotectioncommissioner_mailtext', $_REQUEST['dataprotectioncommissioner_mailtext'], false, true, WPSG_SANITIZE_TEXTFIELD);
@@ -2087,5 +2087,5 @@
 			    $this->update_option('dataprotectioncommissioner_name', $_REQUEST['dataprotectioncommissioner_name'], false, false, WPSG_SANITIZE_TEXTFIELD);
 				$this->update_option('dataprotectioncommissioner_tel', $_REQUEST['dataprotectioncommissioner_tel'], false, false, WPSG_SANITIZE_TEXTFIELD);
-				$this->update_option('dataprotectioncommissioner_email', $_REQUEST['dataprotectioncommissioner_email'], false, false, WSPG_SANITIZE_EMAIL);
+				$this->update_option('dataprotectioncommissioner_email', $_REQUEST['dataprotectioncommissioner_email'], false, false, WPSG_SANITIZE_EMAIL);
 				$this->update_option('dataprotectioncommissioner_mailtext', $_REQUEST['dataprotectioncommissioner_mailtext'], false, false, WPSG_SANITIZE_TEXTFIELD);
 				# TODO: @ThoGoe
Index: /controller/wpsg_ProduktController.class.php
===================================================================
--- /controller/wpsg_ProduktController.class.php	(revision 7513)
+++ /controller/wpsg_ProduktController.class.php	(revision 7514)
@@ -883,5 +883,11 @@
 				wpsg_checkRequest('basket_multiple', [WPSG_SANITIZE_VALUES, [wpsg_product::MULTIPLE_ONE_MULTI, wpsg_product::MULTIPLE_MULTI_MULTI, wpsg_product::MULTIPLE_MULTI_ONE, wpsg_product::MULTIPLE_ONE_ONE]], __('Produkt unterliegt den EU-Leistungsortregeln', 'wpsg'), $data);
 				wpsg_checkRequest('rating', [WPSG_SANITIZE_VALUES, ['0', '1', '2', '3', '4', '5']], __('Produkt unterliegt den EU-Leistungsortregeln', 'wpsg'), $data);
-				 
+				
+				if (wpsg_isSizedInt($_REQUEST['edit_id'])) {
+					
+					
+					
+				}
+				
 				// Erlaubte Zahlungsarten speichern
 				$data['allowedpayments'] = '';
Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 7513)
+++ /lib/functions.inc.php	(revision 7514)
@@ -560,5 +560,5 @@
 				break;
 				
-			case WSPG_SANITIZE_EMAIL:
+			case WPSG_SANITIZE_EMAIL:
 				
 				if (sanitize_email($val) == $val) $bReturn = true;
@@ -582,5 +582,5 @@
 			case WPSG_SANITIZE_TEXTFIELD:
 				
-				if (sanitize_text_field($val) == $val) $bReturn = true;
+				if (sanitize_text_field($val) == trim($val)) $bReturn = true;
 				
 				break;
@@ -588,5 +588,5 @@
 			case WPSG_SANITIZE_TEXTAREA:
 				
-				if (sanitize_textarea_field($val) == $val) $bReturn = true;
+				if (sanitize_textarea_field($val) == trim($val)) $bReturn = true;
 				
 				break;
@@ -595,5 +595,5 @@
 			case WPSG_SANITIZE_INT: 
 				
-				if (strval(intval($val)) === strval($val)) $bReturn = true;
+				if (strval(intval($val)) === strval($val) || strval($val) === '0') $bReturn = true;
 				 
 				break; 
Index: /mods/wpsg_mod_basic.class.php
===================================================================
--- /mods/wpsg_mod_basic.class.php	(revision 7513)
+++ /mods/wpsg_mod_basic.class.php	(revision 7514)
@@ -31,4 +31,5 @@
 			16		=> 'wpsg_mod_creditcard', // Kreditkarte
 			17		=> 'wpsg_mod_targo', // Targobank
+			18 		=> 'wpsg_mod_paypalratepay', // PayPal Ratenzahlung
 			20 		=> 'wpsg_mod_autodebit', 
 			30		=> 'wpsg_mod_productindex', // ProduktÃŒbersicht
Index: /mods/wpsg_mod_creditcard.class.php
===================================================================
--- /mods/wpsg_mod_creditcard.class.php	(revision 7513)
+++ /mods/wpsg_mod_creditcard.class.php	(revision 7514)
@@ -76,6 +76,5 @@
 	
 		public function addPayment(&$arPayment) { 
-			
-			//if (!is_admin() && $this->shop->get_option('wpsg_mod_creditcard_aktiv') != '1') return;
+			 
 			if (is_admin() || $this->shop->get_option('wpsg_mod_creditcard_aktiv') == '1') {
 				
@@ -104,9 +103,7 @@
 		} // public function addPayment(&$arPayment)
 			
-		public function checkCheckout(&$state, &$error, &$arCheckout) 
-		{ 
-
-			if(wpsg_isSizedString($arCheckout['payment']))
-			{
+		public function checkCheckout(&$state, &$error, &$arCheckout)  { 
+
+			if(wpsg_isSizedString($arCheckout['payment'])) {
 
 				if ($arCheckout['payment'] != $this->id) return;
Index: /mods/wpsg_mod_kundenkontakt.class.php
===================================================================
--- /mods/wpsg_mod_kundenkontakt.class.php	(revision 7513)
+++ /mods/wpsg_mod_kundenkontakt.class.php	(revision 7514)
@@ -80,5 +80,5 @@
 		    $this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_status', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['status'], false, false, WPSG_SANITIZE_TEXTFIELD);
 		    $this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_reply', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['reply'], false, false, WPSG_SANITIZE_TEXTFIELD);
-		    $this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_replytomail', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['replytomail'], false, false, WSPG_SANITIZE_EMAIL);
+		    $this->shop->update_option('wpsg_mod_kundenkontakt_smsflatrate_replytomail', $_REQUEST['wpsg_mod_kundenkontakt']['smsflatrate']['replytomail'], false, false, WPSG_SANITIZE_EMAIL);
 						
 		}
Index: /mods/wpsg_mod_paypal.class.php
===================================================================
--- /mods/wpsg_mod_paypal.class.php	(revision 7513)
+++ /mods/wpsg_mod_paypal.class.php	(revision 7514)
@@ -100,5 +100,5 @@
 						
 			// Classic API
-			$this->shop->update_option('wpsg_mod_paypal_email', $_REQUEST['wpsg_mod_paypal_email'], false, false, WSPG_SANITIZE_EMAIL);
+			$this->shop->update_option('wpsg_mod_paypal_email', $_REQUEST['wpsg_mod_paypal_email'], false, false, WPSG_SANITIZE_EMAIL);
 			
 			// Rest API
Index: /mods/wpsg_mod_paypalapi.class.php
===================================================================
--- /mods/wpsg_mod_paypalapi.class.php	(revision 7513)
+++ /mods/wpsg_mod_paypalapi.class.php	(revision 7514)
@@ -223,5 +223,5 @@
 		public function checkout_handlePayment()
 		{
-			 
+		
 			// Wenn 0,- dann nix machen
 			$arBasket = $this->shop->basket->toArray();
@@ -287,5 +287,5 @@
 					if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_paypalapi_plus_aktiv')))
 					{
-						
+						 
 						$this->setViewForPayPalPLus();						
 						$this->shop->view['wpsg_mod_paypalapi']['show'] = 3;
@@ -310,5 +310,5 @@
 				if (wpsg_isSizedInt($this->shop->get_option('wpsg_mod_paypalapi_plus_aktiv')))
 				{
-						
+				
 					$this->setViewForPayPalPLus();
 					$this->shop->view['wpsg_mod_paypalapi']['show'] = 3;
Index: /mods/wpsg_mod_paypalratepay.class.php
===================================================================
--- /mods/wpsg_mod_paypalratepay.class.php	(revision 7514)
+++ /mods/wpsg_mod_paypalratepay.class.php	(revision 7514)
@@ -0,0 +1,86 @@
+<?php
+	
+	declare(strict_types=1);
+	  
+	/**
+	 * User: Daschmi (daschmi@daschmi.de)
+	 * Date: 02.09.2019
+	 * Time: 08:09 
+	 * 
+	 * Modul zur Zahlungsabwicklung mit Ratenzahlung ÃŒber die PayPal REST API
+	 * @author Daschmi (daniel@maennchen1.de)
+	 */
+	class wpsg_mod_paypalratepay extends wpsg_mod_basic {
+		
+		var $apiContext = false;
+		
+		var $lizenz = 1;
+		var $id = 18;
+		//var $hilfeURL = 'http://wpshopgermany.de/?p=1728009';
+		var $version = "9.9.9";
+		var $free = false;
+				
+		/**
+		 * Costructor
+		 */
+		public function __construct() {
+			
+			parent::__construct();
+			
+			$this->name = __('PayPal Ratenzahlung', 'wpsg');
+			$this->group = __('Zahlungsarten', 'wpsg');
+			$this->desc = __('ErmÃ¶glicht die Zahlungsart PayPal mit Ratenzahlung ÃŒber die REST API Schnittstelle.', 'wpsg');
+			
+		} // public function __construct()
+		
+		public function init() {
+			
+			
+		} // public function init()
+		
+		public function install() {
+			
+			$this->shop->checkDefault('wpsg_mod_paypalratepay_currency', 'EUR');
+			
+			$this->shop->checkDefault('wpsg_mod_paypalratepay_name', __('PayPal Ratenzahlung', 'wpsg'), false, true);
+			$this->shop->checkDefault('wpsg_mod_paypalratepay_hint', __('Ratenzahlung ÃŒber PayPal', 'wpsg'), false, true);
+			
+		}
+		
+		public function settings_edit() {
+			
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_paypalratepay/settings_edit.phtml');
+			
+		}
+		
+		public function settings_save() {
+			
+			$this->shop->update_option('wpsg_mod_paypalratepay_aktiv', $_REQUEST['wpsg_mod_paypalratepay_aktiv'], false, false, WPSG_SANITIZE_CHECKBOX);
+			
+			$this->shop->update_option('wpsg_mod_paypalratepay_name', $_REQUEST['wpsg_mod_paypalratepay_name'], false, true, WPSG_SANITIZE_TEXTFIELD);
+			$this->shop->update_option('wpsg_mod_paypalratepay_hint', $_REQUEST['wpsg_mod_paypalratepay_hint'], false, true, WPSG_SANITIZE_TEXTAREA);
+			
+		}
+		
+		public function addPayment(&$arPayment) {
+			
+			if (!$this->shop->hasMod('wpsg_mod_paypalapi')) return false;
+			
+			if (is_admin() || $this->shop->get_option('wpsg_mod_paypalratepay_aktiv') == '1') {
+				
+				$arPayment[$this->id] = array(
+					'id' => $this->id,
+					'name' => __($this->shop->get_option('wpsg_mod_paypalratepay_name'), 'wpsg'),
+					'price' => $this->shop->get_option('wpsg_mod_paypalratepay_gebuehr'),
+					'tax_key' => $this->shop->get_option('wpsg_mod_paypalratepay_taxkey'),
+					'mwst_null' => $this->shop->get_option('wpsg_mod_paypalratepay_taxcountry'),
+					'hint' => __($this->shop->get_option('wpsg_mod_paypalratepay_hint'), 'wpsg'),
+					//'logo' => $this->shop->getRessourceURL('mods/mod_paypalapi/gfx/logo_100x25.png')
+				);
+				
+			}
+			
+		}  
+		
+	}
+    
Index: /mods/wpsg_mod_stock.class.php
===================================================================
--- /mods/wpsg_mod_stock.class.php	(revision 7513)
+++ /mods/wpsg_mod_stock.class.php	(revision 7514)
@@ -135,5 +135,5 @@
 			    "stock_count" => wpsg_q(wpsg_sinput(WPSG_SANITIZE_CHECKBOX, $_REQUEST['wpsg_mod_stock_stock_count'])),
 			    "minstockproduct_count" => wpsg_q(wpsg_sinput(WPSG_SANITIZE_TEXTFIELD, $_REQUEST['wpsg_mod_minstockproduct'])),
-			    "minstockproduct_mail" => wpsg_q(wpsg_sinput(WSPG_SANITIZE_EMAIL, $_REQUEST['wpsg_mod_stock_minstockproduct_mail']))
+			    "minstockproduct_mail" => wpsg_q(wpsg_sinput(WPSG_SANITIZE_EMAIL, $_REQUEST['wpsg_mod_stock_minstockproduct_mail']))
 			), "`id` = '".wpsg_q(wpsg_sinput(WPSG_SANITIZE_TEXTFIELD, $produkt_id))."'");
 
Index: /mods/wpsg_mod_versandarten.class.php
===================================================================
--- /mods/wpsg_mod_versandarten.class.php	(revision 7513)
+++ /mods/wpsg_mod_versandarten.class.php	(revision 7514)
@@ -98,142 +98,153 @@
 				
 			}
-			else if ($_REQUEST['do'] == 'remove')
-			{
-
-				$_REQUEST['va_id'] = wpsg_sinput("key", $_REQUEST['va_id']);
-
-				$this->db->UpdateQuery(WPSG_TBL_VA, array(
-					"deleted" => "1"
-				), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+			else if ($_REQUEST['do'] == 'remove') {
+
+				if (wpsg_checkInput($_REQUEST['va_id'], WPSG_SANITIZE_INT)) {
+				
+					$this->db->UpdateQuery(WPSG_TBL_VA, array(
+						"deleted" => "1"
+					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+				
+				}
 
 				die($this->va_list());
 				
-			}
-			else if ($_REQUEST['do'] == 'inlinedit')
-			{
-
-				$_REQUEST['va_id'] = wpsg_sinput("key", $_REQUEST['va_id']);
-				
-				if ($_REQUEST['field'] == 'name')
-				{
-
-					$_REQUEST['value'] = wpsg_sinput("text_field", $_REQUEST['value']);
-
-					$this->db->UpdateQuery(WPSG_TBL_VA, array(
-						'name' => wpsg_q($_REQUEST['value'])
-					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					$this->shop->addTranslationString('wpsg_mod_versandarten_'.$_REQUEST['va_id'], $_REQUEST['value']);
-					
-					die($_REQUEST['value']);
-					
-				} 
-				else if ($_REQUEST['field'] == 'typ')
-				{
-
-					$_REQUEST['value'] = wpsg_sinput("key", $_REQUEST['value']);
-
-					$this->db->UpdateQuery(WPSG_TBL_VA, array(
-						'typ' => wpsg_q($_REQUEST['value'])
-					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					die($this->arTypen[$_REQUEST['value']]);
-					
-				}
-				else if ($_REQUEST['field'] == 'hint')
-				{
-
-					$_REQUEST['value'] = wpsg_sinput("text_field", $_REQUEST['value']);
-
-					$this->db->UpdateQuery(WPSG_TBL_VA, array(
-						'hint' => wpsg_q($_REQUEST['value'])
-					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					$this->shop->addTranslationString('wpsg_mod_versandarten_hint_'.$_REQUEST['va_id'], $_REQUEST['value']);
-					
-					die(wpsg_hspc($_REQUEST['value']));
-					
-				}
-				else if ($_REQUEST['field'] == 'vz')
-				{
-
-					$_REQUEST['value'] = wpsg_sinput("key", $_REQUEST['value']);
-
-					$this->db->UpdateQuery(WPSG_TBL_VA, array(
-						'vz' => wpsg_q($_REQUEST['value'])
-					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					if ($_REQUEST['value'] > 0)
-						die($this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_VZ."` WHERE `id` = '".wpsg_q($_REQUEST['value'])."'"));
-					else
-						die(__('Alle Versandzonen', 'wpsg'));
-					
-				}
-				else if ($_REQUEST['field'] == 'mwst_key')
-				{
-
-					$_REQUEST['value'] = wpsg_sinput("key", $_REQUEST['value'], 'wpsg_taxkey');
-					
-					$this->db->UpdateQuery(WPSG_TBL_VA, array(
-						'mwst_key' => wpsg_q($_REQUEST['value'])
-					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					$tax_groups = wpsg_tax_groups();
-					die(wpsg_hspc($tax_groups[$_REQUEST['value']]));
-										
-				}
-				else if ($_REQUEST['field'] == 'kosten') {
-
-					if (wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_COSTKEY)) {
-					
-						$this->db->UpdateQuery(WPSG_TBL_VA, array(
-							'kosten' => wpsg_q($_REQUEST['value'])
-						), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+			} else if ($_REQUEST['do'] == 'inlinedit') {
+
+				if (wpsg_checkInput($_REQUEST['va_id'], WPSG_SANITIZE_INT)) {
+								
+					if ($_REQUEST['field'] == 'name') {
+	
+						if (wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_TEXTFIELD)) {
+							
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'name' => wpsg_q($_REQUEST['value'])
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+						
+							$this->shop->addTranslationString('wpsg_mod_versandarten_'.$_REQUEST['va_id'], $_REQUEST['value']);
+						
+							die($_REQUEST['value']);
+							
+						} else die(__('UngÃŒltige Eingabe!', 'wpsg'));
+						
+					} else if ($_REQUEST['field'] == 'typ') {
+	
+						if (wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_VALUES, array_keys($this->arTypen))) {
+						
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'typ' => wpsg_q($_REQUEST['value'])
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+							
+							die($this->arTypen[$_REQUEST['value']]);
+							
+						} else die(__('UngÃŒltige Eingabe!', 'wpsg'));
+						
+					} else if ($_REQUEST['field'] == 'hint') {
+	
+						if (wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_TEXTAREA)) {
+								
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'hint' => wpsg_q($_REQUEST['value'])
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+							
+							$this->shop->addTranslationString('wpsg_mod_versandarten_hint_'.$_REQUEST['va_id'], $_REQUEST['value']);
+													
+							die(wpsg_hspc($_REQUEST['value']));
+							
+						} else die(__('UngÃŒltige Eingabe!', 'wpsg'));
+						
+					} else if ($_REQUEST['field'] == 'vz') {
+	
+						if (wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_INT)) {
+							
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'vz' => wpsg_q($_REQUEST['value'])
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+							
+							if ($_REQUEST['value'] > 0) die($this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_VZ."` WHERE `id` = '".wpsg_q($_REQUEST['value'])."'"));
+							else die(__('Alle Versandzonen', 'wpsg'));
+							
+						} else die(__('UngÃŒltige Eingabe!', 'wpsg'));
+							
+					} else if ($_REQUEST['field'] == 'mwst_key') {
+	
+						if (!wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_TAXKEY)) {
+							
+							die(__('UngÃŒltige Eingabe', 'wpsg'));
+							
+						} else {
+						
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'mwst_key' => wpsg_q($_REQUEST['value'])
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+							
+							$tax_groups = wpsg_tax_groups();
+							die(wpsg_hspc($tax_groups[$_REQUEST['value']]));
+							
+						}
 											
-						die($_REQUEST['value']);
-						
-					} else { die(__('UngÃŒltige Eingabe')); }
-					
-				}
-				else if ($_REQUEST['field'] == 'kosten_plz')
-				{
-
-					$_REQUEST['value'] = wpsg_sinput("key", $_REQUEST['value']);
-
-					$strKosten = $this->db->fetchOne("SELECT `kosten_plz` FROM ".WPSG_TBL_VA." WHERE `id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					if (!empty($strKosten)) { $arPLZkosten = unserialize($strKosten); }
-	
-					$arPLZkosten[$_REQUEST['key']] = wpsg_q($_REQUEST['value']);
-
-					$this->db->UpdateQuery(WPSG_TBL_VA, array(
-						'kosten_plz' => serialize($arPLZkosten)
-					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					die($_REQUEST['value']);
-					
-				}
-				else if ($_REQUEST['field'] == 'mwst_laender')
-				{
-
-					$_REQUEST['value'] = wpsg_sinput("key", $_REQUEST['value']);
-
-					$this->db->UpdateQuery(WPSG_TBL_VA, array(
-						'mwst_laender' => wpsg_q($_REQUEST['value'])
-					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					die();
-					
-				}
-				else if ($_REQUEST['field'] == 'aktiv')
-				{
-
-					$_REQUEST['value'] = wpsg_sinput("key", $_REQUEST['value']);
-					
-					$this->db->UpdateQuery(WPSG_TBL_VA, array(
-						'aktiv' => wpsg_q($_REQUEST['value'])
-					), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
-					
-					die();
+					} else if ($_REQUEST['field'] == 'kosten') {
+	
+						if (!wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_COSTKEY)) {
+							
+							die(__('UngÃŒltige Eingabe', 'wpsg'));
+							
+						} else {
+						
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'kosten' => wpsg_q($_REQUEST['value'])
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+												
+							die($_REQUEST['value']);
+							
+						} 
+						
+					} else if ($_REQUEST['field'] == 'kosten_plz') {
+	
+						if (!wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_TEXTAREA)) {
+							
+							die(__('UngÃŒltige Eingabe', 'wpsg'));
+							
+						} else {
+						 
+							$strKosten = $this->db->fetchOne("SELECT `kosten_plz` FROM ".WPSG_TBL_VA." WHERE `id` = '".wpsg_q($_REQUEST['va_id'])."'");
+							
+							if (!empty($strKosten)) { $arPLZkosten = unserialize($strKosten); }
+			
+							$arPLZkosten[$_REQUEST['key']] = wpsg_q($_REQUEST['value']);
+		
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'kosten_plz' => serialize($arPLZkosten)
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+							
+							die($_REQUEST['value']);
+							
+						}
+							
+					} else if ($_REQUEST['field'] == 'mwst_laender') {
+	
+						if (wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_CHECKBOX)) {
+						
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'mwst_laender' => wpsg_q($_REQUEST['value'])
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+							
+							die();
+							
+						} else die(__('UngÃŒltige Eingabe', 'wpsg'));
+						
+					} else if ($_REQUEST['field'] == 'aktiv') {
+	
+						if (wpsg_checkInput($_REQUEST['value'], WPSG_SANITIZE_CHECKBOX)) {
+								
+							$this->db->UpdateQuery(WPSG_TBL_VA, array(
+								'aktiv' => wpsg_q($_REQUEST['value'])
+							), "`id` = '".wpsg_q($_REQUEST['va_id'])."'");
+							
+							die();
+							
+						} else die(__('UngÃŒltige Eingabe', 'wpsg'));
+						
+					}
 					
 				}
Index: /views/mods/mod_paypalratepay/settings_edit.phtml
===================================================================
--- /views/mods/mod_paypalratepay/settings_edit.phtml	(revision 7514)
+++ /views/mods/mod_paypalratepay/settings_edit.phtml	(revision 7514)
@@ -0,0 +1,27 @@
+<?php 
+
+	/**
+	 * Template fÃŒr die Einstellungen des PayPal API Moduls
+	 */
+
+?>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalratepay_aktiv', __('PayPal Ratenzahlung fÃŒr neue Bestellungen erlauben', 'wpsg'), $this->get_option('wpsg_mod_paypalratepay_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalratepay_name', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_paypalratepay_name'), array('help' => 'wpsg_shippay_name')); ?>
+<?php echo wpsg_drawForm_Textarea('wpsg_mod_paypalratepay_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_paypalratepay_hint'), array('help' => 'wpsg_shippay_hint')); ?>
+  
+<script>
+
+	jQuery(document).ready(function() {
+				
+		jQuery('#wpsg_mod_paypalratepay_sandbox').bind('change', function() {
+
+			if (jQuery(this).is(':checked')) jQuery('.wpsg_mod_sandbox_layer').show();
+			else jQuery('.wpsg_mod_sandbox_layer').hide();
+			
+		} ).change();
+		
+	} );
+
+</script>
Index: /wpshopgermany.php
===================================================================
--- /wpshopgermany.php	(revision 7513)
+++ /wpshopgermany.php	(revision 7514)
@@ -82,5 +82,5 @@
 	define('WPSG_SANITIZE_URL', 8);
 	define('WPSG_SANITIZE_TEXTAREA', 9);
-	define('WSPG_SANITIZE_EMAIL', 10);
+	define('WPSG_SANITIZE_EMAIL', 10);
 	define('WPSG_SANITIZE_HEXCOLOR', 11);
 	define('WPSG_SANITIZE_PAGEID', 12);
