'LOIN/User/Signon', 'signoff' => 'LOIN/User/Signoff', ]; /** * Singin and return User Session ID * @return string UserSessionID * @throws InnocadLoyaltyException */ public static function signin() { $params = [ 'UserName' => Config::getUsername(), 'Password' => Config::getPassword(), //'SessionStay' => 1, ]; $result = self::get(self::$endpoint['signon'], $params); if ("0" !== $result['LOINUserSignin']['Status']) { throw new InnocadLoyaltyException($result['LOINUserSignin']['UserMessage'], $result['LOINUserSignin']['Status']); } return $result['LOINUserSignin']['UserSessionID']; } public static function signout($userSessionID) { $params = [ 'UserSessionID' => $userSessionID, ]; $result = self::put(self::$endpoint['signoff'], $params); if ("0" !== $result['LOINUserSignoff']['Status']) { throw new InnocadLoyaltyException($result['LOINUserSignoff']['UserMessage'], $result['LOINUserSignoff']['Status']); } return $result['LOINUserSignoff']; } }