Index: /controller/wpsg_AdminController.class.php
===================================================================
--- /controller/wpsg_AdminController.class.php	(revision 5873)
+++ /controller/wpsg_AdminController.class.php	(revision 5877)
@@ -146,8 +146,8 @@
 				'subTemplate' => WPSG_PATH_VIEW.'/admin/seiten.phtml'
 			);
-			$this->shop->view['arSubAction']['customerpreset'] = array(
-				'Menutext' => __('Kundenvoreinstellungen', 'wpsg'),
-				'subTemplate' => WPSG_PATH_VIEW.'/admin/customerpreset.phtml'
-			);
+			//$this->shop->view['arSubAction']['customerpreset'] = array(
+			//	'Menutext' => __('Kundenvoreinstellungen', 'wpsg'),
+			//	'subTemplate' => WPSG_PATH_VIEW.'/admin/customerpreset.phtml'
+			//);
 			$this->shop->view['arSubAction']['kundendaten'] = array(
 				'Menutext' => __('Kundendaten', 'wpsg'),
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 5873)
+++ /controller/wpsg_ShopController.class.php	(revision 5877)
@@ -2571,4 +2571,6 @@
 		{
 			
+			$this->addShipPay();
+				
 			load_plugin_textdomain('wpsg', false, dirname( plugin_basename( __FILE__ ) ).'/../lang/');
 			   
Index: /mods/wpsg_mod_deliverynote.class.php
===================================================================
--- /mods/wpsg_mod_deliverynote.class.php	(revision 5873)
+++ /mods/wpsg_mod_deliverynote.class.php	(revision 5877)
@@ -152,5 +152,5 @@
 					
 			}
-			else if ($_REQUEST['wpsg_mod_deliverynote_bp_del'] == "1")
+			else if ((array_key_exists('wpsg_mod_deliverynote_bp_del', $_REQUEST)) && ($_REQUEST['wpsg_mod_deliverynote_bp_del'] == "1"))
 			{
 			
@@ -177,5 +177,5 @@
 					
 			}
-			else if ($_REQUEST['wpsg_mod_deliverynote_logo_del'] == "1")
+			else if ((array_key_exists('wpsg_mod_deliverynote_logo_del', $_REQUEST)) && ($_REQUEST['wpsg_mod_deliverynote_logo_del'] == "1"))
 			{
 			
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 5873)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 5877)
@@ -200,5 +200,5 @@
 					
 			}
-			else if ($_REQUEST['wpsg_rechnungen_bp_del'] == "1")
+			else if ((array_key_exists('wpsg_rechnungen_bp_del', $_REQUEST)) && ($_REQUEST['wpsg_rechnungen_bp_del'] == "1"))
 			{
 
@@ -225,5 +225,5 @@
 					
 			}
-			else if ($_REQUEST['wpsg_rechnungen_logo_del'] == "1")
+			else if ((array_key_exists('wpsg_rechnungen_logo_del', $_REQUEST)) && ($_REQUEST['wpsg_rechnungen_logo_del'] == "1"))
 			{
 
Index: /mods/wpsg_mod_shs.class.php
===================================================================
--- /mods/wpsg_mod_shs.class.php	(revision 5873)
+++ /mods/wpsg_mod_shs.class.php	(revision 5877)
@@ -131,11 +131,12 @@
 			$this->shop->update_option('wpsg_mod_shs_autoend', $_REQUEST['wpsg_mod_shs_autoend']);			
 			
-			$this->shop->update_option('wpsg_mod_shs_mobileversion', $_REQUEST['wpsg_mod_shs_mobileversion']);
-			$this->shop->update_option('wpsg_mod_shs_creditcard_cardholder', $_REQUEST['wpsg_mod_shs_creditcard_cardholder']);
-			$this->shop->update_option('wpsg_mod_shs_creditcard_optionalcardholder', $_REQUEST['wpsg_mod_shs_creditcard_optionalcardholder']);
-			$this->shop->update_option('wpsg_mod_shs_creditcard_sslifvisaenrolledu', $_REQUEST['wpsg_mod_shs_creditcard_sslifvisaenrolledu']);
-			$this->shop->update_option('wpsg_mod_shs_directdebit_accountholder', $_REQUEST['wpsg_mod_shs_directdebit_accountholder']);
-			$this->shop->update_option('wpsg_mod_shs_directdebit_optionalaccountholder', $_REQUEST['wpsg_mod_shs_directdebit_optionalaccountholder']);
-			$this->shop->update_option('wpsg_mod_shs_directdebit_checklist', $_REQUEST['wpsg_mod_shs_directdebit_checklist']);
+			$this->shop->update_option('wpsg_mod_shs_mobileversion', wpsg_getStr($_REQUEST['wpsg_mod_shs_mobileversion']));
+			$this->shop->update_option('wpsg_mod_shs_creditcard_cardholder', wpsg_getStr($_REQUEST['wpsg_mod_shs_creditcard_cardholder']));
+			$this->shop->update_option('wpsg_mod_shs_creditcard_optionalcardholder', wpsg_getStr($_REQUEST['wpsg_mod_shs_creditcard_optionalcardholder']));
+			$this->shop->update_option('wpsg_mod_shs_creditcard_sslifvisaenrolledu', wpsg_getStr($_REQUEST['wpsg_mod_shs_creditcard_sslifvisaenrolledu']));
+			$this->shop->update_option('wpsg_mod_shs_directdebit_accountholder', wpsg_getStr($_REQUEST['wpsg_mod_shs_directdebit_accountholder']));
+			$this->shop->update_option('wpsg_mod_shs_directdebit_optionalaccountholder', wpsg_getStr($_REQUEST['wpsg_mod_shs_directdebit_optionalaccountholder']));
+			$this->shop->update_option('wpsg_mod_shs_directdebit_checklist', wpsg_getStr($_REQUEST['wpsg_mod_shs_directdebit_checklist']));
+
 			$this->shop->update_option('wpsg_mod_shs_transactiontype', $_REQUEST['wpsg_mod_shs_transactiontype']);
 			
Index: /mods/wpsg_mod_spconditions.class.php
===================================================================
--- /mods/wpsg_mod_spconditions.class.php	(revision 5873)
+++ /mods/wpsg_mod_spconditions.class.php	(revision 5877)
@@ -19,5 +19,5 @@
 			$this->desc = __('ErmÃ¶glicht die Erstellung von Bedingungen fÃŒr Versand- und Zahlungsarten.', 'wpsg');
 			
-			if (defined('WPSG_TBL_SPCONDITIONS')) define('WPSG_TBL_SPCONDITIONS', $this->shop->prefix.'wpsg_spconditions');
+			if (!defined('WPSG_TBL_SPCONDITIONS')) define('WPSG_TBL_SPCONDITIONS', $this->shop->prefix.'wpsg_spconditions');
 			
 		} // public function __construct()
Index: /mods/wpsg_mod_su.class.php
===================================================================
--- /mods/wpsg_mod_su.class.php	(revision 5873)
+++ /mods/wpsg_mod_su.class.php	(revision 5877)
@@ -263,5 +263,5 @@
 		{ 
 			
-			if ($_REQUEST['wpsg_plugin'] == 'wpsg_mod_su' && $_REQUEST['confirm'] == 'su')			
+			if (wpsg_isSizedString($_REQUEST['wpsg_plugin'], 'wpsg_mod_su') && wpsg_isSizedString($_REQUEST['confirm'], 'su'))			
 			{
 
Index: /mods/wpsg_mod_targo.class.php
===================================================================
--- /mods/wpsg_mod_targo.class.php	(revision 5873)
+++ /mods/wpsg_mod_targo.class.php	(revision 5877)
@@ -40,5 +40,7 @@
 			$this->shop->checkDefault('wpsg_mod_targo_laufzeit_max', '60');
 			$this->shop->checkDefault('wpsg_mod_targo_rate_min', '10.00');
-			$this->shop->checkDefault('wpsg_mod_targo_url', '');
+			$this->shop->checkDefault('wpsg_mod_targo_url_test', '');
+			$this->shop->checkDefault('wpsg_mod_targo_url_live', '');
+			$this->shop->checkDefault('wpsg_mod_targo_url_use', '0');
 			$this->shop->checkDefault('wpsg_mod_targo_koop_id', '');
 			$this->shop->checkDefault('wpsg_mod_targo_dealerid', '');
@@ -47,6 +49,6 @@
 			$this->shop->checkDefault('wpsg_mod_targo_error', '');
 			
-			$this->shop->checkDefault('wpsg_mod_targo_bezeichnung', '');
-			$this->shop->checkDefault('wpsg_mod_targo_hint', '');
+			$this->shop->checkDefault('wpsg_mod_targo_bezeichnung', 'Targobank');
+			$this->shop->checkDefault('wpsg_mod_targo_hint', 'ErmÃ¶glicht die Zahlungsabwicklung mit der Targobank');
 			$this->shop->checkDefault('wpsg_mod_targo_createwebhook', '');
 			$this->shop->checkDefault('wpsg_mod_targo_gebuehr', '');
@@ -55,12 +57,4 @@
 				
 		} // public function install()
-		
-		public function init() 
-		{
-			
-			spl_autoload_register(array($this, 'spl_autoload'));
-			
-			
-		} // public function init()
 		
 		public function settings_edit()
@@ -94,5 +88,7 @@
 			$this->shop->update_option('wpsg_mod_targo_laufzeit_max', $_REQUEST['wpsg_mod_targo_laufzeit_max']);
 			$this->shop->update_option('wpsg_mod_targo_rate_min', $_REQUEST['wpsg_mod_targo_rate_min']);
-			$this->shop->update_option('wpsg_mod_targo_url', $_REQUEST['wpsg_mod_targo_url']);
+			$this->shop->update_option('wpsg_mod_targo_url_test', $_REQUEST['wpsg_mod_targo_url_test']);
+			$this->shop->update_option('wpsg_mod_targo_url_live', $_REQUEST['wpsg_mod_targo_url_live']);
+			$this->shop->update_option('wpsg_mod_targo_url_use', $_REQUEST['wpsg_mod_targo_url_use']);
 			$this->shop->update_option('wpsg_mod_targo_koop_id', $_REQUEST['wpsg_mod_targo_koop_id']);
 			$this->shop->update_option('wpsg_mod_targo_dealerid', $_REQUEST['wpsg_mod_targo_dealerid']);
@@ -101,52 +97,14 @@
 			$this->shop->update_option('wpsg_mod_targo_bezeichnung', $_REQUEST['wpsg_mod_targo_bezeichnung']);
 			$this->shop->update_option('wpsg_mod_targo_hint', $_REQUEST['wpsg_mod_targo_hint']);
-			$this->shop->update_option('wpsg_mod_targo_createwebhook', $_REQUEST['wpsg_mod_targo_createwebhook']);
+			//$this->shop->update_option('wpsg_mod_targo_createwebhook', $_REQUEST['wpsg_mod_targo_createwebhook']);
 			$this->shop->update_option('wpsg_mod_targo_gebuehr', $_REQUEST['wpsg_mod_targo_gebuehr']);
 			$this->shop->update_option('wpsg_mod_targo_mwst', $_REQUEST['wpsg_mod_targo_mwst']);
 			$this->shop->update_option('wpsg_mod_targo_mwstland', $_REQUEST['wpsg_mod_targo_mwstland']);
 			
-			$this->shop->createPage(__('Erfolgreiche Targo Finanzierung', 'wpsg'), 'wpsg_mod_targo_success', $_REQUEST['wpsg_mod_targo_success']);
-			$this->shop->createPage(__('Fehlgeschlagene Targo Finanzierung', 'wpsg'), 'wpsg_mod_targo_error', $_REQUEST['wpsg_mod_targo_error']);
+			//$this->shop->createPage(__('Erfolgreiche Targo Finanzierung', 'wpsg'), 'wpsg_mod_targo_success', $_REQUEST['wpsg_mod_targo_success']);
+			//$this->shop->createPage(__('Fehlgeschlagene Targo Finanzierung', 'wpsg'), 'wpsg_mod_targo_error', $_REQUEST['wpsg_mod_targo_error']);
 			
 		} // public function settings_save()
-				
-		public function order_ajax()
-		{
-				
-			if (wpsg_isSizedString($_REQUEST['do'], 'refresh'))
-			{
-		
-				$state = $this->getPaymentState($_REQUEST['edit_id']);
-		
-				$this->shop->addBackendMessage(wpsg_translate(__('Status der Zahlung (#1#) erfolgreich abgefragt.', 'wpsg'), $state));
-		
-				$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$_REQUEST['edit_id']);
-		
-			}
-				
-		} // public function order_ajax()
-		
-		public function checkGeneralBackendError()
-		{
-		//TODO
-			if ($this->shop->get_option('wpsg_mod_targo_mode') == '1')
-			{
-				
-				if (!wpsg_isSizedString($this->shop->get_option('wpsg_mod_targo_clientid')) && !wpsg_isSizedString($this->shop->get_option('wpsg_mod_targo_secret')))
-				{
-					
-					$this->shop->addBackendError('nohspc_'.wpsg_translate(
-						wpsg_translate(
-							__('Das Modul "Targo" ist aktiviert und es wurden keine API Zugangsdatenhinterlegt. Gehen Sie in die <a href="#1#">Einstellungen</a> des Moduls um die API Daten zu hinterlegen.', 'wpsg'),
-							WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_targo'
-						)
-					));
-					
-				}
-				
-			}
-			
-		} // public function checkGeneralBackendError()
-		
+				 
 		public function addPayment(&$arPayment) 
 		{ 
@@ -173,28 +131,17 @@
 			
 				$arPaymentTB[$this->id] = array(
-						'id' => $this->id,
-						'name' => __($this->shop->get_option('wpsg_mod_targo_bezeichnung'), 'wpsg'),
-						'preis' => $this->shop->get_option('wpsg_mod_targo_gebuehr'),
-						'mwst' => $this->shop->get_option('wpsg_mod_targo_mwst'),
-						'mwst_value' => $mwst_value,
-						'mwst_null' => $this->shop->get_option('wpsg_mod_targo_mwstland'),
-						'hint' => __($this->shop->get_option('wpsg_mod_targo_hint')),
-						'logo' => $this->shop->getRessourceURL('gfx/targologo.png')
+					'id' => $this->id,
+					'name' => __($this->shop->get_option('wpsg_mod_targo_bezeichnung'), 'wpsg'),
+					'preis' => $this->shop->get_option('wpsg_mod_targo_gebuehr'),
+					'mwst' => $this->shop->get_option('wpsg_mod_targo_mwst'),
+					'mwst_value' => $mwst_value,
+					'mwst_null' => $this->shop->get_option('wpsg_mod_targo_mwstland'),
+					'hint' => __($this->shop->get_option('wpsg_mod_targo_hint')),
+					'logo' => $this->shop->getRessourceURL('gfx/targologo.png')
 				);
 				$arPayment = wpsg_array_merge($arPaymentTB, $arPayment);
 				
 			}
-			/*
-			$arPayment[$this->id] = array(
-				'id' => $this->id,
- 				'name' => __($this->shop->get_option('wpsg_mod_targo_bezeichnung'), 'wpsg'),
-				'preis' => $this->shop->get_option('wpsg_mod_targo_gebuehr'),
-				'mwst' => $this->shop->get_option('wpsg_mod_targo_mwst'),
-				'mwst_value' => $mwst_value,
-				'mwst_null' => $this->shop->get_option('wpsg_mod_targo_mwstland'),
-				'hint' => __($this->shop->get_option('wpsg_mod_targo_hint')),
-				'logo' => $this->shop->getRessourceURL('gfx/targologo.png')
-			);
-			*/
+			
 			if (isset($_REQUEST['wpsg_checkout2']) || ($this->shop->hasMod('wpsg_mod_onepagecheckout') && isset($_REQUEST['wpsg_checkout'])))
 			{
@@ -266,34 +213,5 @@
 			
 		} // public function calcPayment(&$arBasket) 
-		
-		public function setOrderStatus($order_id, $status_id, $inform)
-		{
-		//TODO
-			$oOrder = wpsg_order::getInstance($order_id);
-				
-			if ($oOrder->getPaymentID() == $this->id)
-			{
-		
-				$arStornoState = (array)$this->shop->get_option('wpsg_mod_paypal_stornostate');
-					
-				if (array_key_exists($status_id, $arStornoState) && $arStornoState[$status_id] == '1')
-				{
-						
-					if (wpsg_isSizedString($oOrder->getMeta('wpsg_mod_paypal_saleid')))
-					{
-							
-						$bStorno = $this->stornoOrder($order_id);
-		
-						if ($bStorno === true) $this->shop->addBackendMessage(__('Zahlung erfolgreich ÃŒber die PayPal API storniert.', 'wpsg'));
-						else $this->shop->addBackendError(__('Es gab ein Problem bei der Stornierung der Zahlung ÃŒber die PayPal API. Bitte Bestellprotokoll beachten.', 'wpsg'));
-		
-					}
-						
-				}
-		
-			}
-		
-		}
-		
+				
 		public function order_view_afterpayment(&$order_id)
 		{
@@ -310,6 +228,5 @@
 			
 			$oOrder = wpsg_order::getInstance($order_id);
-			//KundenID: echo $oOrder->k_id;
-				
+							
 			$this->shop->view['targoLink'] = $this->getTargoLink($order_id);
 			$this->shop->view['o_id'] = $order_id;
@@ -321,135 +238,6 @@
 		} // public function order_done(&$order_id)
 
-		public function wp_loaded() { 
-			
-			if (wpsg_isSizedString($_REQUEST['wpsg_plugin'], 'wpsg_mod_targo') && wpsg_isSizedString($_REQUEST['confirm'], 'pp'))			
-			{
-			//TODO
-				$this->shop->checkEscape();
-				
-				// IPN Zahlungsbenachrichtigung
-				$req = 'cmd=_notify-validate';
-				
-				foreach ($_POST as $key => $value)
-				{ 
-					 			
-					$req .= "&".$key."=".urlencode($value);
-					
-				}
-
-				$header = "";
-				$header .= "POST /cgi-bin/webscr HTTP/1.1\r\n";
-				$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
-								
-				if ($this->shop->get_option('wpsg_mod_paypal_sandbox') == 1)
-				{
-					
-					$header .= "Host: www.sandbox.paypal.com\r\n";
-					$fp = fsockopen ('tls://www.sandbox.paypal.com', 443, $errno, $errstr, 30);
-					
-				}
-				else	
-				{	
-							
-					$header .= "Host: www.paypal.com\r\n";
-					$fp = fsockopen ('tls://www.paypal.com', 443, $errno, $errstr, 30);
-					
-				}
- 
-				$header .= "Connection: Close\r\n";
-				$header .= "Content-Length: ".strlen($req)."\r\n\r\n";
-				
-				if (!$fp) 
-				{
-					
-					
-					
-				} 
-				else 
-				{
-												
-					fputs ($fp, $header.$req);
-					
-					while (!feof($fp)) 
-					{
-						
-						$res = fgets ($fp, 1024);
-						
-						if (strcmp(trim($res), "VERIFIED") == 0) 
-						{
-							
-							if (strtolower($_REQUEST['payment_status']) == "completed")
-							{
-								
-								// Wir haben hier nicht wpsg_hspc (htmlspecialchars) verwendet da es ein Problem mit seltsammen (Steuerzeichen?) gab
-								// Wenn mann sich den Request so angeschaut hat war alles in Ordnung konnte mit gleichen Daten auch nicht nachgestellt werden
-								// Problem trat nur bei den Requests von PayPal auf.
-								// Nicht zentral gelÃ¶st, da im Manual ein Hinweis auf ein mÃ¶gliches Sicherheitsproblem existiert
-								
-								$this->db->ImportQuery(WPSG_TBL_OL, array(
-									"title" => __("PayPal VERIFIED", "wpsg"),
-									"cdate" => "NOW()",
-									"o_id" => wpsg_q($_REQUEST['custom']),
-									"mailtext" => wpsg_q(htmlentities(print_r($_REQUEST, 1), ENT_IGNORE))
-								));
-							
-								if ($this->shop->setPayMent($_REQUEST['custom'], $_REQUEST['mc_gross']))
-								{
-									
-									$this->shop->setOrderStatus($_REQUEST['custom'], 100, true);
-									
-								}
-															
-							}
-							
-						}
-						else if (strcmp(trim($res), "INVALID") == 0) 
-						{
-
-							$this->db->ImportQuery(WPSG_TBL_OL, array(
-								"title" => __("Targo FAILED", "wpsg"),
-								"cdate" => "NOW()",
-								"o_id" => wpsg_q($_REQUEST['custom']),
-								"mailtext" => wpsg_q(wpsg_hspc(print_r($_REQUEST, 1)))
-							));
-										
-						}
-						
-					}
-					
-					fclose($fp);
-				
-				}
-				
-				die();
-					
-			}
-			
-		} // public function wp_loaded()
-		
-		public function mail_payment() 
-		{ 
-
-			if ($this->shop->view['basket']['checkout']['payment'] != $this->id) return;			
-			
-			if ($this->shop->htmlMail === true)
-			{
-				
-				echo '<a href="'.$this->shop->getDoneURL($this->shop->view['o_id']).'">'.__('Zahlungslink', 'wpsg').'</a>'.__(', um die Zahlung durchzufÃŒhren', 'wpsg');
-				
-			}
-			else
-			{
-			
-				echo wpsg_pad_right(__('Zahlungslink', 'wpsg').':', 35).$this->shop->getDoneURL($this->shop->view['o_id']);
-				
-			}
-			
-		} // public function mail_payment()
-		
 		/* Modulfunktionen */
-		
-		/* Classic API */
-		
+				
 		/**
 		 * Gibt den Link fÃŒr die Bezahlung per Targo anhand der BestellID zurÃŒck
@@ -462,244 +250,8 @@
 		} // public function getTargoLink($order_id)
 		
-		
-		/**
-		 * Startet die Zahlungsabwicklung ÃŒber PayPal mittels der API
-		 */
-		public function startPayPalPaymentRedirect()
-		{
-				
-			if (!wpsg_isSizedInt($_REQUEST['order_id'])) $this->shop->throwErrorCode('2_1');
-				
-			$oOrder = wpsg_order::getInstance($_REQUEST['order_id']);
-			$paymentId = $oOrder->getMeta('wpsg_mod_paypal_paymentid');
-				
-			if (wpsg_isSizedString($paymentId))
-			{
-		
-				try
-				{
-		
-					$payment = \PayPal\Api\Payment::get($oOrder->getMeta('wpsg_mod_paypal_paymentid'), $this->getApiContext());
-					$approvalLink = $payment->getApprovalLink();
-						
-					if (!wpsg_isSizedString($approvalLink))
-					{
-		
-						$oOrder->log(__('PayPal Fehler: Zahlung konnte nicht erneut ausgefÃŒhrt werden', 'wpsg'), 'PaymentStatus: '.$payment->getState());
-						$this->shop->redirect($this->shop->getDoneURL($oOrder->id));
-		
-					}
-					else
-					{
-							
-						$this->shop->redirect($payment->getApprovalLink());
-		
-					}
-						
-				}
-				catch (Exception $ex)
-				{
-		
-					$data = json_decode($ex->getData(), true);
-						
-					ob_start();
-					var_dump($ex);
-					$dump = ob_get_contents();
-					ob_end_clean();
-						
-					$oOrder->log(wpsg_translate(__('PayPal Fehler: #1#', 'wpsg'), $data['message']), print_r($data, 1)."\r\n".$dump);
-						
-					$this->shop->addFrontendError(__('PayPal Fehler, bitte Shop Betreiber kontaktieren.', 'wpsg'));
-					$this->shop->redirect(get_permalink($this->shop->get_option('wpsg_page_mod_paypal_error')));
-						
-				}
-		
-			}
-				
-			if ($this->id != $oOrder->getPaymentID()) $this->shop->throwErrorCode('2_2');
-			//TODO
-			$payer = new \PayPal\Api\Payer();
-			$payer->setPaymentMethod("paypal");
-				
-			$billing_address = new \PayPal\Api\Address();
-			$billing_address->setCity($oOrder->getInvoiceCity());
-			$billing_address->setPostalCode($oOrder->getInvoiceZip());
-			$billing_address->setLine1($oOrder->getInvoiceStreet());
-			$billing_address->setCountryCode($oOrder->getInvoiceCountryKuerzel());
-		
-			$shipping_address = new \PayPal\Api\Address();
-			$shipping_address->setCity($oOrder->getShippingCity());
-			$shipping_address->setPostalCode($oOrder->getShippingZip());
-			$shipping_address->setLine1($oOrder->getShippingStreet());
-			$shipping_address->setCountryCode($oOrder->getShippingCountryKuerzel());
-		
-			$payer_info = new \PayPal\Api\PayerInfo();
-			$payer_info->setFirstName($oOrder->getInvoiceFirstName());
-			$payer_info->setLastName($oOrder->getInvoiceName());
-			$payer_info->setBillingAddress($billing_address);
-			//$payer_info->setShippingAddress($shipping_address);
-		
-			$payer->setPayerInfo($payer_info);
-				
-				
-			$amount = new \PayPal\Api\Amount();
-			$amount->setCurrency($this->shop->get_option('wpsg_mod_paypal_currency'));
-			$amount->setTotal($oOrder->getAmount(WPSG_BRUTTO));
-			//$amount->setDetails($details);
-				
-			$transaction = new \PayPal\Api\Transaction();
-			$transaction->setAmount($amount);
-			//$transaction->setItemList($itemList);
-			$transaction->setDescription($this->shop->replaceUniversalPlatzhalter(__($this->shop->get_option('wpsg_mod_paypal_subject'), 'wpsg'), $oOrder->id));
-			$transaction->setInvoiceNumber($oOrder->id);
-				
-			$redirectUrls = new \PayPal\Api\RedirectUrls();
-			$redirectUrls->setReturnUrl($this->shop->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypal', 'executePayment'));
-			$redirectUrls->setCancelUrl(get_permalink($this->shop->get_option('wpsg_page_mod_paypal_error')));
-				
-			$payment = new \PayPal\Api\Payment();
-			$payment->setIntent("sale");
-			$payment->setPayer($payer);
-			$payment->setRedirectUrls($redirectUrls);
-			$payment->setTransactions(array($transaction));
-				
-			try
-			{
-					
-				$response = $payment->create($this->getApiContext());
-		
-				$oOrder->setMeta('wpsg_mod_paypal_paymentid', $response->getId());
-		
-			}
-			catch (Exception $ex)
-			{
-					
-				$data = json_decode($ex->getData(), true);
-		
-				ob_start();
-				var_dump($ex);
-				$dump = ob_get_contents();
-				ob_end_clean();
-		
-				$oOrder->log(wpsg_translate(__('PayPal Fehler: #1#', 'wpsg'), $data['message']), print_r($data, 1)."\r\n".$dump);
-		
-				$this->shop->addFrontendError(__('PayPal Fehler, bitte Shop Betreiber kontaktieren.', 'wpsg'));
-				$this->shop->redirect($this->shop->getDoneURL($oOrder->id));
-		
-			}
-				
-			$this->getPaymentState($oOrder->id);
-				
-			$this->shop->redirect($payment->getApprovalLink());
-		
-		} // public function startPayPalPaymentRedirect()
-		
-		/**
-		 * FÃŒhrt eine Zahlung aus wird von startPayPalPaymentRedirect aufgerufen
-		 */
-		public function executePaymentRedirect()
-		{
-		
-			$payment = \PayPal\Api\Payment::get($_REQUEST['paymentId'], $this->getApiContext());
-		
-			$execution = new \PayPal\Api\PaymentExecution();
-			$execution->setPayerId($_REQUEST['PayerID']);
-		
-			try
-			{
-		
-				$result = $payment->execute($execution, $this->getApiContext());
-		
-			}
-			catch (Exception $ex)
-			{
-					
-				$this->shop->redirect(get_permalink($this->shop->get_option('wpsg_mod_targo_error')));
-					
-			}
-		
-			$this->shop->redirect(get_permalink($this->shop->get_option('wpsg_mod_targo_success')));
-				
-		} // public fucntion executePaymentRedirect()
-		
-		private function getPaymentState($order_id)
-		{
-			//TODO
-			$oOrder = wpsg_order::getInstance($order_id);
-				
-			if (!wpsg_isSizedString($oOrder->getMeta('wpsg_mod_paypal_paymentid'))) return false;
-				
-			try
-			{
-					
-				$payment = \PayPal\Api\Payment::get($oOrder->getMeta('wpsg_mod_paypal_paymentid'), $this->getApiContext());
-					
-				$oOrder->setMeta('wpsg_mod_paypal_paymentstate', $payment->getState());
-		
-				return $payment->getState();
-		
-			}
-			catch (Exception $e)
-			{
-		
-				return false;
-					
-			}
-				
-		}
-		
-		
-		/**
-		 * Wird optional beim speichern ausgelÃ¶st, versucht den WebHook anzulegen und setzt die BackendMeldungen
-		 */
-		private function createWebHook()
-		{
-		
-			$create_webhook = false;
-			$wh_url = $this->shop->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_targoapi', 'webHook', array(), true);
-				
-			$arWH = $this->api_getWebHooks();
-				
-			if (wpsg_isSizedArray($arWH))
-			{
-		
-				foreach ($arWH as $wh)
-				{
-		
-					if ($wh['url'] === $wh_url)
-					{
-		
-						$nExists = true;
-						break;
-		
-					}
-		
-				}
-		
-				if ($nExists === false) $create_webhook = true;
-				else
-				{
-		
-					$this->shop->addBackendError(__('WebHook ist bereits registriert.', 'wpsg'));
-		
-				}
-		
-			}
-			else $create_webhook = true;
-				
-			if ($create_webhook === true)
-			{
-		
-				$bOK = $this->api_createWebHook($wh_url);
-		
-				if ($bOK === true) $this->shop->addBackendMessage(__('WebHook erfolgreich angelegt.', 'wpsg'));
-				else $this->shop->addBackendError(__('WebHook konnte nicht angelegt werden.', 'wpsg'));
-		
-			}
-		
-		} // private function createWebHook();
-					
+				
 		public function dealerTextRedirect()
 		{
+			
 			//die("dealerTextRedirekt");
 /*
@@ -715,91 +267,20 @@
 			//$url = "https://onlineapplication.uat.targobank.de/microsites/statustool/interface/request.asp" 
 			
-		} // public function webHookRedirect()
-		
-		private function stornoOrder($order_id)
-		{
-			//TODO	
+			$order_id = $_REQUEST['order_id'];
+			// PAID speichern zu Bestellung
 			$oOrder = wpsg_order::getInstance($order_id);
-			if ($oOrder === false) $this->shop->throwErrorCode('2_3');
-				
-			$sale_id = $oOrder->getMeta('wpsg_mod_targo_saleid');
-		
-			$amount = new \PayPal\Api\Amount();
-			$amount->setCurrency($this->shop->get_option('wpsg_mod_paypal_currency'));
-			$amount->setTotal($oOrder->getAmount(WPSG_BRUTTO));
-				
-			$refund = new \PayPal\Api\Refund();
-			$refund->setAmount($amount);
-				
-			$sale = new \PayPal\Api\Sale();
-			$sale->setId($sale_id);
-				
-			try
-			{
-						 
-				$refundedSale = $sale->refund($refund, $this->getApiContext());
-				
-				$oOrder->setMeta('wpsg_mod_paypal_saleid', null);
-				$oOrder->setMeta('wpsg_mod_paypal_paymentid', null);
-				
-				return true;
-		
-			}
-			catch (Exception $ex)
-			{
-		
-				$oOrder->log(wpsg_translate(__('Targo Fehler: #1#', 'wpsg'), $ex->getMessage()));
-				return false;
-		
-			}
-				
-		} // public function stornoOrder($order_id)
-		
-		/**
-		 * Gibt den API Context fÃŒr alle API Anfragen zurÃŒck
-		 */
-		private function getApiContext()
-		{
-			//TODO
-			if ($this->apiContext === false)
-			{
-		
-				$this->apiContext = new \PayPal\Rest\ApiContext(new PayPal\Auth\OAuthTokenCredential(
-					$this->shop->get_option('wpsg_mod_paypal_clientid'),
-					$this->shop->get_option('wpsg_mod_paypal_secret')
-				));
-		
-				if (!$this->isSandbox())
-				{
-						
-					$this->apiContext->setConfig(array(
-						'mode' => 'live'
-					));
-						
-				}
-		
-			}
-				
-			return $this->apiContext;
-				
-		} // public function getApiContext()
-		
-		
-		/**
-		 * Autoloader fÃŒr die Targo Klassen
-		 */
-		function spl_autoload($class)
-		{
-				
-			if (substr($class, 0, 6) == "Targo\\" || substr($class, 0, 4) == "Psr\\")
-			{
-					
-				$path = WPSG_PATH_LIB.str_replace("\\", DIRECTORY_SEPARATOR, $class).'.php';
-		
-				if (file_exists($path)) require_once($path);
-					
-			}
-							
-		} // function spl_autoload($class)
+			$oOrder->setMeta('wpsg_mod_targo_paymentid', $_REQUEST['paid']);
+			
+			// Status umschalten (wpsg_ShopController->setOrderStatus($order_id, $status_id, $inform))
+			// $inform sollte false sein, sonst bekommt der Kunde eine E-Mail $status_id ist wpsg_mod_targo::STATUS_CREDIT_ACCEPTED
+			$sc = new wpsg_ShopController();
+			$sc->setOrderStatus($order_id, STATUS_CREDIT_ACCEPTED, false);
+			
+			// Log Eintrag speichern wpsg_order->log
+			// [session_id] => 1tm24iqd49c4cg1ct834bvqnp0 [paid] => 201610252052880
+			$text = 'Session-ID: '.$_REQUEST['session_id'].'  PAID: '.$_REQUEST['paid'];
+			$oOrder->log('RÃŒckantwort der Targobank', $text);
+			
+		} // public function dealerTextRedirect()
 		
 	} // class wpsg_mod_targo extends wpsg_mod_basic
Index: /mods/wpsg_mod_trustedshops.class.php
===================================================================
--- /mods/wpsg_mod_trustedshops.class.php	(revision 5873)
+++ /mods/wpsg_mod_trustedshops.class.php	(revision 5877)
@@ -177,5 +177,6 @@
 			
 			// Wenn keine Elemente, dann keine Meldung
-			if (!wpsg_isSizedArray($this->getExportData())) return;
+			$expdata = $this->getExportData();
+			if (!wpsg_isSizedArray($expdata)) return;
 			
 			$current_timestamp = $this->db->fetchOne("SELECT UNIX_TIMESTAMP()");
@@ -501,5 +502,5 @@
  				$timestamp = filemtime($this->cache_file);
  
- 				if (mktime() - $timestamp < $this->cache_timeout) 
+ 				if (time() - $timestamp < $this->cache_timeout) 
  				{
  					
Index: ews/admin/customerpreset.phtml
===================================================================
--- /views/admin/customerpreset.phtml	(revision 5873)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<?php
-
-	/**
-	 * Template fÃŒr die Kundenvoreinstellungen im Backend
-	 */
-
-?>
-<div class="wpsg_admin_submenu">
-	
-	<div class="head">
-		<div class="title"><?php echo __("Einstellungen", "wpsg"); ?></div>			
-		<div style="clear:both;"></div>
-	</div>
-
-	<ul>		
-		<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>		
-		<li class="<?php echo (($k == $this->view['subAction'])?'current':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a></li>
-		<?php } ?>
-	</ul>
-			
-</div>
-
-<div class="wpsg_admin_content">
-	
-	<form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;noheader=1&amp;subaction=<?php echo $_REQUEST['subaction']; ?>">
-
-		<?php echo wpsg_drawForm_Select('wpsg_customerpreset_shipping', __('Standard Versandart', 'wpsg'), $this->view['arShipping'], $this->get_option('wpsg_customerpreset_shipping'), array('help' => 'wpsg_customerpreset_shipping')); ?>
-		<?php echo wpsg_drawForm_Select('wpsg_customerpreset_payment', __('Standard Zahlungsart', 'wpsg'), $this->view['arPayment'], $this->get_option('wpsg_customerpreset_payment'), array('help' => 'wpsg_customerpreset_payment')); ?>
-		<?php echo wpsg_drawForm_Select('wpsg_defaultland', __('Standardland', 'wpsg'), $this->view['arLander'], $this->get_option('wpsg_defaultland'), array('help' => 'wpsg_defaultland', 'hint' => 
-			'nohspc_'.wpsg_translate(__('Die LÃ€nder kÃ¶nnen in der <a href="#1#">LÃ€nderverwaltung</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender')		
-		)); ?>
-		<?php echo wpsg_drawForm_Select('wpsg_customerpreset_title', __('Standardanrede', 'wpsg'), $this->view['arTitle'], $this->get_option('wpsg_customerpreset_title'), array( 'help' => 'wpsg_customerpreset_title',
-			'hint' => 'nohspc_'.wpsg_translate(__('Die Auswahl kann in den <a href="#1#">Kundendaten</a> definiert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten'),
-			'noIndex' => true 
-		)); ?>
-		
-		<br />
-				
-		<input class="button-primary" type="submit" name="wpsg-submit" value="<?php echo __('Speichern', 'wpsg'); ?>" />
-	
-	</form>
-	
-</div>
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 5873)
+++ /views/css/admin.css	(revision 5877)
@@ -210,4 +210,5 @@
 /* Modul Gutschein */
 #wpsg-bs.wpsg_voucher .col_checkbox { width:20px; }
+.wpsg_mod_voucher_fieldtable { font-size:12px; }
 
 /* Modul Lieferschein */
Index: /views/mods/mod_ordercondition/list.phtml
===================================================================
--- /views/mods/mod_ordercondition/list.phtml	(revision 5873)
+++ /views/mods/mod_ordercondition/list.phtml	(revision 5877)
@@ -119,5 +119,5 @@
         <?php echo wpsg_drawForm_TextStart(); ?>
         <span class="wpsg_editable" id="oc_text_<?php echo $oc['id']; ?>"><?php echo wpsg_hspc($oc['text']); ?></span>
-        <?php echo wpsg_drawForm_TextEnd(__('Bedinungstext', 'wpsg')); ?>
+        <?php echo wpsg_drawForm_TextEnd(__('Bedingungstext', 'wpsg')); ?>
         <script type="text/javascript">/* <![CDATA[ */
 
Index: /views/mods/mod_prepayment/settings_edit.phtml
===================================================================
--- /views/mods/mod_prepayment/settings_edit.phtml	(revision 5873)
+++ /views/mods/mod_prepayment/settings_edit.phtml	(revision 5877)
@@ -7,14 +7,7 @@
 ?>
 
-<div class="wpsg_form_field">
-	<div class="wpsg_form_left">
-		<?php echo __("Bezeichnung", "wpsg"); ?>:
-	</div>
-	<div class="wpsg_form_right">
-		<input type="text" name="wpsg_mod_prepayment_bezeichnung" value="<?php echo $this->get_option('wpsg_mod_prepayment_bezeichnung'); ?>" />	
-	</div>
-	<div class="wpsg_clear"></div>
-</div>
+<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_prepayment_bezeichnung'), array('help' => 'wpsg_mod_prepayment_bezeichnung')); ?>
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_prepayment_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_prepayment_aktiv'), array('help' => 'wpsg_mod_prepayment_aktiv')); ?>
+
 <?php echo wpsg_drawForm_Textarea('wpsg_mod_prepayment_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_prepayment_hint'), array('help' => 'wpsg_mod_prepayment_hint')); ?>
 <?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_subject', __('Betreff fÃŒr Ãberweisungen', 'wpsg'), $this->get_option('wpsg_mod_prepayment_subject'), array('help' => 'mod_prepayment_subject')); ?>
Index: /views/mods/mod_productgroups/admin_setcapabilities.phtml
===================================================================
--- /views/mods/mod_productgroups/admin_setcapabilities.phtml	(revision 5873)
+++ /views/mods/mod_productgroups/admin_setcapabilities.phtml	(revision 5877)
@@ -9,5 +9,5 @@
 ?>
 <tr>
-	<td class="wpsg_col_capname"><?php echo __('Statistik', 'wpsg'); ?></td>
+	<td class="wpsg_col_capname"><?php echo __('Produktgruppen', 'wpsg'); ?></td>
 	<?php foreach ($arRoles as $role_key => $r) { ?>
 	<td class="wpsg_col_cap">
Index: /views/mods/mod_shs/settings_edit.phtml
===================================================================
--- /views/mods/mod_shs/settings_edit.phtml	(revision 5873)
+++ /views/mods/mod_shs/settings_edit.phtml	(revision 5877)
@@ -37,33 +37,13 @@
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_shs_mwstland'), array('help' => 'wpsg_mod_shs_mwstland')); ?>
 <br />
-<div class="wpsg_form_field">
-	<div class="wpsg_form_left">
-		<label><?php echo __('Formularoptionen', 'wpsg'); ?>:</label>
-	</div>
-	<div class="wpsg_form_right">
-		<label> 
-			<input <?php echo (($this->get_option('wpsg_mod_shs_mobileversion') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_mobileversion" name="wpsg_mod_shs_mobileversion" /><?php echo __('Mobile Version nutzen', 'wpsg'); ?>			
-		</label><br />
-		<label>
-			<input <?php echo (($this->get_option('wpsg_mod_shs_creditcard_cardholder') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_creditcard_cardholder" name="wpsg_mod_shs_creditcard_cardholder" /><?php echo __('Kartenhinhaber ist Pflichtfeld (Nur Kreditkarte)', 'wpsg'); ?>			
-		</label><br />
-		<label>
-			<input <?php echo (($this->get_option('wpsg_mod_shs_creditcard_optionalcardholder') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_creditcard_optionalcardholder" name="wpsg_mod_shs_creditcard_optionalcardholder" /><?php echo __('Kartenhinhaber ist Optional (Nur Kreditkarte)', 'wpsg'); ?>			
-		</label><br />
-		<label>
-			<input <?php echo (($this->get_option('wpsg_mod_shs_creditcard_sslifvisaenrolledu') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_creditcard_sslifvisaenrolledu" name="wpsg_mod_shs_creditcard_sslifvisaenrolledu" /><?php echo __('Bei VISA ohne Autorisierung zahlung erlauben (Nur Kreditkarte / VISA)', 'wpsg'); ?>			
-		</label><br />
-		<label>
-			<input <?php echo (($this->get_option('wpsg_mod_shs_directdebit_accountholder') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_directdebit_accountholder" name="wpsg_mod_shs_directdebit_accountholder" /><?php echo __('Kontoinhaber ist Pflichtfeld (Nur Lastschrift)', 'wpsg'); ?>			
-		</label><br />
-		<label>
-			<input <?php echo (($this->get_option('wpsg_mod_shs_directdebit_optionalaccountholder') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_directdebit_optionalaccountholder" name="wpsg_mod_shs_directdebit_optionalaccountholder" /><?php echo __('Kontoinhaber ist Optional (Nur Lastschrift)', 'wpsg'); ?>			
-		</label><br />
-		<label>
-			<input <?php echo (($this->get_option('wpsg_mod_shs_directdebit_checklist') == '1')?'checked="checked"':''); ?> style="margin-right:5px; margin-top:0px; float:none;" type="checkbox" class="checkbox" value="1" id="wpsg_mod_shs_directdebit_checklist" name="wpsg_mod_shs_directdebit_checklist" /><?php echo __('Sperrlistenabfrage (Nur Lastschrift, muss freigeschaltet sein)', 'wpsg'); ?>			
-		</label>
-	</div>
-	<div class="wpsg_clear"></div>
-</div>
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_mobileversion', __('Mobile Version nutzen', 'wpsg'), $this->get_option('wpsg_mod_shs_mobileversion')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_creditcard_cardholder', __('Kartenhinhaber ist Pflichtfeld (Nur Kreditkarte)', 'wpsg'), $this->get_option('wpsg_mod_shs_creditcard_cardholder')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_creditcard_optionalcardholder', __('Karteninhaber ist Optional (Nur Kreditkarte)', 'wpsg'), $this->get_option('wpsg_mod_shs_creditcard_optionalcardholder')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_creditcard_sslifvisaenrolledu', __('Bei VISA ohne Autorisierung Zahlung erlauben (Nur Kreditkarte / VISA)', 'wpsg'), $this->get_option('wpsg_mod_shs_creditcard_sslifvisaenrolledu')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_directdebit_accountholder', __('Kontoinhaber ist Pflichtfeld (Nur Lastschrift)', 'wpsg'), $this->get_option('wpsg_mod_shs_directdebit_accountholder')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_directdebit_optionalaccountholder', __('Kontoinhaber ist Optional (Nur Lastschrift)', 'wpsg'), $this->get_option('wpsg_mod_shs_directdebit_optionalaccountholder')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_shs_directdebit_checklist', __('Sperrlistenabfrage (Nur Lastschrift, muss freigeschaltet sein)', 'wpsg'), $this->get_option('wpsg_mod_shs_directdebit_checklist')); ?>
+
 <br />
 <?php echo wpsg_drawForm_Select('wpsg_mod_shs_transactiontype', __('Autorisierung', 'wpsg'), array('preauthorization', 'authorization'), $this->get_option('wpsg_mod_shs_transactiontype'), array('help' => 'wpsg_mod_shs_transactiontype')); ?>
Index: /views/mods/mod_statistics/admin_setcapabilities.phtml
===================================================================
--- /views/mods/mod_statistics/admin_setcapabilities.phtml	(revision 5873)
+++ /views/mods/mod_statistics/admin_setcapabilities.phtml	(revision 5877)
@@ -13,5 +13,5 @@
 	<td class="wpsg_col_cap">
 		<input type="hidden" name="wpsg_cap[<?php echo $role_key; ?>][wpsg_statistics]" value="0" />
-		<input type="checkbox" <?php echo (($r['capabilities']['wpsg_statistics'] == "1")?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_statistics]" value="1" /> 
+		<input type="checkbox" <?php echo ((isset($r['capabilities']['wpsg_statistics']))?'checked="checked"':''); ?> name="wpsg_cap[<?php echo $role_key; ?>][wpsg_statistics]" value="1" /> 
 	</td>
 	<?php } ?>
Index: /views/mods/mod_su/settings_edit.phtml
===================================================================
--- /views/mods/mod_su/settings_edit.phtml	(revision 5873)
+++ /views/mods/mod_su/settings_edit.phtml	(revision 5877)
@@ -56,13 +56,7 @@
 <?php echo wpsg_drawForm_Select('wpsg_mod_su_language', __('Sprache bei SofortÃŒberweisung.de', 'wpsg'), array('DE' => __('deutsch', 'wpsg'), 'EN' => __('englisch', 'wpsg'), 'FR' => __('franzÃ¶sisch', 'wpsg'), 'NL' => __('niederlÃ€ndisch', 'wpsg')), $this->get_option('wpsg_mod_su_language'), array('help' => 'wpsg_mod_su_language')); ?>
 <?php echo wpsg_drawForm_Select('wpsg_mod_su_hash', __('Verwendetes HASH Verfahren', 'wpsg'), array('md5' => 'MD5', 'sha1' => 'SHA1', 'sha256' => 'SHA256', 'sha512' => 'SHA512'), $this->get_option('wpsg_mod_su_hash'), array('help' => 'wpsg_mod_su_hash')); ?>
-<div class="wpsg_form_field">
-	<div class="wpsg_form_left">
-		<label for="wpsg_mod_su_confirmurl"><?php echo __('URL fÃŒr HTTP Benachrichtigung', 'wpsg'); ?>:</label>
-	</div>
-	<div class="wpsg_form_right">
-		<input id="wpsg_mod_su_confirmurl" type="text" class="text" name="" value="<?php echo wpsg_hspc($this->view['wpsg_mod_su_confirmurl']); ?>" />		
-	</div>
-	<div class="wpsg_clear"></div>
-</div>
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_su_confirmurl', __('URL fÃŒr HTTP Benachrichtigung', 'wpsg'), wpsg_hspc($this->view['wpsg_mod_su_confirmurl']), array('help' => 'wpsg_mod_su_confirmurl', 'readonly' => true)); ?>
+
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_su_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_su_autostart')); ?>
 
Index: /views/mods/mod_targo/order_done.phtml
===================================================================
--- /views/mods/mod_targo/order_done.phtml	(revision 5873)
+++ /views/mods/mod_targo/order_done.phtml	(revision 5877)
@@ -1,14 +1,21 @@
 <?php
 
-/**
- * Dieses Template wird nach einer Targo Zahlung angezeigt
-*/
+	/**
+ 	* Dieses Template wird nach einer Targo Zahlung angezeigt
+	*/
 
-$url = $this->get_option('wpsg_mod_targo_url');
+	if ($this->get_option('wpsg_mod_targo_url_use') == 0)
+	{
+		$url = $this->get_option('wpsg_mod_targo_url_test');
+	}
+	else
+	{
+		$url = $this->get_option('wpsg_mod_targo_url_live');
+	}
 ?>
 
 <p><?php echo __('Um den Betrag mit Targo zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p> 
 <p>
-	<a title="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" href="<?php echo $this->get_option('wpsg_mod_targo_url'); ?>">
+	<a title="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" href="<?php echo $url; ?>">
 		<img src="<?php echo $this->getRessourceURL('gfx/targologo.png'); ?>" align="left" alt="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" style="margin-right:7px;">
 	 
@@ -16,5 +23,5 @@
 </p>
 
-<form hidden class="wpsg_productform" id="wpsg_produktform" method="post" action="<?php echo $this->get_option('wpsg_mod_targo_url'); ?>">
+<form hidden class="wpsg_productform" id="wpsg_produktform" method="post" action="<?php echo $url ?>">
 <?php $o_id = $this->view['o_id'];
 	  $k_id = $this->view['k_id'];
@@ -83,6 +90,5 @@
 	jQuery(document).ready(function() { 
 		window.setTimeout(function() {
-    		//location.href = "<?php echo $this->view['targoLink']; ?>";
-			location.href = "<?php echo $this->get_option('wpsg_mod_targo_url');?>";
+			location.href = "<?php echo $url;?>";
 		}, 1000);
 	} );
Index: /views/mods/mod_targo/order_view_afterpayment.phtml
===================================================================
--- /views/mods/mod_targo/order_view_afterpayment.phtml	(revision 5873)
+++ /views/mods/mod_targo/order_view_afterpayment.phtml	(revision 5877)
@@ -2,17 +2,17 @@
 
 	/**
-	 * Template fÃŒr die Integration der PayPal Zahlungsart in die Bestellverwaltung
+	 * Template fÃŒr die Integration der Targo Zahlungsart in die Bestellverwaltung
 	 */
 
 ?>
 
-<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentid'))) { ?>
+<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_targo_paymentid'))) { ?>
 	
 	<div class="wpsg_form_field ">
 		<div class="wpsg_form_left">
-			<label for=""><?php echo __('PaymentID', 'wpsg'); ?>: [<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_paypal&do=refresh&edit_id=<?php echo $this->view['oOrder']->id; ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
+			<label for=""><?php echo __('PaymentID', 'wpsg'); ?>: [<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_targo&do=refresh&edit_id=<?php echo $this->view['oOrder']->id; ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
 		</div>
 		<div class="wpsg_form_right">
-			<p class="" id=""><?php echo wpsg_translate(__('#1# (#2#)', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentid'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_paymentstate')); ?></p>
+			<p class="" id=""><?php echo wpsg_translate(__('#1#', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_targo_paymentid')); ?></p>
 		</div>
 		<div class="wpsg_clear"></div>
@@ -20,8 +20,2 @@
 		
 <?php } ?>
-
-<?php if (wpsg_isSizedString($this->view['oOrder']->getMeta('wpsg_mod_paypal_saleid'))) { ?>
-
-	<?php echo wpsg_drawForm_Input('', __('SaleID', 'wpsg'), $this->view['oOrder']->getMeta('wpsg_mod_paypal_saleid'), array('text' => true)); ?>
-		
-<?php } ?>
Index: /views/mods/mod_targo/settings_edit.phtml
===================================================================
--- /views/mods/mod_targo/settings_edit.phtml	(revision 5873)
+++ /views/mods/mod_targo/settings_edit.phtml	(revision 5877)
@@ -12,4 +12,7 @@
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_targo_aktiv'), array('help' => 'wpsg_mod_targo_activ')); ?>
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_autostart', __('Autostart', 'wpsg'), $this->get_option('wpsg_mod_targo_autostart'), array('help' => 'wpsg_mod_targo_autostart')); ?>
+
+<br />
+
 <?php echo wpsg_drawForm_Input('wpsg_mod_targo_summe_min', __('Mindestfinanzierungssumme', 'wpsg'), $this->get_option('wpsg_mod_targo_summe_min'), array('help' => 'wpsg_mod_targo_summe_min')); ?>
 <?php echo wpsg_drawForm_Input('wpsg_mod_targo_summe_max', __('Maximale Finanzierungssumme', 'wpsg'), $this->get_option('wpsg_mod_targo_summe_max'), array('help' => 'wpsg_mod_targo_summe_max')); ?>
@@ -17,39 +20,18 @@
 <?php echo wpsg_drawForm_Input('wpsg_mod_targo_laufzeit_max', __('Maximale Laufzeit (Monate)', 'wpsg'), $this->get_option('wpsg_mod_targo_laufzeit_max'), array('help' => 'wpsg_mod_targo_laufzeit_max')); ?>
 <?php echo wpsg_drawForm_Input('wpsg_mod_targo_rate_min', __('Mindestrate', 'wpsg'), $this->get_option('wpsg_mod_targo_rate_min'), array('help' => 'wpsg_mod_targo_rate_min')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_targo_url', __('Targo-URL', 'wpsg'), $this->get_option('wpsg_mod_targo_url'), array('help' => 'wpsg_mod_targo_url')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_url_test', __('Targo-URL-Testsystem', 'wpsg'), $this->get_option('wpsg_mod_targo_url_test'), array('help' => 'wpsg_mod_targo_url_test')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_targo_url_live', __('Targo-URL-Livesystem', 'wpsg'), $this->get_option('wpsg_mod_targo_url_live'), array('help' => 'wpsg_mod_targo_url_live')); ?>
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_url_use', __('Targo-URL-Livesystem benutzen', 'wpsg'), $this->get_option('wpsg_mod_targo_url_use'), array('help' => 'wpsg_mod_targo_url_use')); ?>
 <?php echo wpsg_drawForm_Input('wpsg_mod_targo_koop_id', __('Targo-Koop-ID', 'wpsg'), $this->get_option('wpsg_mod_targo_koop_id'), array('help' => 'wpsg_mod_targo_koop_id')); ?>
 <?php echo wpsg_drawForm_Input('wpsg_mod_targo_dealerid', __('Targo-Dealer-ID', 'wpsg'), $this->get_option('wpsg_mod_targo_dealerid'), array('help' => 'wpsg_mod_targo_dealerid')); ?>
 <?php echo wpsg_drawForm_Input('wpsg_mod_targo_hashkey', __('Targo-Hash-Key', 'wpsg'), $this->get_option('wpsg_mod_targo_hashkey'), array('help' => 'wpsg_mod_targo_hashkey')); ?>
 
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_createwebhook',  __('Beim speichern versuchen den WebHook anzumelden.', 'wpsg'), 0, array('labelright' => true, 'noDoubleDot' => true, 'help' => 'wpsg_mod_targo_createwebhook')); ?>
+<br />
+
 <?php echo wpsg_drawForm_Input('wpsg_mod_targo_gebuehr', __('GebÃŒhr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_targo_gebuehr'), true), array('help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %')); ?>
 <?php echo wpsg_drawForm_Select('wpsg_mod_targo_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_targo_mwst'), array('help' => 'wpsg_shippay_mwst')); ?>
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_targo_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_targo_mwstland'), array('help' => 'wpsg_shippay_mwstland')); ?>
-
-<?php echo wpsg_drawForm_Select('wpsg_mod_targo_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_targo_success'), array('help' => 'wpsg_mod_targo_success')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_targo_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_targo_error'), array('help' => 'wpsg_mod_targo_error')); ?>
-
-<br />
-
-<div class="wpsg_mod_targo_mode_layer wpsg_mod_targo_mode_1">
-	
-</div>
-
-<script type="text/javascript">/* <![CDATA[ */
-
-	jQuery(document).ready(function() {
- 
-		jQuery('#wpsg_mod_targo_mode').bind('change', function() {
-
-			jQuery('.wpsg_mod_targo_mode_layer').hide();
-			jQuery('.wpsg_mod_targo_mode_' + jQuery(this).val()).show();
-			
-		}).change();
-
-		
-	});
-
-/* ]]> */</script>
-
-
-<br />
+  
Index: /views/mods/mod_videodownload/settings_edit.phtml
===================================================================
--- /views/mods/mod_videodownload/settings_edit.phtml	(revision 5873)
+++ /views/mods/mod_videodownload/settings_edit.phtml	(revision 5877)
@@ -8,15 +8,14 @@
 <br />
 <div class="wpsg_admin_box" id="wpsg_tab">	
-	<div class="head">
-		<div class="title">
-			<div class="tab" id="tab1"><?php echo __('Einstellungen', 'wpsg'); ?></div>
-			<div class="tab" id="tab2"><?php echo __('Textfelder', 'wpsg'); ?></div>
-			<div class="tab tabright tabright-last" id="tab3"><?php echo __('Info', 'wpsg'); ?></div>
-			<div class="wpsg_clear"></div>
-		</div>
-	</div>
-	<div class="content">
+    <ul class="nav nav-tabs" role="tablist">
+        <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Einstellungen', 'wpsg'); ?></a></li>
+        <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Textfelder', 'wpsg'); ?></a></li>
+        <li role="presentation"><a href="#tab3" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Info', 'wpsg'); ?></a></li>
+    </ul>
+
+
+	<div class="tab-content">
 		
-		<div id="tabcontent1" class="tabcontent">			
+		<div role="tabpanel" class="tab-pane active" id="tab1" >			
 			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_command', __('Programmaufruf', 'wpsg'), $this->get_option('wpsg_mod_videodownload_command'), array('help' => 'mod_videodownload_einstellungen_programmaufruf')); ?>
 			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_infocommand', __('Programmaufruf (ffmpeg -i)', 'wpsg'), $this->get_option('wpsg_mod_videodownload_infocommand'), array('help' => 'mod_videodownload_einstellungen_programminfoaufruf')); ?>		
@@ -63,5 +62,5 @@
 		</div>
 		
-		<div id="tabcontent2" class="tabcontent">
+		<div role="tabpanel" class="tab-pane" id="tab2" >
 		
 			<table class="wpsg_mod_videodownload_fieldtable">
@@ -69,8 +68,8 @@
 					<th class="col_bezeichnung"></th>
 					<th class="col_font"><?php echo __('Schriftart', 'wpsg'); ?></th>
-					<th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
-					<th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
+					<th class="col_x"><?php echo __(' X', 'wpsg'); ?></th>
+					<th class="col_y"><?php echo __(' Y', 'wpsg'); ?></th>
 					<th class="col_align"><?php echo __('Zentriert', 'wpsg'); ?></th>
-					<th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
+					<th class="col_color"><?php echo __(' Farbe', 'wpsg'); ?></th>
 					<th class="col_alpha"><?php echo __('Opaque', 'wpsg'); ?></th>
 					<th class="col_angle"><?php echo __('Winkel', 'wpsg'); ?></th>
@@ -144,5 +143,5 @@
 		</div>
 		
-		<div id="tabcontent3" class="tabcontent">
+		<div role="tabpanel" class="tab-pane" id="tab3" >
 		
 			<p><?php echo __('Mit dem Videodownload Modul ist es mÃ¶glich Videos zu verkaufen die pro Bestellung individuell angepasst werden.', 'wpsg'); ?>
Index: /views/mods/mod_voucherproduct/settings_edit.phtml
===================================================================
--- /views/mods/mod_voucherproduct/settings_edit.phtml	(revision 5873)
+++ /views/mods/mod_voucherproduct/settings_edit.phtml	(revision 5877)
@@ -9,15 +9,14 @@
 <p class="wpsg_error"><?php echo __('Bitte aktivieren Sie das Gutscheinmodul, damit dieses Modul korrekt funktioniert!', 'wpsg'); ?></p>
 <?php } ?>
-<div class="wpsg_admin_box" id="wpsg_tab">	
-	<div class="head">
-		<div class="title">
-			<div class="tab" id="tab1"><?php echo __('Einstellungen', 'wpsg'); ?></div>
-			<div class="tab" id="tab2"><?php echo __('Textfelder', 'wpsg'); ?></div>
-			<div class="wpsg_clear"></div>
-		</div>
-	</div>
-	<div class="content">
+
+<div class="wpsg_admin_box" id="wpsg_tab">
+    <ul class="nav nav-tabs" role="tablist">
+        <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Einstellungen', 'wpsg'); ?></a></li>
+        <li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Textfelder', 'wpsg'); ?></a></li>
+    </ul>
+	
+	<div class="tab-content">
 		
-		<div id="tabcontent1" class="tabcontent">	
+		<div role="tabpanel" class="tab-pane active" id="tab1" >	
 			<div class="wpsg_form_field">
 				<div class="wpsg_form_left">
@@ -55,6 +54,6 @@
 		</div>
 		
-		<div id="tabcontent2" class="tabcontent">
-			<table class="wpsg_mod_downloadplus_fieldtable">
+		<div role="tabpanel" class="tab-pane" id="tab2" >
+			<table class="wpsg_mod_voucher_fieldtable">
 				<tr>
 					<th class="col_bezeichnung"></th>					
