Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 7873)
+++ /lib/wpsg_basket.class.php	(revision 7874)
@@ -364,6 +364,5 @@
 		 * Initiiert den Basket aus der Datenbank
 		 */
-		public function initFromDB($o_id, $backend = false)
-		{
+		public function initFromDB($o_id, $backend = false) {
 			
 			$order = $this->db->fetchRow("
@@ -385,5 +384,6 @@
 					K.`id` = '".wpsg_q($order['k_id'])."'
 			");
-			 
+
+			$this->oCalculation = null;
 			$this->arCheckout = array(
 				'firma' => $kunde['firma'],
Index: /mods/wpsg_mod_paypalapi.class.php
===================================================================
--- /mods/wpsg_mod_paypalapi.class.php	(revision 7873)
+++ /mods/wpsg_mod_paypalapi.class.php	(revision 7874)
@@ -504,12 +504,12 @@
 		public function order_done(&$order_id, &$done_view) {
 
+			$oOrder = wpsg_order::getInstance($order_id);
+
 			// Bestellungen mit 0 geben nix aus
-			if ($done_view['basket']['sum']['preis_gesamt_brutto'] <= 0) return;
-			
-			$oOrder = wpsg_order::getInstance($order_id);
-			
+			if ($oOrder->getToPay(WPSG_BRUTTO) <= 0) return;
+
 			// Bestellungen die nicht mit PayPal API beglichen werden sollen ignorieren
 			if ($oOrder->getPaymentID() != $this->id) return;
-			
+
 			$wpsg_mod_paypalapi_paymentid = $oOrder->getMeta('wpsg_mod_paypalapi_paymentid');
 
@@ -781,5 +781,5 @@
 				
 				$log_JsonData = json_decode($bodyReceived, true);
-				$log_paymentID = $log_JsonData['resource']['parent_payment'];
+				$log_paymentID = $log_JsonData['resource']['id'];
 				$log_orderID = $this->db->fetchOne("SELECT `target_id` FROM `".WPSG_TBL_META."` WHERE `meta_table` = 'WPSG_TBL_ORDER' AND `meta_key` = 'wpsg_mod_paypalapi_paymentid' AND `meta_value` = '".wpsg_q($log_paymentID)."' ");
 					
@@ -1297,5 +1297,5 @@
 			
 			$json_data = $this->api_call('v1/payments/payment/'.$payment_id.'/execute', $post_data, $this->api_getAccessToken());
-			
+
 			return $json_data;
 			
Index: /views/mods/mod_paypal/settings_edit.phtml
===================================================================
--- /views/mods/mod_paypal/settings_edit.phtml	(revision 7873)
+++ /views/mods/mod_paypal/settings_edit.phtml	(revision 7874)
@@ -13,6 +13,6 @@
 <br />
 	
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypal_clientid'), array('hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'), 'help' => 'wpsg_mod_paypal_clientid')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypal_secret'), array('hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'), 'help' => 'wpsg_mod_paypal_secret')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypal_clientid'), array('hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'), 'help' => 'wpsg_mod_paypal_clientid')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypal_secret'), array('hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'), 'help' => 'wpsg_mod_paypal_secret')); ?>
 		
 <div class="wpsg_form_field ">
Index: /views/mods/mod_paypalapi/settings_edit.phtml
===================================================================
--- /views/mods/mod_paypalapi/settings_edit.phtml	(revision 7873)
+++ /views/mods/mod_paypalapi/settings_edit.phtml	(revision 7874)
@@ -8,6 +8,6 @@
 
 <?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_version', __('API Version', 'wpsg'), ['v1' => 'V1', 'v2' => 'V2'], $this->get_option('wpsg_mod_paypalapi_version'), []); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid', 'hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret', 'hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_clientid', __('Client ID', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid', 'hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_secret', __('Secret', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret', 'hint' => wpsg_translate(__('Erhalten Sie im <a target="_blank" href="#1#">PayPal Developer Interface</a>.', 'wpsg'), 'https://developer.paypal.com/'))); ?>
 <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_sandbox', __('Sandbox', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
 
