Jump to content

Tejas

Member
  • Posts

    1
  • Joined

  • Last visited

About Tejas

Tejas's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. SeviceSingleSignOn Core module function not redirecting on new tab. Instead of its printing the variable in the same tab. code : function myModule_ServiceSingleSignOn(array $params) { $return = array( 'success' => false, ); try { if($params['domain'] == ''){ throw new Exception('domain cannot be blank'); return false; } // Call the service's single sign-on token retrieval function, using the // values provided by WHMCS in $params. $data = [ 'customerId'=> $params['clientsdetails']['userid'], 'domainName'=> $params['domain'], 'orderId'=> strval($params['serviceid']), 'exp'=> time()+60*5 ]; $token = generateJWT($data , $params['serverpassword']); $controlPanelUrl = constant('CONTROL_PANEL_PATH'); return array( 'success' => true, 'redirectTo' => $controlPanelUrl.'?partnerId='.$params["serverusername"].'&jwt='.$token ); } catch (Exception $e) { // Record the error in WHMCS's module log. logModuleCall( 'flockcloudmodule', __FUNCTION__, $params, $e->getMessage(), $e->getTraceAsString() ); return array( 'success' => false, 'errorMsg' => $e->getMessage(), ); } }
  2. Welcome to WHMCS.Community Tejas! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated