<?php use Store\Logger; //echo "hi"; /*NOTE EVENT ID SHOULD BE JET0006 eg and currently it is coming from local db or hardcoded */ /* IF event id below is uncommented and headers are off the test page of apache is shown . */ /* If event id is given proper and headers are on the request goes to billing gateway.*/ require_once '../config.php'; $logger = new Logger\Logger(); $eventId = $_GET['EventId']; if ($userStatus == 'NEWUSER' or $userStatus == 'UNKNOWN' or $userStatus == 'UNSUBSCRIBED') { // if( !in_array($operator, $config->allowedOperators) ){ // header("Location: index.php"); // exit(); // }else{ if (isset($eventId) and $eventId != '' and $eventId != null) { $cpevent = base64_decode($eventId); $urlPart = strtok($_SERVER["REQUEST_URI"], '?'); $urlPart = substr(strtok($_SERVER["REQUEST_URI"], '?'), 0, strrpos($urlPart, "/")); $retUrl = $hostName . $urlPart . "/index.php"; $ErrorUrl = $hostName . $urlPart . '/error.php'; //$image_url = $hostName.'/cgImage/Footer_cg_image640x640.jpg'; // echo($billing_gateway); // exit; $subscribeData = array('transactionId' => $TransId, 'MSISDN' => $msisdn, 'Client IP' => $clientIp, 'Success Return url' => $retUrl, 'CPEVENT' => $cpevent, 'Operator' => $operator, 'Fail Return url' => $ErrorUrl, 'CMODE' => $OprSubParam['CMODE'], 'CP IMAGE' => $OprSubParam['IMAGE'], 'Token' => $Token, 'Sub Url' => $billing_gateway); $billing_gateway = 'http://103.43.2.5/' . $config->operatorData[$operator]['BillingServiceSub'] . '?REQUESTTYPE=NEW_SUB&APPCONTID=123&UNITTYPE=SUBSCRIPTION&CPEVENT=' . $cpevent . '&MSISDN=' . $msisdn . '&OPERATOR=' . $operator . '&CMODE=' . $OprSubParam['CMODE'] . '&UID=' . $config::UID . '&PASS='******'&TRANSID=' . $TransId . '&RETURL=' . $retUrl . '&FLRETURL=' . $ErrorUrl . '&OTHER1=' . $image_url . '&OTHER2=' . $hostName . $urlPart . "/index.php" . '&TOKENCALL=' . $Token; $logger->logCurlAPI($billing_gateway); header("Location: " . $billing_gateway); exit; } else { header("Location: " . $linkUrl);
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); ini_set('error_reporting', 32767); ini_set("error_log", $_SERVER['DOCUMENT_ROOT'] . "logs/php_error.log"); //- turn off compression on the server @apache_setenv('no-gzip', 1); @ini_set('zlib.output_compression', 'Off'); header("access-control-allow-origin: *"); include_once '../config.php'; use Store\Logger; use Store\Curl; $curlObj = new Curl\Curl(); $logger = new Logger\Logger(); $fileType = $_GET['t']; $fileName = $_GET['n']; $cont_reso_type = isset($_GET['r']) ? $_GET['r'] : '0'; $catalogue_detail_id = $_GET['d']; $content_metadata_id = $_GET['m']; // $content_metadata_id = 601; $cd_name = ""; // $content_metadata_id = 2; $url = "http://192.168.1.159:9875/v3/contentDownloadHistory/getContentMetaData"; $data = array("cd_cmd_id" => $content_metadata_id); $data = json_encode($data); $meta = $curlObj->executePostCurl($url, $data); $meta = $meta['Content']; $meta = json_decode($meta); $downloadingUrl = $meta->message->contentMetaDataDetail->cm_downloading_url; $url = "http://192.168.1.159:9875/v3/contentDownloadHistory/getCatalogueDetail";