sdk pro app link 1

subscription.php > link name




<?php


$n=$_GET['n'];

//echo $n;
if (isset($n)) {

// Request data for OTP request
$requestData = array(
    "applicationId" => "APP_0000",
    "password" => "42c778a3c667cd851603784441f71245",
    "subscriberId" => "tel:$n",
    "applicationHash" => "Any hasg",
    "applicationMetaData" => array(
        "client" => "MOBILEAPP",
        "device" => "Any device",
        "os" => "Any os",
        "appCode" => "https://play.google.com/store/apps/details?id=lk.dialog.megarunlor"
    )
);


// Convert request data to JSON
$requestJson = json_encode($requestData);

// cURL options
$url = "https://developer.bdapps.com/subscription/otp/request";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestJson);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Content-Type: application/json",
    "Content-Length: " . strlen($requestJson)
));

// Send cURL request and get response
$responseJson = curl_exec($ch);

// Check for errors
if ($responseJson === false) {
    echo "cURL error: " . curl_error($ch);
} else {
    // Decode JSON response
    $response = json_decode($responseJson, true);

    // Handle response
    if ($response === null) {
        echo "Invalid JSON in response: " . $responseJson;
    } else {
        /*
        echo "Status code: " . $response["statusCode"] . "\n";
        echo "Status detail: " . $response["statusDetail"] . "\n";
        echo "Reference number: " . $response["referenceNo"] . "\n";
        echo "Version: " . $response["version"] . "\n";
    */
   
    $requestData = array(
    "statusCode" => $response["statusCode"],
    "statusDetail" => $response["statusDetail"],
    "referenceNo" => $response["referenceNo"]
);

      echo json_encode($requestData);
 
   
    }
}

// Close cURL session
curl_close($ch);


}else{
  echo "inpute requare";

}


?>

No comments

Featured Post

welcome to monju helping site