• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Lua Paypal Shop/buy points

mozax20100

New Member
Joined
Sep 19, 2019
Messages
20
Reaction score
4
Hello Everyone
Can Anyone help About Script paypal/Website
i can pay Easy but player don`t Get points?
i use otx

Gesior htdocs​



<?php
if(!$logged)
if($action == "logout")
$main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url(tibiacom/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Logout Successful</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have logged out of your '.$config['server']['serverName'].' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td></tr> </table> </div> </table></div></td></tr>';
else
$main_content .= 'Enter your account and password to login.<br/><a href="?subtopic=createaccount" >Cria Sua Conta</a> Caso Você não tenha criado ainda.<br/><br/><form action="?subtopic=accountmanagement" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Login</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>';
else
{
$main_content .= '

<br><table width="100%" border="2" cellpadding="4" cellspacing="1">

<tbody><tr>

<td class="white" colspan="3" bgcolor="#505050"><span class="style4">Points details.</span></td>



</tr>

<tr bgcolor="#f1e0c6"><td width="35%"><b>Number of Points </b></td><td width="35%"><b>Donation Amount</b></td></tr>

<tr bgcolor="#d4c0a1"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 10 Points</td><td>$1,00</td></tr>



<tr bgcolor="#f1e0c6"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 30 Points</td><td>$10,00</td></tr>

<tr bgcolor="#d4c0a1"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 70 Points</td><td>$20,00</td></tr>

<tr bgcolor="#f1e0c6"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 100 Points</td><td>$35,00</td></tr>

<tr bgcolor="#d4c0a1"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 150 Points</td><td>$50,00</td></tr>

<tr bgcolor="#f1e0c6"><td><center><img src="./layouts/tibiacom/images/content/bullet.gif"> And so on!!! <img src="./layouts/tibiacom/images/content/bullet.gif"></center></td><td><center><img src="./layouts/tibiacom/images/content/bullet.gif"> And so on!!! <img src="./layouts/tibiacom/images/content/bullet.gif"></center></td></tr>

</tbody></table>
<br></br>

<b>Automatic PayPal Donation System.</b><br><br>

<b>Here are the steps you need to make:</b> <br>
1. You need a valid creditcard <b>or</b> a PayPal account with a required balance.<br>
2. Click on the Checkout button. <br>
3. Make a transaction on PayPal. <br>
4. Go to Item shop and use your points <br>
<table border="2"><tbody><tr border="2"><td bgcolor="#505050">

<center><font size="2"><b></b></font></center>

<div style="width: 0%">


<form method="post" target="_new" action="Digital Wallets, Money Management, and More (https://www.paypal.com/cgi-bin/webscr)" name="LOGIN" class="formulario" style="width: 450px; margin: 0 0 10px 0; float: left;">

<p>
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="custom" value="'.$_SESSION['account'] .'" >
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="Points">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="currency_code" value="Usd">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="notify_url" value="http://0.0.0.0/paypal/ipn/ipn.php">
<input type="hidden" name="return" value="http://0.0.0.0/">
<input type="hidden" name="rm" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">


<input type="hidden" name="item_quant_1" value="1">

<br><table border="2"><tbody><tr border="2"><td width="153" bgcolor="#505050" class="white"><span class="style11 style4"><strong>Payment amount:</strong></span></td>

</tr></tbody></table>

<table border="0"><tbody><tr border="2">

<td width="96" bgcolor="grey"><label>

<select name="amount" id="item_valor_1" tabindex="2">

<option selected>Select</option>

<option value="1.00">100 Points</option>

<option value="10.00">30 Points</option>

<option value="20.00">70 Points</option>

<option value="35.00">100 Points</option>

<option value="50.00">150 Points</option>


</select>

</label></td>

</tr></tbody></table>


</td>
</tr>
<br>

<br>

<input type="hidden" name="item_frete_1" value="000">

<br>

<table border="2"><tbody><tr border="2"><td bgcolor="#505050"><input type="submit" value="Checkout"></td></tr></tbody></table>

</p>

<div></div>

<tr>
</tr>
</tbody></table></form>'; } ?>
 

mano368

Intermediate OT User
Joined
Sep 2, 2011
Messages
354
Solutions
35
Reaction score
143
Location
Brazil
Apl/You can send Money in paypal
but 0 points player

ithink my script have a problem
Have you set your nip in paypal account?

Login in paypal > configutation > seller tools(or something like that) > instant payment notification

And be sure that youre using an updated version
 

Boy67

Veteran OT User
Joined
Jul 4, 2007
Messages
484
Solutions
26
Reaction score
394
HTML:
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="custom" value="'.$_SESSION['account'] .'" >
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="Points">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="currency_code" value="Usd">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="notify_url" value="http://0.0.0.0/paypal/ipn/ipn.php">
<input type="hidden" name="return" value="http://0.0.0.0/">
<input type="hidden" name="rm" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">

Your configuration has multiple problems. Depending on the web system you are using(znote/gesior/myacc), they will have config files which you will need to edit the necessary paypal user data for, such as your business email.

As you can see the IPN doesn't know where to return the data as http://0.0.0.0/paypal/ipn/ipn.php clearly isn't where your IPN php file is located.
 

Boy67

Veteran OT User
Joined
Jul 4, 2007
Messages
484
Solutions
26
Reaction score
394
OP
OP
M

mozax20100

New Member
Joined
Sep 19, 2019
Messages
20
Reaction score
4
you can check my ipn?
Lua:
<?php
$mysql_host = 'localhost'; //Leave at localhost 
$mysql_user = 'root'; //DB User 
$mysql_pass = '0000'; //DB Pass 
$mysql_db = 'otserv'; //DB Name 
$file = 'paypal.log'; //Paypal Log Name will be placed in the same location as your ipn.php file
$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom'])))); 

 parse_str($custom,$custom_vars);


$receiver_email = $_REQUEST['receiver_email']; 
$payment_status = $_REQUEST['payment_status']; 
$mc_gross = $_REQUEST['mc_gross']; 
$payer_email = $_REQUEST['payer_email'];

$somecode = "'$custom' '$payer_email' '$mc_gross' ";

file_put_contents('filename.txt', $_REQUEST  );

// connect db 

$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass); 
mysql_select_db($mysql_db, $db); 
if ($payment_status == "Completed" AND $receiver_email == "[email protected]" ) { 

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

$result = mysql_query($query); 

$prem = mysql_fetch_array($result); 

if( $mc_gross > 0 AND $mc_gross < 50) {
    $points = $prem['premium_points'] + ( $mc_gross *2);       
}elseif($mc_gross == 50 ){
    $points = $prem['premium_points'] + 110;           
}
// $points = mysql_query($prem) 
$qry2 = "UPDATE accounts SET premium_points = '$points' WHERE accounts.id = '".$custom."'"; 
$somecode .= $custom;
// Log Paypal Transaction
$hak = fopen($file, "a");
fwrite($hak, $somecode);
fclose($hak);

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

Attachments

Joker Man

Member
Joined
Nov 7, 2021
Messages
48
Reaction score
11
Test Ipn.php
GOOD

Lua:
<?php
if ($_REQUEST['debug']) {
ini_set("display_errors", True);
error_reporting(E_ALL);
}
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = '~'; //DB User
$mysql_pass = '~'; //DB Pass
$mysql_db = '~'; //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'];
$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");
$paylist = array("2.00" => 5, "4.00" => 10,"8.00" => 20, "12.00" => 30);

// 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 == "[email protected]" && isset($paylist[$mc_gross]) && $mc_currency == "EUR") {
$somecode = "'$time' '$custom' '$payer_email' '$mc_gross' '$ip'\r\n";

$qry2 = "UPDATE `accounts` SET `premium_points` = `premium_points` + {$paylist[$mc_gross]} WHERE `name` = '$custom'";
// Log Paypal Transaction
$hak = fopen($file, "a");
fwrite($hak, $somecode);
fclose($hak);

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

mozax20100

New Member
Joined
Sep 19, 2019
Messages
20
Reaction score
4
Ineed Help
paypal work pay but don`t give points
some one can help me?


Lua:
<?php
if(!$logged)
if($action == "logout")
$main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url(tibiacom/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Logout Successful</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have logged out of your '.$config['server']['serverName'].' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td></tr> </table> </div> </table></div></td></tr>';
else
$main_content .= 'Enter your account and password to login.<br/><a href="?subtopic=createaccount" >Cria Sua Conta</a> Caso Você não tenha criado ainda.<br/><br/><form action="?subtopic=accountmanagement" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Login</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>';
else
{
$main_content .= '  
 
<br><table width="100%" border="2" cellpadding="4" cellspacing="1">
 
<tbody><tr>
 
  <td class="white" colspan="3" bgcolor="#505050"><span class="style4">Points details.</span></td>
 
 
 
</tr>
 
<tr bgcolor="#f1e0c6"><td width="35%"><b>Number of Points </b></td><td width="35%"><b>Donation Amount</b></td></tr>
 
<tr bgcolor="#d4c0a1"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 30 Points</td><td>$2,00</td></tr>
 
 
 
<tr bgcolor="#f1e0c6"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 150 Points</td><td>$5,00</td></tr>
 
<tr bgcolor="#d4c0a1"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 300 Points</td><td>$10,00</td></tr>
 
<tr bgcolor="#f1e0c6"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 700 Points</td><td>$20,00</td></tr>
 
<tr bgcolor="#f1e0c6"><td><center><img src="./layouts/tibiacom/images/content/bullet.gif"> And so on!!! <img src="./layouts/tibiacom/images/content/bullet.gif"></center></td><td><center><img src="./layouts/tibiacom/images/content/bullet.gif"> And so on!!! <img src="./layouts/tibiacom/images/content/bullet.gif"></center></td></tr>
 
</tbody></table>
<br></br>
 
<b>Automatic PayPal Donation System.</b><br><br>
 
<b>Here are the steps you need to make:</b> <br>
1. You need a valid creditcard <b>or</b> a PayPal account with a required balance.<br>
2. Click on the Checkout button. <br>
3. Make a transaction on PayPal. <br>
4. Go to Item shop and use your points <br>
<table border="2"><tbody><tr border="2"><td bgcolor="#505050">
 
<center><font size="2"><b></b></font></center>
 
<div style="width: 0%">
 
 
<form method="post" target="_new" action="https://www.paypal.com/cgi-bin/webscr" name="LOGIN" class="formulario" style="width: 450px; margin: 0 0 10px 0; float: left;">
 
<blockquote>
 
<img src="http://inchoo.net/wp-content/uploads/2011/03/paypal.jpg" alt="" width="300" height="100" /></p>
  <b>PayPal Donation System.</b><br><br>
  <br>
  <b><i><font face="Verdana" size="1" color="red">S</font></i></b><i><b><font size="1" face="Verdana" color="red">ome
  of the conversions for those who want to calculate:<br>
&nbsp;&nbsp;&nbsp; * 1 USD = 1.00 USD (US Dollar)<br>
&nbsp;&nbsp;&nbsp; * 1 USD = 1.00 CAD (Canadian Dollar)<br>
&nbsp;&nbsp;&nbsp; * 1 USD = 1.00 BAM (Bosnian Convertible Mark)<br>
&nbsp;&nbsp;&nbsp; * 1 USD = 1.00 GBP (British Pound)</font></b></i><br>
  <br>
 
<b>Here are the steps you need to follow in order to make a donation:</b> <br>
1. Have a PayPal account with required balance  or a creditcard. <br>
2. Fill in your account name. <br>
3. Click on the <u><font color="#red">Buy Now</font></u> button or your creditcard brand. <br>
4. Make a transaction. <br>
5. After the transaction points will be automatically added to your account. <br> <br> </b>
 
<span style="color:red">We reserve the right to terminate all gifts (otherwise
  the whole account) if the donated money is charged back. (recalled)</span>
</blockquote>
 
<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="premium_points">
<b>Account name/login:</b> <input type="text"  name="custom" value="" size="20">
 
<select name="amount">
      <option value="0.01">10 Points</option>
      <option value="10.00">30 Points</option>
      <option value="20.00">70 Points</option>
      <option value="35.00">100 Points</option>
      <option value="50.00">150 Points</option>
 
</select>
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="notify_url" value="http://20.199.9.7/paypal/ipn/ipn.php">
<input type="hidden" name="return" value="http://example">
<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!" width="147" height="47">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
 
 
                                </select>

  </label></td>
 
</tr></tbody></table>
 
 
</td>
</tr>
<br>
 
<br>
 
<input type="hidden" name="item_frete_1" value="000">
 
<br>
 
</p>
 
<div></div>
 
<tr>
</tr>
</tbody></table></form>'; } ?>
 
OP
OP
M

mozax20100

New Member
Joined
Sep 19, 2019
Messages
20
Reaction score
4
I don't know how to solve the problem, someone can help
Lua:
<?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 = '0000'; //DB Pass 
$mysql_db = 'otserv'; //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'];
$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");
$paylist = array("0.01" => 10, "5.00" => 150,"10.00" => 300, "20.00" => 700);

// 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 == "[email protected]" && isset($paylist[$mc_gross]) && $mc_currency == "EUR") {
$somecode = "'$time' '$custom' '$payer_email' '$mc_gross' '$ip'\r\n";

$qry2 = "UPDATE `accounts` SET `premium_points` = `premium_points` + {$paylist[$mc_gross]} WHERE `name` = '$custom'"; 
// Log Paypal Transaction
$hak = fopen($file, "a");
fwrite($hak, $somecode);
fclose($hak);

$result2 = mysql_query($qry2); 
} 
else 
 {   
 echo("Error."); 
 } 
?>
Code:
<?php
if(!$logged)
if($action == "logout")
$main_content .= '<div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url(tibiacom/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Logout Successful</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td>You have logged out of your '.$config['server']['serverName'].' account. In order to view your account you need to <a href="?subtopic=accountmanagement" >log in</a> again.</td></tr> </table> </div> </table></div></td></tr>';
else
$main_content .= 'Enter your account and password to login.<br/><a href="?subtopic=createaccount" >Cria Sua Conta</a> Caso Você não tenha criado ainda.<br/><br/><form action="?subtopic=accountmanagement" method="post" ><div class="TableContainer" > <table class="Table1" cellpadding="0" cellspacing="0" > <div class="CaptionContainer" > <div class="CaptionInnerContainer" > <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <div class="Text" >Account Login</div> <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span> <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span> <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span> </div> </div> <tr> <td> <div class="InnerTableContainer" > <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Name:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr> </table> </div> </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>';
else
{
$main_content .= '   
 
<br><table width="100%" border="2" cellpadding="4" cellspacing="1">
 
<tbody><tr>
 
  <td class="white" colspan="3" bgcolor="#505050"><span class="style4">Points details.</span></td>
 
 
 
</tr>
 
<tr bgcolor="#f1e0c6"><td width="35%"><b>Number of Points </b></td><td width="35%"><b>Donation Amount</b></td></tr>
 
<tr bgcolor="#d4c0a1"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 30 Points</td><td>$2,00</td></tr>
 
 
 
<tr bgcolor="#f1e0c6"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 150 Points</td><td>$5,00</td></tr>
 
<tr bgcolor="#d4c0a1"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 300 Points</td><td>$10,00</td></tr>
 
<tr bgcolor="#f1e0c6"><td><img src="./layouts/tibiacom/images/content/bullet.gif"> 700 Points</td><td>$20,00</td></tr>
 
<tr bgcolor="#f1e0c6"><td><center><img src="./layouts/tibiacom/images/content/bullet.gif"> And so on!!! <img src="./layouts/tibiacom/images/content/bullet.gif"></center></td><td><center><img src="./layouts/tibiacom/images/content/bullet.gif"> And so on!!! <img src="./layouts/tibiacom/images/content/bullet.gif"></center></td></tr>
 
</tbody></table>
<br></br>
 
<b>Automatic PayPal Donation System.</b><br><br>
 
<b>Here are the steps you need to make:</b> <br>
1. You need a valid creditcard <b>or</b> a PayPal account with a required balance.<br>
2. Click on the Checkout button. <br>
3. Make a transaction on PayPal. <br>
4. Go to Item shop and use your points <br>
<table border="2"><tbody><tr border="2"><td bgcolor="#505050">
 
<center><font size="2"><b></b></font></center>
 
<div style="width: 0%">
 
 
<form method="post" target="_new" action="https://www.paypal.com/cgi-bin/webscr" name="LOGIN" class="formulario" style="width: 450px; margin: 0 0 10px 0; float: left;">
 
<blockquote>
 
<img src="http://inchoo.net/wp-content/uploads/2011/03/paypal.jpg" alt="" width="300" height="100" /></p>
  <b>PayPal Donation System.</b><br><br>
  <br>
  <b><i><font face="Verdana" size="1" color="red">S</font></i></b><i><b><font size="1" face="Verdana" color="red">ome
  of the conversions for those who want to calculate:<br>
&nbsp;&nbsp;&nbsp; * 1 USD = 1.00 USD (US Dollar)<br>
&nbsp;&nbsp;&nbsp; * 1 USD = 1.00 CAD (Canadian Dollar)<br>
&nbsp;&nbsp;&nbsp; * 1 USD = 1.00 BAM (Bosnian Convertible Mark)<br>
&nbsp;&nbsp;&nbsp; * 1 USD = 1.00 GBP (British Pound)</font></b></i><br>
  <br>
 
<b>Here are the steps you need to follow in order to make a donation:</b> <br>
1. Have a PayPal account with required balance  or a creditcard. <br>
2. Fill in your account name. <br>
3. Click on the <u><font color="#red">Buy Now</font></u> button or your creditcard brand. <br>
4. Make a transaction. <br>
5. After the transaction points will be automatically added to your account. <br> <br> </b>
 
<span style="color:red">We reserve the right to terminate all gifts (otherwise
  the whole account) if the donated money is charged back. (recalled)</span>
</blockquote>
 
<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="points">
<b>Account name/login:</b> <input type="text"  name="custom" value="" size="20">
 
<select name="amount">
      <option value="2.00">30 Points</option>
      <option value="5.00">150 Points</option>
      <option value="10.00">300 Points</option>
      <option value="30.00">900 Points</option>
      <option value="40.00">1300 Points</option>
 
</select>
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="notify_url" value="http://20.199.9.7/paypal/ipn/ipn.php">
<input type="hidden" name="return" value="http://example">
<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!" width="147" height="47">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
 
 
                                </select>
 
  </label></td>
 
</tr></tbody></table>
 
 
</td>
</tr>
<br>
 
<br>
 
<input type="hidden" name="item_frete_1" value="000">
 
<br>
 
</p>
 
<div></div>
 
<tr>
</tr>
</tbody></table></form>'; } ?>
 

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,834
Solutions
92
Reaction score
2,984
Location
Poland
GitHub
gesior
@mozax20100
What acc. maker do you use?
Gesior2012 has included PayPal integration. You don't need any extra ipn.php to make it work. Just edit config in custom_scripts/paypal/config.php and enable shop system in config/config.php.
 
Top