View file public_html/vipadz/money/verifysender.php

File size: 1.7Kb
<?php

include '../../db.php';
include '../../functions.php';

headtag("$SiteName - Verify Sender");

if($adminlog==1){
$sender=formget("sender");

echo '<div class="title">Verify Sender <font color="red">'.$sender.'</font></div>';
 {
 if(isset($_POST["otp"])){

$otp=formpost("otp");

$errors=array();

if(strlen($otp)<1){
  $errors[]='Please Enter OTP.';
 }

if(empty($errors)){
$set = mysql_query("SELECT * FROM moneyconfig");
$ing = mysql_fetch_array($set);
$pin=$ing["pin"];
$authkey=$ing["authkey"];

$url='https://www.pay2all.in/moneyapi/pay/sender_confirm?pin='.$pin.'&authkey='.$authkey.'&senderid='.$sender.'&otp='.$otp.'';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 9);
$sender_contents = curl_exec($ch);
$sender_decode=json_decode($sender_contents);
$status=$sender_decode->status;
$message=$sender_decode->message;
curl_close($ch);

if($message=='Sender Registered Successfully')
{
$doit=mysql_query("UPDATE senders SET otp='$otp',status='Verified' WHERE sender='$sender'");
}

  if($doit){
   echo '<div class="success">'.$sender.' Sender Has Been Verified.</div>';
  }
  else {
   echo '<div class="error">'.$message.'</div>';
}

}
else {

dump_error($errors);

}
}

echo '<div class="form"><form method="post">Please Enter OTP Sent To Your Mobile | <a href="resendotp.php?act=sender">Resend OTP</a><br/><input type="text" name="otp""/><br/><input type="submit" value="Verify Sender"/></form></div>';

}

 echo '<a href="senders.php"><div class="ua">Senders</div></a>';
 include '../../foot.php';
 }
 else {
 header('Location:login.php');
 }
 ?>