so iam trying to add payop payment option to my website
Code:
<?php
#--- Error reporting ---#
error_reporting(-1);
#--- Include settings ---#
include("./_settings.php");
#--- Timezone status ---#
date_default_timezone_set("AFRICA/CAIRO");
$SECRET_KEY = ""; // secret for my app
$transaction_id = $_REQUEST['id'];
$user_id = $_REQUEST['uid'];
$offer_id = $_REQUEST['oid']; // completed offer or payment method
$new_currency = $_REQUEST['new'];
$hash_signature = $_REQUEST['sig'];
$hash = md5($transaction_id.':'.$new_currency.':'.$user_id.':'.$SECRET_KEY);
if ($hash != $hash_signature) {
// signature doesn't match, respond with a failure
echo "0 invaid hash\n";
exit;
}
// all good!
#--- Database connection ---#
mssql_connect($serverIp, $userName, $password) or die("0 db connection error\n");
#--- Select Database ---#
mssql_select_db($dbName1) or die("0\n");
#--- Filter ---#
$clean_html = htmlspecialchars($user_id);
$clean_sql = str_replace("'", "", $clean_html);
#--- INSERT SILK, NEW METHOD MAKAVELI PROZ0R ---#
mssql_query(" exec CGI.CGI_WebPurchaseSilk2 1,'$user_id',0,'$new_currency',0") or die("0 error quesry\n");
#--- Log payment ---#
mssql_select_db($dbName5) or die("0 error log\n");
VALUES('$clean_sql', '$new_currency', '$date')");
log("User $clean_sql purchased $new_currency coins using $offer_id (txn: $transaction_id)\n");
echo "1\n";
?>
heres the template code
Code:
<form action="/Payop.php" method="POST">
<div class="form-group">
<center><h4><font color="white" size="3px">PayOp *</font></h4></center>
<select class="form-control" name="amount" style="color:yellow ; background: rgba(0,0,0,4.0) ; width: 500px; height: 40px; margin: 25px auto;">
<option value="1">$1 -> 100 Silk </option>
<option value="10">$10 -> 1000 Silk </option>
<option value="20">$20 -> 2100 Silk </option>
<option value="30">$30 -> 3100 Silk </option>
<option value="40">$40 -> 4400 Silk </option>
<option value="50">$50 -> 5500 Silk </option>
<option value="100">$100 -> 11000 Silk </option>
<option value="200">$200 -> 25000 Silk </option>
</select>
</div>
<input type="hidden" name="jid" value="{{ user.getId() }}" />
<input type="hidden" name="email" value="{{ user.getEmail() }}" />
<center><input class="btn btn-lg btn-warning" type="submit"></center>
</form>






