Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 6435)
+++ /lib/functions.inc.php	(revision 6437)
@@ -1107,6 +1107,16 @@
 	} // function wpsg_isTrue(&$val)
 	
+	function wpsg_explodeName($val)
+	{
+		
+		$arWords = explode(' ', $val);
+		
+		return array($arWords[0], implode(' ', array_slice($arWords, 1)));
+		
+	}
+
 	/**
 	 * PrÃŒft ob eine Varible ein String ist und die LÃ€nge > 0 ist
+	 * Gibt auch bei (int)"1" true zurÃŒck (!!!!!)
 	 */
 	function wpsg_isSizedString(&$strValue, $value = false)
@@ -1117,5 +1127,5 @@
 		$isset = true;		
 		if (!isset($strValue)) return false;
-		if (gettype($strValue) != 'string') return false;
+		//if (gettype($strValue) != 'string') return false;
 		
 		if (strlen($strValue) <= 0) $isset = false;
Index: /model/wpsg_country.class.php
===================================================================
--- /model/wpsg_country.class.php	(revision 6435)
+++ /model/wpsg_country.class.php	(revision 6437)
@@ -118,4 +118,14 @@
 		} // public static function find($arFilter = array())
 		
+		public static function getCountryIDFromCode($code)
+		{
+			
+			$id = $GLOBALS['wpsg_db']->fetchOne("SELECT `id` FROM `".WPSG_TBL_LAND."` WHERE LOWER(`kuerzel`) = LOWER('".wpsg_q($code)."') ");
+			
+			if (wpsg_isSizedInt($id)) return $id;
+			else return false;
+			
+		} // public static function getCountryIDFromCode($code)
+		
 	} // class wpsg_country extends wpsg_model 
 
Index: /mods/wpsg_mod_amazon.class.php
===================================================================
--- /mods/wpsg_mod_amazon.class.php	(revision 6435)
+++ /mods/wpsg_mod_amazon.class.php	(revision 6437)
@@ -89,4 +89,5 @@
 			$this->shop->view['wpsg_mod_amazon']['redirectURL'] = $this->shop->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_amazon', 'return');
 			$this->shop->view['wpsg_mod_amazon']['logoutURL'] = $this->shop->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_amazon', 'logout');
+			
 			$this->shop->view['wpsg_mod_amazon']['amazon_last_authorization_reference_id'] = $oOrder->getMeta('amazon_last_authorization_reference_id');
 		
@@ -238,5 +239,5 @@
 			if (wpsg_isSizedString($_REQUEST['amazon']['OrderReference']))
 			{
-									
+		 					
 				$oOrder = wpsg_order::getInstance($_SESSION['wpsg']['order_id']);
 							 	
@@ -244,9 +245,9 @@
 												
 				$res = $this->api_getPayment($_SESSION['wpsg']['order_id']);
-				 						 
+				 			 		 
 				$res = $res['GetOrderReferenceDetailsResult']['OrderReferenceDetails'];
 				
 				list($vname, $name) = wpsg_explodeName($res['Destination']['PhysicalDestination']['Name']);
-				 					
+					
 				if (wpsg_isSizedString($res['Buyer']['Email']) && !wpsg_isSizedString($_SESSION['wpsg']['checkout']['email']))
 				{
@@ -262,5 +263,5 @@
 				if (wpsg_isSizedArray($res['Destination']['PhysicalDestination']))
 				{
-				
+			 
 					if (!wpsg_isSizedString($_SESSION['wpsg']['checkout']['vname'])) $_SESSION['wpsg']['checkout']['vname'] = $vname;
 					if (!wpsg_isSizedString($_SESSION['wpsg']['checkout']['name'])) $_SESSION['wpsg']['checkout']['name'] = $name;
@@ -590,5 +591,5 @@
 			$_SESSION['wpsg']['checkout']['email'] = $d->email;
 			$_SESSION['wpsg']['checkout']['email2'] = $d->email;
-			
+			 
 			$this->shop->redirect($this->shop->getUrl(wpsg_ShopController::URL_BASKET, false, false, array(), false, 'LoginWithAmazon'));
 						
