• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Paypal script.

Fu Manchu

Sepultra™
Joined
Jan 28, 2011
Messages
439
Reaction score
9
I'm using the paypal script from the the shop system andres created. Basicly it only had one option for payment amounts. I'm trying to make it so there are multiple.

example


PHP:
<select name="amount">
  <option value="5.00">5 USD</option>
  <option value="10.00">10 USD</option>
  <option value="20.00">20 USD</option>
</select>

This part was removed from the gesior script. Now I'm trying to figure out how to add it to this.

PHP:
<?php

$config['donations']['methods'] = array('ContenidoPago' => false, 'PayPal' => true);

$config['donations']['paypal'] = array('Mail' => '[email protected]', 'Points' => 6, 'Product' => 'Donation for VipHera', 'Money' => 'EUR', 'Amount' => 1);

$config['donations']['contenidopago'] = array('Product' => '1347', 'Points' => 4);

?>

If any one has any idea please let me know. This website is the only thing holding me up from progress atm. Any thoughts or any questions feel free to ask. thx guys

Side note: Im pretty sure i could tell another script not to read that file. And add that first set of code to another file and it work. But I'm not sure. It's from an htm file. And I'm trying to add it into a php.
 
Last edited:
Thats in ipn?


<?php
if ($_REQUEST['debug']) {
ini_set("display_errors", True);
error_reporting(E_ALL);
}
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'root'; //DB User
$mysql_pass = 'Password'; //DB Pass
$mysql_db = 'DB name'; //DB Name
$file = 'paypal.log'; //Paypal Log Name will be placed in the same location as your ipn.php file
$payer_email = $_REQUEST['payer_email'];
$ip = $_SERVER['REMOTE_ADDR'];
if($ip != "66.211.170.66" && $ip != "216.113.188.202" && $ip != "216.113.188.203" && $ip != "216.113.188.202") {
print "Scammer...";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a");
$paylist = array("1.00" => 10, "2.00" => 25, "3.00" => 40);

// connect db

$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);

$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));
$receiver_email = $_REQUEST['receiver_email'];
$payment_status = $_REQUEST['payment_status'];
$mc_gross = $_REQUEST['mc_gross'];
mysql_select_db($mysql_db, $db);
if ($_REQUEST['debug']){
print $payment_status . '\n';
print (isset($paylist[$mc_gross])) ? 1 : 0 . '\n';
print $receiver_email . '\n';
print $custom . '\n';
}
if ($payment_status == "Completed" && $receiver_email == "[email protected]" && isset($paylist[$mc_gross])) {

$query = "SELECT premium_points FROM accounts WHERE accounts.name = '$custom'";

$result = mysql_query($query);

$prem = mysql_fetch_array($result);
$somecode = "'$time' '$custom' '$payer_email' '$mc_gross' '$ip'\r\n";

// figure out how much to give
$give = $paylist[$mc_gross];
$points = $prem['premium_points'] + $give;
// $points = mysql_query($prem)
$qry2 = "UPDATE accounts SET premium_points = '$points' WHERE accounts.name = '$custom'";
// Log Paypal Transaction
$hak = fopen($file, "a");
fwrite($hak, $somecode);
fclose($hak);

$result2 = mysql_query($qry2);
}
else
{
echo("Error.");
}
?>
 
Back
Top