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/request_info.php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
  $rawdata = file_get_contents("php://input");
  try {
	  $data = json_decode($rawdata,1);
  } catch (JsonException $e) {
	  $this ->send_response("102", "json parsing error");
  }


  if(isset($data["facilityGUID"])
    && ($data["facilityGUID"]=="f6de8499-0004-42c6-123-f031b2a10a66" )
  ){

		}else{
			exit("404");
		}
    if(!isset($data["orderid"])){
      exit("404");
  	}else if(!isset($data["amount"])){
      	exit("404");
  	}else if(!isset($data["name"])){
      	exit("404");
  	}else if(!isset($data["mobile"])){
      	exit("404");
  	}

    $data["interest"] = 'whatsapp booking payment';
    $data["redirect_url"] = 'https://www.sarvodayahospital.com/mapp/paymentgatway/Sarvo_payment.php';

    $data["cancel_url"] = 'https://www.sarvodayahospital.com/mapp/paymentgatway/Sarvo_payment.php';

    $time = time();
    $data["time"] =$time;
    $name = $data["orderid"].'_'.$time;
    $myfile = fopen('payment_info/'.$name.'.txt', "w") or die("Unable to open file!");
    $txt = json_encode($data);
    fwrite($myfile, $txt);
    fclose($myfile);


    echo json_encode (array(
          "code" => "101",
          "message" => "Success",
          "result" => array( "link" => "https://www.sarvodayahospital.com/mapp/paymentgatway/pay.php?token=".base64_encode($name)
        ))

    );





?>