Exemplo n.º 1
0
    default:
        $sid = 'VAS_Y_C04000_0000_PULL';
        $msg = "Keyword salah, ketik FREE untuk registrasi, ketik SVOD untuk membeli paket TOVI MOVIES, dan NEW untuk paket TOVI NEW";
        $sent = true;
        break;
}
if ($sid == 'VAS_Y_C04000_3500_PULL') {
    $amount = 3500;
} else {
    if ($sid == 'VAS_Y_C04000_010K_PULL') {
        $amount = 10000;
    }
}
if (!$urlTelkomsel) {
    $msgEncode = str_replace(' ', '+', $msg);
    $urlTelkomsel = $host[0] . "?appsid={$appsid}&pwd={$pwd}&sid={$sid}&sms={$msgEncode}&sender=&msisdn={$msisdn}&trx_id={$trx_id}";
    $xsent = file_get_contents($urlTelkomsel);
    if ($xsent == 1) {
        if ($autoorder) {
            $mvLast = getSvodLastOrder();
            $pass = md5($sender);
            /* 				$npassword = substr($pass,strlen($pass)-5,5);
            				$data_login = get_login_api($sender,md5($npassword)); */
            $ret = setOrder($sender, 'telkomsel-svod-package777', $mvLast['product_code'], '', '', $sender);
        }
    }
}
$dataOut = array('msisdn' => $sender, 'trx_id' => $trx_id, 'adn' => $adn, 'password' => $password, 'voucher_code' => $generator_voucher, 'sms' => addslashes($msg), 'url_api' => $urlTelkomsel, 'output_api' => addslashes($xsent));
set_telkomsel_log('out', $dataOut);
echo 'OK';
exit;
Exemplo n.º 2
0
function setOrder($uid, $token, $pcode = '', $vod_id, $billAccount)
{
    if (!$pcode) {
        $tempCC = getSvodLastOrder();
        $pcode = $tempCC['product_code'];
    }
    /* $req = '<?xml version="1.0" encoding="UTF-8"?><Root><Request><userToken>'.$token.'</userToken><userAccount>'.$uid.'</userAccount><payAccount>'.$billAccount.'</payAccount><productCodes><code>'.$pcode.'</code></productCodes><clipCode>'.$clipCode.'</clipCode><contentCode>'.$contentCode.'</contentCode></Request></Root>';
    		$url = "http://118.98.96.53/system/order?request=".urlencode($req);
    		$sent = file_get_contents($url);
    		$out = array();
    		if($sent){
    			$vlogxml = new SimpleXMLElement($sent);
    			$out['transactionId'] = html_entity_decode($vlogxml->Response->transactionId);	 
    		} */
    $connect = mysql_connect('10.62.162.24', 'olrait', 'Wr1t3_4l4y');
    $db = mysql_select_db('ottaaa2');
    $trx_id = date("YmdHis") . "-{$vod_id}";
    $paket = "packages";
    $expire_time = date("Y-m-d H:i:s", strtotime('+30 day'));
    if ($vod_id) {
        $paket = "title";
        $expire_time = date("Y-m-d H:i:s", strtotime('+2 day'));
    }
    $queryOba = "INSERT INTO ott_order (user_id, trx_id, package_code, vod_id, order_type, bill_account, status, created_time, expire_time)\n\t\t\t\t\tvalues('{$uid}','{$trx_id}', '{$pcode}', '{$vod_id}', '{$paket}', '{$billAccount}', '1','" . date("Y-m-d H:i:s") . "','{$expire_time}')";
    mysql_query($queryOba);
    return $out;
}