HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/sarvodayahospital/public/mapp/paymentgatway/mobile_payment.php
<?php include('Crypto.php')?>
<?php
 	error_reporting(0);

	$workingKey='608934FAD8273DAB1C11371AEE32C597';		//Working Key should be provided here.
	$encResponse=$_POST["encResp"];			//This is the response sent by the CCAvenue Server
	$rcvdString=decrypt($encResponse,$workingKey);		//Crypto Decryption used as per the specified working key.
	$order_status="";
	$decryptValues=explode('&', $rcvdString);
	$dataSize=sizeof($decryptValues);
	//echo "<center>";

	for($i = 0; $i < $dataSize; $i++)
	{
		$information=explode('=',$decryptValues[$i]);
		if($i==3)	$order_status=$information[1];
	}


	$result = array();
	for($i = 0; $i < $dataSize; $i++)
	{
			$information=explode('=',$decryptValues[$i]);
			$result[$information[0]] = urldecode($information[1]);
	    //echo '<tr><td>'.$information[0].'</td><td>'.urldecode($information[1]).'</td></tr>';
	}


	// exit();

	if($order_status==="Success")
	{
    $curl = curl_init();
    $ORDER_ID = $result["order_id"];
    $ORDER_ID = str_replace("V","",$ORDER_ID);
    $ORDER_ID = $result["order_id"];
    $reference_id = $result["tracking_id"];
      curl_setopt_array($curl, array(
      CURLOPT_URL => 'https://www.sarvodayahospital19.com/paymentgatway_physical/mobile_video_payment.php',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => '',
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => true,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => 'POST',
      CURLOPT_POSTFIELDS =>'{
      "order_id" : "'.$ORDER_ID.'",
      "order_status" : "'.$order_status.'",
      "reference_id" : "'.$reference_id.'",
      "result" : '.json_encode($result).',
      "facilityGUID":"f6de8499-0004-5896-ab8c-jduik8JODHJ"
      }',
      CURLOPT_HTTPHEADER => array(
      'Content-Type: application/json'
      ),
      ));

      $response = curl_exec($curl);

      curl_close($curl);
      $response  = json_decode($response,1);
      $link = $response['link'];
      header("location:$link");

      exit('Your payment is Successful,you will get confirmation message soon');

}
	else if($order_status==="Aborted")
	{
		echo $order_status;
	}
	else if($order_status==="Failure")
	{
      echo "<br>order fail please try again later";

  }
	else
	{
		echo "<br>Security Error. Illegal access detected";

	}





?>