PPPPPPP 1 місяць тому
батько
коміт
ee6009a90d

+ 185 - 183
app/Http/Controllers/Game/IgtSimController.php

@@ -21,14 +21,13 @@ class IgtSimController extends Controller
     public function __construct()
     {
     }
-    public $gameConfig=[];
+
+    public $gameConfig = [];
+
     public function gameLunch(Request $request)
     {
         $softwareId = $request->input('softwareid', '200-1551-001');
-        $user = $request->user();
-        if (!$user) {
-            return response('Unauthorized', 401);
-        }
+
 
         return $this->renderGateway($request, $softwareId);
     }
@@ -60,43 +59,43 @@ class IgtSimController extends Controller
 
     private function renderGateway(Request $request, string $softwareId)
     {
-        if(!strstr($softwareId,'-')){
-            $softwareId=substr($softwareId,0,3).'-'.substr($softwareId,3,4).'-'.substr($softwareId,7,3);
+        if (!strstr($softwareId, '-')) {
+            $softwareId = substr($softwareId, 0, 3) . '-' . substr($softwareId, 3, 4) . '-' . substr($softwareId, 7, 3);
         }
         $gid = $request->input('gid');
-        $level = $request->input('level',0);
+        $level = $request->input('level', 0);
         $user = $request->user();
 
         if (!$user) {
 
             $userid = $request->UserID;
 
-            if(!$userid){
-                $token=$request->deviceInfoString;
-                $session=json_decode(Redis::get($token),true);
-                $userid=$session['UserID'];
-                if($session['GlobalUID']){
-                    $GlobalUID=$session['GlobalUID'];
+            if (!$userid) {
+                $token = $request->deviceInfoString;
+                $session = json_decode(Redis::get($token), true);
+                $userid = $session['UserID'];
+                if ($session['GlobalUID']) {
+                    $GlobalUID = $session['GlobalUID'];
                 }
-            }else{
-                $GlobalUID = 'a1b1c1-b53b-'.ServerService::GetLocalSign().'-' . $userid;
+            } else {
+                $GlobalUID = 'a1b1c1-b53b-' . ServerService::GetLocalSign() . '-' . $userid;
             }
 
-            $user=GlobalUserInfo::getGameUserInfo('UserID',$userid);
-            if(!$user){
-                $user=AccountsInfo::find($userid);
+            $user = GlobalUserInfo::getGameUserInfo('UserID', $userid);
+            if (!$user) {
+                $user = AccountsInfo::find($userid);
             }
 
-        }else{
+        } else {
             $GlobalUID = $user->GlobalUID;
             $userid = $user->UserID;
 
         }
-        $lang = GlobalUserInfo::getLocaleByUserID($userid,$request->input('language', env('DEFAULT_LOCALE', 'en')));
+        $lang = GlobalUserInfo::getLocaleByUserID($userid, $request->input('language', env('DEFAULT_LOCALE', 'en')));
 
 
         $gamecard = GameCard::where('gid', $gid)->where('brand', 'IGT')->first();
-        if($gamecard){
+        if ($gamecard) {
             $gamecard->increment('play_num', 1);
             LogGamecardClick::recordClick($gamecard->id, $userid);
 
@@ -104,8 +103,6 @@ class IgtSimController extends Controller
         }
 
 
-
-
         $data = ['UserID' => ServerService::GlobalToUserID($GlobalUID)];
 
 
@@ -113,24 +110,21 @@ class IgtSimController extends Controller
         $CurrencySymbol = env("CONFIG_24680_DOLLAR", "$");
 
 
-
         $data['currency'] = $Currency;
         $data['dollar'] = $CurrencySymbol;
 
 
-        if(!is_array($user))$user=$user->toArray();
+        if (!is_array($user)) $user = $user->toArray();
 
         $data = array_merge($data, $user);
 
         $session = $data;
 
 
-        $token = md5($GlobalUID.'|'.microtime());
+        $token = md5($GlobalUID . '|' . microtime());
         Redis::setex($token, 7200, json_encode($session));
 
 
-
-
         $global = IgtData::$global;
         $games = json_decode(file_get_contents(base_path('app/Game/Config/IGTgamesConfig.json')), true);
 
@@ -139,7 +133,7 @@ class IgtSimController extends Controller
             http_response_code(500);
         }
         $game = $games[$softwareId];
-        $this->gameConfig=$game;
+        $this->gameConfig = $game;
         $lang = in_array($lang, $global['languages']) ? $lang : 'en';
 
         $ua = $request->header('User-Agent', '');
@@ -153,44 +147,45 @@ class IgtSimController extends Controller
         $gamePath = $game['gamePath'];
         $requireVersion = $global['requireVersion'];
 
+        $denomamount = $game['denomamount'] ?? IgtData::$global['denomamount'];
         $paramGet = [
-            'skincode' => $request->input('skincode', 'MKW'),
-            'ipaddress' => $request->ip(),
-            'forcelat' => $request->input('forcelat', ''),
-            'minbet' => $request->input('minbet', $game['minbet']),
-            'deviceInfoString' => $request->input('deviceInfoString', $token),
-            'forcelocationstatus' => $request->input('forcelocationstatus', '0'),
-            'countrycode' => $request->input('countrycode', 'US'),
-            'channel' => $request->input('channel', $isMobile ? 'MOB' : 'INT'),
-            'nscode' => $request->input('nscode', 'AGLC'),
-            'language' => $lang,
-            'technology' => $request->input('technology', 'HTML'),
-            'loadskin' => $request->input('loadskin', 'IGT'),
-            'forcelng' => $request->input('forcelng', ''),
-            'currencycode' => $request->input('currencycode', 'FPY'),
-            'securetoken' => $request->input('securetoken', 'RGS-DEMO04.SKB'),
-            'softwareid' => $softwareId,
+            'skincode'             => $request->input('skincode', 'MKW'),
+            'ipaddress'            => $request->ip(),
+            'forcelat'             => $request->input('forcelat', ''),
+            'minbet'               => $request->input('minbet', $game['minbet']),
+            'deviceInfoString'     => $request->input('deviceInfoString', $token),
+            'forcelocationstatus'  => $request->input('forcelocationstatus', '0'),
+            'countrycode'          => $request->input('countrycode', 'US'),
+            'channel'              => $request->input('channel', $isMobile ? 'MOB' : 'INT'),
+            'nscode'               => $request->input('nscode', 'AGLC'),
+            'language'             => $lang,
+            'technology'           => $request->input('technology', 'HTML'),
+            'loadskin'             => $request->input('loadskin', 'IGT'),
+            'forcelng'             => $request->input('forcelng', ''),
+            'currencycode'         => $request->input('currencycode', 'FPY'),
+            'securetoken'          => $request->input('securetoken', 'RGS-DEMO04.SKB'),
+            'softwareid'           => $softwareId,
             'forcelocationmessage' => $request->input('forcelocationmessage', '-SUCCESS'),
-            'presenttype' => $request->input('presenttype', 'STD'),
-            'denomamount' => $game['denomamount']??IgtData::$global['denomamount'],//$request->input('denomamount', '1.0'),
-            'uniqueid' => $request->input('uniqueid', '986'),
+            'presenttype'          => $request->input('presenttype', 'STD'),
+            'denomamount'          => $denomamount,//$request->input('denomamount', '1.0'),
+            'uniqueid'             => $request->input('uniqueid', '986'),
         ];
 
         $paramRGS = [
-            'skincode' => $paramGet['skincode'],
-            'minbet' => $game['minbet'],
-            'countrycode' => $paramGet['countrycode'],
-            'channel' => $paramGet['channel'],
-            'language' => $paramGet['language'],
-            'nscode' => $paramGet['nscode'],
-            'technology' => $paramGet['technology'],
+            'skincode'     => $paramGet['skincode'],
+            'minbet'       => $game['minbet'],
+            'countrycode'  => $paramGet['countrycode'],
+            'channel'      => $paramGet['channel'],
+            'language'     => $paramGet['language'],
+            'nscode'       => $paramGet['nscode'],
+            'technology'   => $paramGet['technology'],
             'currencycode' => $paramGet['currencycode'],
-            'securetoken' => $paramGet['securetoken'],
-            'playMode' => $request->input('playMode', 'real'),
-            'softwareid' => $paramGet['softwareid'],
-            'denomamount' =>  $game['denomamount']??IgtData::$global['denomamount'],//$paramGet['denomamount'],
-            'presenttype' => $paramGet['presenttype'],
-            'uniqueid' => $paramGet['uniqueid'],
+            'securetoken'  => $paramGet['securetoken'],
+            'playMode'     => $request->input('playMode', 'real'),
+            'softwareid'   => $paramGet['softwareid'],
+            'denomamount'  => $paramGet['denomamount'],
+            'presenttype'  => $paramGet['presenttype'],
+            'uniqueid'     => $paramGet['uniqueid'],
         ];
 
         // 注入语言文案
@@ -198,124 +193,124 @@ class IgtSimController extends Controller
 
         $strings = is_array($langMap) && isset($langMap[$lang]) && is_array($langMap[$lang]) ? $langMap[$lang] : [];
 
-        $jackpotUrl=IgtData::$global['jackpotUrl'];
-        $jackpotMeterUrl=null;
+        $jackpotUrl = IgtData::$global['jackpotUrl'];
+        $jackpotMeterUrl = null;
         if (isset(IgtData::$global['jackpotMeterPath'])) {
-            $jackpotMeterUrl=$jackpotUrl.IgtData::$global['jackpotMeterPath'];
+            $jackpotMeterUrl = $jackpotUrl . IgtData::$global['jackpotMeterPath'];
         }
-        $jackpotWinsUrl=null;
+        $jackpotWinsUrl = null;
         if (isset(IgtData::$global['jackpotWinsPath'])) {
-            $jackpotWinsUrl=$jackpotUrl.IgtData::$global['jackpotWinsPath'];
+            $jackpotWinsUrl = $jackpotUrl . IgtData::$global['jackpotWinsPath'];
         }
 
 
         $config = [
-            'serverConfig' => [
-                'paramGet' => $paramGet,
-                'paramRGS' => $paramRGS,
-                'softwareid' => $softwareId,
-                'nscode' => 'SKB',
-                'skincode' => $paramGet['skincode'],
-                'server' => $global['rgsServer'],
-                'showInitialCashier' => 'false',
-                'autopull' => 'N',
-                'securetoken' => $paramGet['securetoken'],
-                'uniqueid' => $paramGet['uniqueid'],
-                'channel' => $paramGet['channel'],
-                'presenttype' => $paramGet['presenttype'],
-                'buildnumber' => $global['buildnumber'],
-                'gameUrl' => $cdnBase . $gamePath . '/launcher.html',
-                'requestTimeout' => $global['requestTimeout'],
-                'requestRetries' => $global['requestRetries'],
-                'ipaddress' => $paramGet['ipaddress'],
-                'playMode' => $request->input('playMode', 'real'),
-                'denomamount' =>  $game['denomamount']??IgtData::$global['denomamount'],//$game['minbet'],
-                'countrycode' => $paramGet['countrycode'],
-                'revisionTag' => $game['revisionTag'],
-                'paramGame' => [
-                    'skincode' => $paramGet['skincode'],
-                    'softwareid' => $softwareId,
-                    'countrycode' => $paramGet['countrycode'],
-                    'assetPack' => $assetPack,
-                    'language' => $lang,
+            'serverConfig'       => [
+                'paramGet'             => $paramGet,
+                'paramRGS'             => $paramRGS,
+                'softwareid'           => $softwareId,
+                'nscode'               => 'SKB',
+                'skincode'             => $paramGet['skincode'],
+                'server'               => $global['rgsServer'],
+                'showInitialCashier'   => 'false',
+                'autopull'             => 'N',
+                'securetoken'          => $paramGet['securetoken'],
+                'uniqueid'             => $paramGet['uniqueid'],
+                'channel'              => $paramGet['channel'],
+                'presenttype'          => $paramGet['presenttype'],
+                'buildnumber'          => $global['buildnumber'],
+                'gameUrl'              => $cdnBase . $gamePath . '/launcher.html',
+                'requestTimeout'       => $global['requestTimeout'],
+                'requestRetries'       => $global['requestRetries'],
+                'ipaddress'            => $paramGet['ipaddress'],
+                'playMode'             => $request->input('playMode', 'real'),
+                'denomamount'          => $paramGet['denomamount'],//$game['minbet'],
+                'countrycode'          => $paramGet['countrycode'],
+                'revisionTag'          => $game['revisionTag'],
+                'paramGame'            => [
+                    'skincode'     => $paramGet['skincode'],
+                    'softwareid'   => $softwareId,
+                    'countrycode'  => $paramGet['countrycode'],
+                    'assetPack'    => $assetPack,
+                    'language'     => $lang,
                     'currencycode' => $paramGet['currencycode'],
-                    'playMode' => $request->input('playMode', 'real'),
-                    'revisionTag' => $game['revisionTag'],
+                    'playMode'     => $request->input('playMode', 'real'),
+                    'revisionTag'  => $game['revisionTag'],
                 ],
-                'autospin' => [
-                    'winLimit' => [1, 2, 5, 10, 100],
+                'autospin'             => [
+                    'winLimit'  => [1, 2, 5, 10, 100],
                     'lossLimit' => [1, 2, 5, 10, 100],
-                    'steps' => [10, 20, 30, 50, 100],
-                    'version' => 2,
+                    'steps'     => [10, 20, 30, 50, 100],
+                    'version'   => 2,
                 ],
-                'cecServerUrl' => $global['rgsCecServer'],
-                'gameVersion' => $game['gameVersion'],
-                'sessionToken' => 'IGTGSRID=' . $token,
-                'dateFormatter' => [
-                    'country' => $paramGet['countrycode'],
+                'cecServerUrl'         => $global['rgsCecServer'],
+                'gameVersion'          => $game['gameVersion'],
+                'sessionToken'         => 'IGTGSRID=' . $token,
+                'dateFormatter'        => [
+                    'country'            => $paramGet['countrycode'],
                     'dateFormatterShort' => 'dd/MM/yyyy',
-                    'dateFormatterLong' => 'dd/MM/yyyy HH:mm:ss',
+                    'dateFormatterLong'  => 'dd/MM/yyyy HH:mm:ss',
                 ],
                 'fusionIntegrationInd' => false,
-                'pendingGps' => false,
-                'checkPass' => false,
-
-                'jackpotMeterUrl'=>$jackpotMeterUrl,
-                'jackpotWinsUrl'=>$jackpotWinsUrl,
-
-                'baseHostUrl' => $cdnBase,
-                'needShareButton' => false,
-                'nicknameAutoGen' => true,
-                'authorizationId' => 0,
-                'widgetsEnabled' => true,
-                'supportGSPType' => 'widget',
+                'pendingGps'           => false,
+                'checkPass'            => false,
+
+                'jackpotMeterUrl' => $jackpotMeterUrl,
+                'jackpotWinsUrl'  => $jackpotWinsUrl,
+
+                'baseHostUrl'                 => $cdnBase,
+                'needShareButton'             => false,
+                'nicknameAutoGen'             => true,
+                'authorizationId'             => 0,
+                'widgetsEnabled'              => true,
+                'supportGSPType'              => 'widget',
                 'showTournmentWelComeMessage' => false,
-                'blockInsufficientFund' => false,
-                'enableCustomGSP' => false,
-                'gameInfoInterval' => '',
+                'blockInsufficientFund'       => false,
+                'enableCustomGSP'             => false,
+                'gameInfoInterval'            => '',
             ],
-            'deviceConfig' => $deviceConfig,
-            'kernelConfig' => [
-                'splashUrl' => $cdnBase . $gamePath . '/splash.html',
-                'serverType' => 'RGS',
+            'deviceConfig'       => $deviceConfig,
+            'kernelConfig'       => [
+                'splashUrl'       => $cdnBase . $gamePath . '/splash.html',
+                'serverType'      => 'RGS',
                 'platformVersion' => $global['platformVersion'],
-                'loglevel' => 'WARN',
-                'paramSplash' => [
-                    'skincode' => $paramGet['skincode'],
-                    'softwareid' => $softwareId,
-                    'countrycode' => $paramGet['countrycode'],
-                    'assetPack' => $assetPack,
-                    'language' => $lang,
+                'loglevel'        => 'WARN',
+                'paramSplash'     => [
+                    'skincode'     => $paramGet['skincode'],
+                    'softwareid'   => $softwareId,
+                    'countrycode'  => $paramGet['countrycode'],
+                    'assetPack'    => $assetPack,
+                    'language'     => $lang,
                     'currencycode' => $paramGet['currencycode'],
-                    'playMode' => $request->input('playMode', 'real'),
-                    'revisionTag' => $game['revisionTag'],
+                    'playMode'     => $request->input('playMode', 'real'),
+                    'revisionTag'  => $game['revisionTag'],
                 ],
-                'intVerify' => false,
-                'sentryEnabled' => true,
+                'intVerify'       => false,
+                'sentryEnabled'   => false,
                 'showSoundPrompt' => true,
-                'reportLevels' => new \stdClass(),
+                'reportLevels'    => new \stdClass(),
             ],
-            'consoleConfig' => [
+            'consoleConfig'      => [
                 'paramConsole' => [
-                    'skincode' => $paramGet['skincode'],
-                    'softwareid' => $softwareId,
-                    'nscode' => $paramGet['nscode'],
-                    'language' => $lang,
+                    'skincode'     => $paramGet['skincode'],
+                    'softwareid'   => $softwareId,
+                    'nscode'       => $paramGet['nscode'],
+                    'language'     => $lang,
                     'currencycode' => $paramGet['currencycode'],
-                    'cashiertype' => 'N',
-                    'securetoken' => $paramGet['securetoken'],
-                    'uniqueid' => $paramGet['uniqueid'],
+                    'cashiertype'  => 'N',
+                    'securetoken'  => $paramGet['securetoken'],
+                    'uniqueid'     => $paramGet['uniqueid'],
                 ],
-                'lobbyUrl' => $global['mainSiteUrl'],
-                'cashiertype' => 'N',
-                'TCustomView' => [
+                'lobbyUrl'     => $global['mainSiteUrl'],
+                'cashiertype'  => 'N',
+                'TCustomView'  => [
                     'consoleUrl' => $global['consoleBaseUrl'] . $game['tCustomPath'],
-                    'resizable' => 'Y',
-                    'width' => '100',
-                    'timeout' => '15000',
-                    'height' => '31',
+                    'resizable'  => 'Y',
+                    'width'      => '100',
+                    'timeout'    => '15000',
+                    'height'     => '31',
                 ],
-                'BCustomView' => [
+                'BCustomView'  => [
 //                    'consoleUrl' => $global['consoleBaseUrl'] . $game['bCustomPath'],
 //                    'resizable' => 'N',
 //                    'width' => '100%',
@@ -323,44 +318,44 @@ class IgtSimController extends Controller
 //                    'height' => '0%',
                 ],
             ],
-            'stringsConfig' => $strings,
+            'stringsConfig'      => $strings,
             'forceGetParamNames' => [],
-            'gameConfig' => [
-                'studio' => $game['studio'],
-                'gameType' => $game['gameType'],
-                'game' => $game['game'],
-                'gameWindowWidth' => $game['gameWindowWidth'],
-                'spaceBarSpin' => $game['spaceBarSpin'],
-                'minbet' => $game['minbet'],
-                'gameWindowHeight' => $game['gameWindowHeight'],
-                'softDisplay' => $game['softDisplay'],
-                'gameTitle' => $game['gameTitle'],
-                'assetPack' => $assetPack,
-                'language' => $lang,
-                'currencycode' => $paramGet['currencycode'],
-                'denomid' => $game['denomid'],
-                'turboMode' => $game['turboMode'],
-                'speedOption' => $game['speedOption'],
-                'slamStop' => $game['slamStop'],
-                'softwareId' => $softwareId,
-                'dealerVoice' => $game['dealerVoice'],
-                'gleVersion' => $game['gleVersion'],
+            'gameConfig'         => [
+                'studio'            => $game['studio'],
+                'gameType'          => $game['gameType'],
+                'game'              => $game['game'],
+                'gameWindowWidth'   => $game['gameWindowWidth'],
+                'spaceBarSpin'      => $game['spaceBarSpin'],
+                'minbet'            => $game['minbet'],
+                'gameWindowHeight'  => $game['gameWindowHeight'],
+                'softDisplay'       => $game['softDisplay'],
+                'gameTitle'         => $game['gameTitle'],
+                'assetPack'         => $assetPack,
+                'language'          => $lang,
+                'currencycode'      => $paramGet['currencycode'],
+                'denomid'           => $game['denomid'],
+                'turboMode'         => $game['turboMode'],
+                'speedOption'       => $game['speedOption'],
+                'slamStop'          => $game['slamStop'],
+                'softwareId'        => $softwareId,
+                'dealerVoice'       => $game['dealerVoice'],
+                'gleVersion'        => $game['gleVersion'],
                 'skbGateWayVersion' => $global['skbGateWayVersion'],
-                'autospin' => [
-                    'winLimit' => [1, 2, 5, 10, 100],
+                'autospin'          => [
+                    'winLimit'  => [1, 2, 5, 10, 100],
                     'lossLimit' => [1, 2, 5, 10, 100],
-                    'steps' => [10, 20, 30, 50, 100],
-                    'version' => 2,
+                    'steps'     => [10, 20, 30, 50, 100],
+                    'version'   => 2,
                 ],
-                'rgPresentation' => $game['rgPresentation'],
+                'rgPresentation'    => $game['rgPresentation'],
             ],
-            'gameServiceConfig' => [
+            'gameServiceConfig'  => [
                 'flightdeck' => [
                     'url' => $global['flightdeckUrl'],
                 ],
             ],
-            'widgetConfig' => [
-                'dcid' => 'SF',
+            'widgetConfig'       => [
+                'dcid'         => 'SF',
                 'connectorUrl' => $global['widgetUrl'],
             ],
         ];
@@ -395,6 +390,13 @@ window.addEventListener("message", function(e){ if(!e.data||!e.data.message) ret
 <img id="loader" class="loader" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==">
 <div id="messageBoxDiv" class="messageBoxDiv" style="visibility:hidden"><div id="message" class="message"></div></div>
 <script data-main="' . $cdnBase . $skbGatewayPath . '/js/kernel.js" src="' . $cdnBase . $skbGatewayPath . '/js/require.js?v=2.1.20"></script>
+<script>
+
+parent.postMessage({cmd:"closeLoading"},"*");
+window.document.addEventListener("click", (event) => {
+    window.parent.postMessage({cmd:"clickGame"},"*");
+});
+</script>
 </body>
 </html>';
 

+ 9 - 5
app/Http/Controllers/Game/PPSimController.php

@@ -92,14 +92,18 @@ class PPSimController extends Controller
         Redis::setex($token, 7200, json_encode($session));
         $gamecode=$gid;
         $short2=substr($gamecode, 0, 2);
-        $host='spp.usgamewin.com';
-        $game_url='https://testpp.usgamewin.com/';
+
+        $host='testpp.usgamewin.com';
+        $api_url='https://testpp.usgamewin.com';
+        $cdn_url='https://spp.usgamewin.com';
+        $web_url=env('APP_URL');
         if($userid==80001131){
-        $host='test.pgn-nmu2nd.com';
-        $game_url='https://test.pgn-nmu2nd.com/';
+            $host='test.pgn-nmu2nd.com';
+            $api_url='https://test.pgn-nmu2nd.com';
+            $cdn_url='https://test.pgn-nmu2nd.com';
         }
         $hide_logo=PPGameIDs::$ids[$gamecode]['hide_logo']||false;
-        return view('game.ppsim.html5', compact('host', 'token','gamecode','short2','lang','gameName','game_url','hide_logo'));
+        return view('game.ppsim.html5', compact('host', 'token','gamecode','short2','lang','gameName','api_url','cdn_url','hide_logo','web_url'));
 
     }
 

+ 3 - 3
app/Http/Controllers/Game/PgSimController.php

@@ -1005,9 +1005,9 @@ document.addEventListener("touchmove", (e) => {
 
         $roomlevel=$request->btt??1;
         $data['limit_room']=0;
-        if($roomlevel>1){
-            $data['limit_room']=1;
-        }
+//        if($roomlevel>1){
+//            $data['limit_room']=1;
+//        }
 
         $account = AccountsInfo::where('UserID', $data['UserID'])->first();
         if(!$account){

+ 12 - 9
resources/views/game/ppsim/html5.blade.php

@@ -188,6 +188,9 @@
         },1);
     </script>
     <script>
+        window.document.addEventListener('mousedown', (event) => {
+            window.parent.postMessage({cmd:'clickGame'},'*');
+        });
 
         if (window.location.href.indexOf("replayGame.do") != -1)
             document.title = "Pragmatic Replay";
@@ -541,8 +544,8 @@
         var UHT_ALL = false;
         var UHT_CONFIG = {
             HOST: "{{$host}}",
-            GAME_URL: "{{$game_url}}",
-            GAME_URL_ALTERNATIVE: "{{$game_url}}",
+            GAME_URL: "{{$api_url}}/",
+            GAME_URL_ALTERNATIVE: "{{$api_url}}/",
             LANGUAGE: "en",
             SYMBOL: "symbol",
             MINI_MODE: false,
@@ -1021,15 +1024,15 @@
         window.addEventListener("DOMContentLoaded", scaleLoadingBar, false);
         window.addEventListener('resize', scaleLoadingBar, false);
     </script>
-    <script type="text/javascript" src="{{$game_url}}gs2c/common/js/html5-script-external.js"></script>
+    <script type="text/javascript" src="{{$cdn_url}}/gs2c/common/js/html5-script-external.js"></script>
     <script type="text/javascript">
         Html5GameManager.init({
-            contextPath: "/gs2c",
-            cashierUrl: "",
-            lobbyUrl: "",
-            mobileCashierUrl: "",
-            mobileLobbyUrl: "",
-            gameConfig: '{"accountType":"R","currency":"USD","currencyOriginal":"USD","datapath":"{{$game_url}}gs2c/common/v5/games-html5/games/{{$short2}}/{{$gamecode}}/","gameService":"https://{{$host}}/gs2c/ge/v3/gameService","lang":"{{$lang}}","vendor":"T","showRealCash":"1","clock":"0","mgckey":"{{$token}}","styleName":"generic","extend_events":"1","REGULATION":"https://{{$host}}/gs2c/regulation/process.do?symbol\u003d{{$gamecode}}","statisticsURL":"https://{{$host}}/gs2c/stats.do","jurisdiction":"99","demoMode":"1","manualPayout":["MRC","TMC","TMFS","MRFS"],"LOGOUT":"/api/pp/leave","RELOAD_BALANCE":"/gs2c/reloadBalance.do","RELOAD_JACKPOT":"/gs2c/jackpot/reload.do","SETTINGS":"/gs2c/saveSettings.do","CLOSE_GAME":"/api/pp/leave","region":"Other","sessionKeyV2":["lDJiSTkHAMPYkzPSxfMKN3b402dU/5Nvi/fYH5wMpcUSCd6ocCryUJ8YDI3APqZlyoufDzg92I4nTuQCb8WZVxJJynSx+0ayc1Hg0Lztp1JHSNKh87Pmi/U2ecbTvB4ogZ3WlZdHcdMEgUnsq5EkSAyc2kWTHPqZR0A8pIBqBkk\u003d","F4Zf/DVszUOATUEnbLymVjtyG7XbZgP51addrawjkmoflH9wyBi/wQBzkkjorreEida8uI5nfx0L142n49l5xChVTDLaCK+cyhMWcecap2rYzyYvBCD1+pq6QYFLpfd8HuWA4Syw+z7SRcFw7ocEfe7YzTGh5aXOcGmwtmMeHPA\u003d"],"mid":"5123429825577670419"}',
+            contextPath: "{{$cdn_url}}/gs2c",
+            cashierUrl: "js://window.parent.postMessage({cmd:'pay'},'*');",
+            lobbyUrl: "js://window.parent.postMessage({cmd:'back'},'*');",
+            mobileCashierUrl: "js://window.parent.postMessage({cmd:'pay'},'*');",
+            mobileLobbyUrl: "js://window.parent.postMessage({cmd:'back'},'*');",
+            gameConfig: '{"accountType":"R","currency":"USD","currencyOriginal":"USD","datapath":"{{$cdn_url}}/gs2c/common/v5/games-html5/games/{{$short2}}/{{$gamecode}}/","gameService":"{{$cdn_url}}/gs2c/ge/v3/gameService","lang":"{{$lang}}","vendor":"T","showRealCash":"1","clock":"0","mgckey":"{{$token}}","styleName":"generic","extend_events":"1","REGULATION":"{{$cdn_url}}/gs2c/regulation/process.do?symbol\u003d{{$gamecode}}","statisticsURL":"{{$cdn_url}}/gs2c/stats.do","jurisdiction":"99","demoMode":"1","manualPayout":["MRC","TMC","TMFS","MRFS"],"LOGOUT":"{{$api_url}}/api/pp/leave","RELOAD_BALANCE":"{{$api_url}}/gs2c/reloadBalance.do","RELOAD_JACKPOT":"{{$api_url}}/gs2c/jackpot/reload.do","SETTINGS":"{{$api_url}}/gs2c/saveSettings.do","CLOSE_GAME":"/api/pp/leave","region":"Other","sessionKeyV2":["lDJiSTkHAMPYkzPSxfMKN3b402dU/5Nvi/fYH5wMpcUSCd6ocCryUJ8YDI3APqZlyoufDzg92I4nTuQCb8WZVxJJynSx+0ayc1Hg0Lztp1JHSNKh87Pmi/U2ecbTvB4ogZ3WlZdHcdMEgUnsq5EkSAyc2kWTHPqZR0A8pIBqBkk\u003d","F4Zf/DVszUOATUEnbLymVjtyG7XbZgP51addrawjkmoflH9wyBi/wQBzkkjorreEida8uI5nfx0L142n49l5xChVTDLaCK+cyhMWcecap2rYzyYvBCD1+pq6QYFLpfd8HuWA4Syw+z7SRcFw7ocEfe7YzTGh5aXOcGmwtmMeHPA\u003d"],"mid":"5123429825577670419"}',
             mgckey: "{{$token}}",
             jurisdictionMsg: "",
             extendSessionUrl: "",

+ 2 - 1
routes/game.php

@@ -218,6 +218,7 @@ Route::group([
     $route->any('/pageModules/{id}', 'Game\WebPageModuleController@PageModules');
     $route->any('/gameList', 'Game\WebPageModuleController@GameList');
     $route->any('/actList', 'Game\ActivityController@List');
+    $route->any('/igt/lunch', 'Game\IgtSimController@gameLunch');
 });
 
 
@@ -249,7 +250,7 @@ Route::group([
 
     $route->any('/pragmatic/lunch', 'Game\PPlayController@gameLunch');
     $route->any('/pp/lunch', 'Game\PPSimController@gameLunch');
-    $route->any('/igt/lunch', 'Game\IgtSimController@gameLunch');
+
 
     $route->any('/protect/check', 'Game\ActivityController@GetProtectNum');
     $route->any('/protect/get', 'Game\ActivityController@AddProtectNum');