HEX
Server: LiteSpeed
System: Linux boring-lehmann.135-181-181-249.plesk.page 4.18.0-553.85.1.el8_10.x86_64 #1 SMP Mon Nov 24 09:05:24 EST 2025 x86_64
User: sethsawariyabizmart._h2dp1nbhkqm (10008)
PHP: 8.3.31
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/sethsawariyabizmart.com/httpdocs/masterAir/masterCheckout/pgrequest.php
<?php
include('../errorPage.php');

//error_reporting(E_ALL); // Report all PHP errors
//ini_set('display_errors', 1); // Display errors on the screen
session_start();

session_unset();
session_destroy();

session_start();

if (isset($_GET['txnid'])) {
  if ($_GET['txnid'] == '') {
	errorPage('502 invalid entry.');
    exit();
  } else {
    $ucode = $_GET['txnid'];
  }
} else {
  errorPage('502 invalid entry.');
  exit();
}

include('../cred-config.php');
include('../functions.php');
include('../datalist.php');
include('../processALSO.php');

$curl = curl_init();

$url = $apURL . '/api/v1/private/payin/generate/link/' . $ucode;
curl_setopt_array($curl, array(
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => array(
    'email: ' . $mEmail,
  ),
  CURLOPT_SSL_VERIFYPEER => false,
  CURLOPT_SSL_VERIFYHOST => false,
  CURLOPT_POSTFIELDS => '{}',
));


$response = curl_exec($curl);
curl_close($curl);

$dd = json_decode($response, true);

if ($dd['success'] != true) {
	session_destroy();
  	errorPage('502 invalid entry.');
  	exit;
}

$log = $dd['data'];
$log['ip'] = $_SERVER['REMOTE_ADDR'];
$cred = airPayCred($dd['data']['provider_id']);

logRequestData(['Payin_Link_Open' => $log], $cred['bank']);

if ($dd['data']['exist'] == true) {
  	session_destroy();
	errorPage('This order is already submited.');
  	exit();
}

if ($dd['data']['is_blocked'] == true) {
  	session_destroy();
	errorPage('Please comeback later.');
  	exit();
}

$merchant_id = $dd['data']['merchant_id'];
if($merchant_id == 0){
	$location = requireLocation(); 
    $lat = $location['latitude'];
    $lon = $location['longitude'];
}else{
    $lat = null;
    $lon = null;
}

$orderId = $dd['data']['ucode'];
$amount = number_format($dd['data']['amount'], 2);
$profile = generateFakeIndianProfile();
$payerName = $profile['name'];
$payerEmail = $profile['email'];
$payerMobile = $profile['phone'];
$user_id = $dd['data']['user_id'];
$provider_id = $dd['data']['provider_id'];
$ip_res = sendEntryIp($user_id, $dd['data']['order_id'], $ucode, $log['ip'],$lat,$lon);
$resultCB = checkChargeback($user_id, $log['ip']);

if ($resultCB) {
    session_destroy();
	errorPage('User Blocked.');
  	exit;
}

$data = generateOrder($orderId, $amount, $payerMobile, $payerEmail, $provider_id);

if ($data['status'] != 200 || !$data['QRCODE_STRING']) {
	session_destroy();
	errorPage('Transaction failed try again.');
	if (isset($data['error']) && $data['error'] == "Daily / Weekly / Monthly Transaction Limit Exhausted.") {
		deactiveProvider($provider_id, $mEmail);
	}
	exit;
}

// Set your callback URL
$checkStatusUrl = "check-status.php?strId=".customEncode($orderId);
$linkUpdateUrl = "link-update.php?strId=".customEncode($orderId);
$callback_url = $resurl . "?txnid=" . $dd['data']['order_id'] . "&wcode=" . customEncode($urlx) . "&rcode=" . customEncode($dd['data']['redirect_url']);

$_SESSION['orderId'] = $orderId;

$file = '../links.txt';
$lines = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
if ($lines && count($lines) > 0) {
    $randomLink = $lines[array_rand($lines)];
} else {
    $randomLink='';
}
if($merchant_id == 7 || $merchant_id == 35 || $merchant_id == 47){
	include('../DF_UI.php');
}else{
	include('../newUI.php');
}

?>