Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 7065)
+++ /lib/wpsg_basket.class.php	(revision 7066)
@@ -1641,5 +1641,5 @@
 
 			} // foreach Produkte
-
+ 
 			// Die Basis der Preisberechnung, wenn Brutto, dann wird Netto berechnet
 			if ($this->shop->getFrontendTaxview() == WPSG_NETTO)
@@ -1771,5 +1771,5 @@
 				$arReturn['sum']['preis_shipping_brutto'] = $order_data['price_shipping_brutto'];
 				$arReturn['sum']['preis_shipping_netto'] = $order_data['price_shipping_netto'];
-
+ 
 				/*
 
@@ -1798,5 +1798,5 @@
 			else
 			{
-
+                 
 				// Bin mir nicht sicher warum die Versandkosten/Zahlungskosten im Checkout nicht berechnet wurde
 				// Aufgrund von PayPal (PayPal Plus) brauch ich sie aber
@@ -1910,5 +1910,5 @@
 						unset($arReturn['shipping']['mwst']);
 						$arReturn['shipping']['tax_rata'] = true;
-
+                       
 					}
 					else
@@ -1918,5 +1918,5 @@
 
 					}
-
+ 
 					$this->shop->callMods('calcPayment', array(&$arReturn));
 
@@ -1977,11 +1977,11 @@
 					unset($arReturn['sum']['preis_shipping_brutto']);
 
-					$id = $this->arOrder['type_payment'];
-					$tax_keyp = $this->shop->arPayment[$id]['mwst_key'];
+                    $id = $arReturn['checkout']['payment'];
+					$tax_keyp = $this->shop->arPayment[$id]['mwst'];
 					$mb->setPaymentKosten($arReturn, $pricep, $tax_keyp);
 					$taxp = $arReturn['payment']['mwst'];
 
-					$id = $this->arOrder['type_shipping'];
-					$tax_keys = $this->shop->arShipping[$id]['mwst_key'];
+					$id = $arReturn['checkout']['shipping'];
+					$tax_keys = $this->shop->arShipping[$id]['mwst'];
 					$mb->setShippingKosten($arReturn, 'x', $prices, $tax_keys);
 					$taxs = $arReturn['shipping']['mwst'];
@@ -2039,12 +2039,12 @@
 					unset($arReturn['sum']['preis_shipping_netto']);
 					unset($arReturn['sum']['preis_shipping_brutto']);
-
-					$id = $this->arOrder['type_payment'];
-					$tax_keyp = $this->shop->arPayment[$id]['mwst_key'];
+ 
+					$id = $arReturn['checkout']['payment']; 
+					$tax_keyp = $this->shop->arPayment[$id]['mwst']; 
 					$mb->setPaymentKosten($arReturn, $pricep, $tax_keyp);
 					$taxp = $arReturn['payment']['mwst'];
 
-					$id = $this->arOrder['type_shipping'];
-					$tax_keys = wpsg_getStr($this->shop->arShipping[$id]['mwst_key']);
+                    $id = $arReturn['checkout']['shipping'];
+					$tax_keys = wpsg_getStr($this->shop->arShipping[$id]['mwst']);
 					$mb->setShippingKosten($arReturn, 'x', $prices, $tax_keys);
 					$taxs = $arReturn['shipping']['mwst'];
Index: /mods/wpsg_mod_paypalapi.class.php
===================================================================
--- /mods/wpsg_mod_paypalapi.class.php	(revision 7065)
+++ /mods/wpsg_mod_paypalapi.class.php	(revision 7066)
@@ -95,5 +95,5 @@
 			$this->shop->update_option('wpsg_mod_paypalapi_webhook_logfile', $_REQUEST['wpsg_mod_paypalapi_webhook_logfile']);
 			
-			$this->shop->update_option('wpsg_mod_paypalapi_gebuehr', $_REQUEST['wpsg_mod_paypalapi_gebuehr']);
+			$this->shop->update_option('wpsg_mod_paypalapi_gebuehr', wpsg_tf($_REQUEST['wpsg_mod_paypalapi_gebuehr']));
 			$this->shop->update_option('wpsg_mod_paypalapi_mwst', $_REQUEST['wpsg_mod_paypalapi_mwst']);
 			$this->shop->update_option('wpsg_mod_paypalapi_mwstland', $_REQUEST['wpsg_mod_paypalapi_mwstland']);
@@ -247,13 +247,13 @@
 		public function calcPayment(&$arBasket)
 		{
-				
+		    
 			if ($this->id == $arBasket['checkout']['payment'])
 			{
-		
+                
 				$payment_price = $this->getPreis($this->shop->get_option('wpsg_mod_paypalapi_gebuehr'), $arBasket['sum']['preis']);
 		
 				if ($this->shop->get_option('wpsg_mod_paypalapi_mwstland') == '1' && $arBasket['noMwSt'])
 				{
-						
+                    
 					// Keine MwSt. berechnen !
 					$arBasket['sum']['preis_payment'] = $payment_price;
@@ -269,7 +269,7 @@
 				else
 				{
-						
+                    
 					// MwSt berechnen (Angaben im Backend sind immer Brutto)
-					$this->setPaymentKosten($arBasket, $payment_price, $this->shop->get_option('wpsg_mod_paypalapi_mwstland'));
+					$this->setPaymentKosten($arBasket, $payment_price, $this->shop->get_option('wpsg_mod_paypalapi_mwst'));
 		
 				}
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 7065)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 7066)
@@ -846,5 +846,5 @@
 		public function writeRechnung($order_id, $preview, $bOutput = true)
 		{
-			
+             
 			// PrÃŒfen ob schon eine Rechnung zu dieser Bestellung existiert und eventuell Fehler werfen
 			if (!$preview)
@@ -861,5 +861,5 @@
 				
 			}
-			
+            
 			$this->shop->view['output'] = $bOutput;
 			
@@ -883,11 +883,11 @@
 			////if (!is_array($custom_data['basket']))
 			{
-				
+                
 				$basket = new wpsg_basket();
 				$basket->initFromDB($order_id, true);
 				$this->shop->view['basket'] = $basket->toArray(true);
-				
-			}
-			
+                	
+			}
+            
 			//wpsg_debug($this->shop->view['basket']);die();
 			
@@ -895,6 +895,6 @@
 			$this->shop->view['data']['shipping_land'] = $this->db->fetchRow("SELECT L.* FROM `".WPSG_TBL_LAND."` AS L WHERE L.`id` = '".wpsg_q($this->shop->view['data']['shipping_land'])."'");
 			$this->shop->view['rDatum'] = $_REQUEST['wpsg_rechnungen_datum'];
-			$this->shop->view['title'] = __('Rechnung', 'wpsg');			
-
+			$this->shop->view['title'] = __('Rechnung', 'wpsg');
+            
 			if ($this->shop->hasMod('wpsg_mod_shippingadress') && $this->shop->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', 
 					array('k_id' => $this->shop->view['data']['k_id'], 'o_id' => $this->shop->view['data']['id'])))
@@ -928,5 +928,5 @@
 				$this->shop->view['faelligkeitdatum'] = $_REQUEST['wpsg_rechnungen_faelligkeitsdatum'];
 			}
-									
+            				
 			// Beschreibung dazuladen
 			foreach ($this->shop->view['basket']['produkte'] as $k => $v)
@@ -978,5 +978,5 @@
 							
 			$rnr = $this->shop->replaceUniversalPlatzhalter($rnr, $order_id);
-			
+            
 			if ($preview)
 			{
Index: /views/mods/mod_paypalapi/settings_edit.phtml
===================================================================
--- /views/mods/mod_paypalapi/settings_edit.phtml	(revision 7065)
+++ /views/mods/mod_paypalapi/settings_edit.phtml	(revision 7066)
@@ -35,5 +35,5 @@
 <br />
 
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_gebuehr', __('GebÃŒhr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_paypalapi_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
+<?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')); ?>
