• 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!

About paypal set up ( HELP ).

Kaywin

Lord of War WoW/Tibia 2D
Joined
Oct 24, 2008
Messages
541
Reaction score
6
Location
SwedeN
Have I set up everything right? will the players get the points?

xampp/htdocs/paypal/paypal.php

PHP:
<b>PayPal Shop System.</b><br><br>
The shop costs:<ul><li> 3 EUR (for 700 points)</li><li> 6 EUR (for 1200 points)</li><li> 15 EUR (for 2950 points)</li><br>

<b>Here are the steps you need to make:</b> <br>
1. A PayPal account with a required balance [3, 6 or 15 EUR] or a creditcard. <br>
2. Fill in your account number. <br>
3. Click on the Buy Now button or your creditcard brand. <br>
4. Make a transaction. <br>
5. After the transaction 700, 1200 or 2950 points will be automatically added to your account. <br>
6. Go to Shop offer and use your points <br> <br> <br> </b>

<span style="color:red">If you recall the money and your premiumpoints your account will be deleted</span>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="XXX Premium points">
<b>Account name/login:</b> <input type="text"  name="custom" value="">

<select name="amount">
  <option value="3.00">3 EUR</option>
  <option value="6.00">6 EUR</option>
  <option value="15.00">15 EUR</option>
</select>
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="notify_url" value="http://dreamot.sytes.net/paypal/ipn/ipn.php">
<input type="hidden" name="return" value="http://dreamot.sytes.net/">
<input type="hidden" name="rm" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

What about
<input type="hidden" name="item_name" value="XXX Premium points">
??
C:\xampp\htdocs\paypal\ipn
PHP:
<?php
// Coiler's database logs, version: 1.1
// Paypal script made by Stian
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 = 'grisarflyger'; //DB Pass  
$mysql_db = 'dreamot'; //DB Name  
$your_email = '[email protected]'; //Put the paypal mail you use here.
$currency = 'EUR'; //Put the currency your using here, should be the same as the one in paypal.htm
$paylist = array("5.00" => 7, "10.00" => 15, "20.00" => 32); // price and amount of points like: "5.00" => 7 where 5.00 is the price (euro or your currency) and 7 is the amount of points.


$payer_email = $_REQUEST['payer_email']; 
$ip = $_SERVER['REMOTE_ADDR'];
$ips = array('66.211.170.66', '216.113.188.202', '216.113.188.203', '216.113.188.204', '216.113.188.205', '66.135.197.163', '66.135.197.164', ' 66.135.197.162',  '66.135.197.141', '216.113.191.33');
if(!in_array($ip, $ips)) {
    print "Scammer...";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a"); 


// 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']; 
$mc_currency = $_REQUEST['mc_currency'];
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 == $your_email && isset($paylist[$mc_gross]) && $mc_currency == $currency) {   
$query = mysql_query("SELECT id, premium_points FROM accounts WHERE accounts.name = '$custom'");  
$prem = mysql_fetch_array($query);

$qry2 = "UPDATE accounts SET premium_points = premium_points + {$paylist[$mc_gross]} WHERE name = '$custom'";  

// Log Paypal Transaction 
$executepaypallog = "INSERT INTO `z_shop_points_bought` (`id`, `amount`, `type`, `accountid`, `code`, `paypalmail`, `date`) VALUES (NULL , '".$paylist[$mc_gross]."', 'Paypal', '".$prem['id']."', '".$mc_gross."', '".$payer_email."',CURRENT_TIMESTAMP);";

//Everything looks fine, add points and log them.
$result2 = mysql_query($qry2);  
$log_data = mysql_query($executepaypallog);
}  
else  
 {   
 echo("Error.");  
 }  
?>
 
Last edited:
Oh all right, well you could start by changing the
Code:
 tags to [php] tags for easier reading.
 
Back
Top