<?php
    $reason   = "Not Credited";
    $apiToken = "5304f696e952416f8989e2186bb4dd3b";
    echo $apiUrl="https://www.ytcpay.co.in/apiservice.asmx/RegisterComplaint?apiToken=$apiToken&reqid=$LLPTxnId&reason=$reason"; 
	
	$curl = curl_init();

    curl_setopt_array($curl, array(
    CURLOPT_URL => $apiUrl,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    ));

    $response = curl_exec($curl);
    //$result   = simplexml_load_string($response);
    curl_close($curl);
    
    $quApiHit="INSERT INTO api_hit (Date,Time,TxnId,ApiName,Type,Disc) VALUES ('$date','$time','$LLPTxnId','$api','COMPLAINT','$response')";
	mysqli_query($con,$quApiHit);
	
    
?>