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

[GESIOR] Working Paypal script!

Starrly

IT Engineer
Joined
Mar 27, 2008
Messages
112
Reaction score
13
I encountered lots of problems while installing the PHP script, there are no working scripts around here.
After a few days of hard thinking i finally succeeded, so i wanted to share the script

[OTLAND DISCLAIMER TO PREVENT RAGE REPLY'S].
The latest part in the first file (paypal.htm) about the terms, is made possible by This Thread.
Please do note, I did not create this script, and i am not sure who did. I just editted parts of it and combined a few, therefor it works! If u actually do know the persons who made this script, PM me, so i can put his name in this thread.
Those steps are based on Gesior ACC 2012 1.0.0 BETA, 1.0.1 claims to have a working PayPal script, if u cant get that one to work, try this one, there might be some difference in directory's @ ur FTP, just figure out where the files belong, it isnt that hard.
[/OTLAND DISCLAIMER TO PREVENT RAGE REPLY'S]

Step 1:
Put the following script in your main directory (the one with all the maps in it).
Name it: Paypal.htm

HTML:
<b>Infernal Dawn donation system.</b><br><br>
U will receive points (read: gift) as a thank you, u can spend these points in our online shop system:<ul><li> 5 EUR 300 points</li><li> 10 EUR for 650 points</li><li> 20 EUR for 1400 points</li><li>40 EUR for 3000 points!</li><br>

<b>Here are the steps you need to make:</b> <br>
1. A PayPal account with a required balance [5, 10, 20 or 40 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 300, 650, 1400 or 3000 points will be automatically added to your account. <br>
6. Go to Item shop and use your points <br> <br> <br> </b>

<span style="color:red">Incase u entered a wrong account name, or u didnt receive the donation points, contact us on the forums. Include ur Paypal Email in the board post.</span>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="YOUR PAYPAL EMAIL">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Donation Points">
<b>Account name/login:</b> <input type="text"  name="custom" value="">

<select name="amount">
  <option value="5.00">5 EUR</option>
  <option value="10.0">10 EUR</option>
  <option value="20.0">20 EUR</option>
  <option value="40.0">40 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="0">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="notify_url" value="http://YOUR IP OR DOMAIN/ipn/ipn.php">
<input type="hidden" name="return" value="http://YOUR IP OR DOMAIN">
<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.paypalobjects.com/en_US/i/btn/btn_donateCC_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>
<br>
<br>
<center><font size="4"><b>By pressing the donate button you automaticly agree to these terms.</b></font>
<br>
<br>
<br><TEXTAREA ROWS="18" WRAP="physical" COLS="80" READONLY="true" font-family="verdana">
1. Definition of donating
You agree that you are using it of your own free will and independent of any expectation of any item in return. Your payment is not a payment, and not an exchange for a good or service. It is currently the policy to reward those who donate with certain in-game items. However, these items are not being purchased or bought in any way; they are merely a gift given by us, the server staff. We do not sell any good or service, and relies on payments to offset administration and server fees; therefore any item you may receive from us will be considered a gift and not a tangible good or an exchange of any kind.

2. Payment Rewards
You understand that if the item you receive as a donation is lost, broken, unusable, or unwanted, you will not be entitled to a refund. Your payment is not an exchange for any reward, so all gifts are completely non-refundable.  We reserves the right to pursue any legal or collection action necessary to recover damages in the event of a forced charge-back. We reserves the right to not give you the items back if there was an rollback in the server which caused u an lost of ur items/points. And we reserves the right reset the server and delete all the items whenever we want.

3. Right to Change Prices
We reserves the right to change, with or without notice, the gifts given to those who donate to the server. In the event that you have donated for an item and such a change occurs, you will not be refunded anything. 

4. Indemnification
You agree to indemnify and harmless the staff, owners, hosts, advertisers, officers, directors, employees, partners, and all other parties related to this servers staff, By agreeing to these terms, you agree not to present any lawsuit or other legal challenge against the server staff for any reason, whether related to using this service or not.

5. Disclaimer of warranties
You understand and agree that your use of this website and any services or content provided is made available and provided to you at your own risk. It is provided to you as-is and we expressly disclaim all warranties of any kind, expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. We make no warranty, implied or express, that any part of the service will be uninterrupted, error-free, virus-free, timely, secure, accurate, reliable, of any quality, nor that any content is safe in any manner for download. You understand and agree that neither us nor any participant in the service provides professional advice of any kind and thus use of such advice or any other information is solely at your own risk and without our liability of any kind. Some jurisdictions may not allow disclaimers of implied warranties and the above disclaimer may not apply to you only as it relates to implied warranties.

6. Limitation of liability
You expressly understand and agree that we shall not be liable for any direct, indirect, special, incidental, consequential or exemplary damages, including but not limited to, damages for loss of profits, goodwill, use, data or other intangible loss (even if we have been advised of the possibility of such damages), resulting from or arising out of (I) The use of or the inability to use the service, (II) The cost to obtain substitute goods and/or services resulting from any transaction entered into on trough the service, (III) Unauthorized access to or alternation of your data transmissions, (IV) Statements or conduct of any third party on the service, or (V) any other matter relating to the service. Note that by accepting the terms in the document, you are also waiving your right, to take any action, legal or otherwise, against anyone or anything related to the staff, management, administrators, members, owners, Legendaria/Ethania Hosting or any other hosts of this server. You furthermore acknowledge that if any part of this document is found to be invalid or unenforceable in any way, any parts not found to be invalid or unenforceable will be considered fully valid and binding. 
</TEXTAREA><br>

Step 2
Make a new directory in your main directory, called "ipn".
After that, make a new file called: ipn.php in the directory u just created.

PHP:
<?php
if ($_REQUEST['debug']) {
ini_set("display_errors", True);
error_reporting(E_ALL);
}
$mysql_host = 'localhost'; //Leave at localhost  
$mysql_user = 'YOUR DB USERNAME'; //DB User  
$mysql_pass = 'YOUR DB PASSWORD'; //DB Pass  
$mysql_db = 'YOUR 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'];
$ips = array('173.0.81.1','173.0.81.33','66.211.170.66');
if(!in_array($ip, $ips)) {
	print "Scammer.. Your IP has been logged and forwarded to the server owner.";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a"); 
$paylist = array("5.00" => 500, "10.00" => 1000, "20.00" => 2000, "40.00" => 3000);

// 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 PAYPAL EMAIL" && 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.");  
 }  
?>
Remember to edit the files, put in ur DB information & paypal email.
PS:
zemiex said:
Won't work with old Gesior ACC's. Try this query instead on line 42 of ipn.php
Code:
$qry2 = "UPDATE accounts SET premium_points = premium_points + {$paylist[$mc_gross]} WHERE name = '$custom'";

Step 3
Create a file called paypal.php and put it in ur "pages" directory.

PHP:
<?PHP
$content = file_get_contents("paypal.htm");
if($content != FALSE)
	$main_content .= $content;
else
	$main_content .= 'Can not load file <b>paypal.htm</b> or file is empty.';
?>

Do not forget to configure ur paypal account to send IPN messages to ur IPN.php file (http://www.yourdomain.net/ipn/ipn.php)

It should work, atleast it did for me.
If u encounter any problems, do not hesitate to reply to this thread.

Cheers!
Starrly
 
Last edited:
Can I know where to edit the points that will recieve for x amount of this paypal system?
Cuz I don't find it!

- - - Updated - - -

Removed

- - - Updated - - -

I didn't see the all the step 2, sorry :p!

- - - Updated - - -

Can I know how to see who donated? cuz in the IPN says all fine, but a PPL who donated told me that he didn't recieved the points.
I whant to know where i can see wich accont he have put,
Thanks in advance.
 
Go to your Paypal Account -> "IPN History"
Now click the IPN number that belongs to the transfer, and search for &transaction_subject=
The name displayed there is the name he entered.
This might be added to the script later, but im kinda busy at the moment :)
 
@Starrly
Replace IPs list in IPN script with:
PHP:
array('173.0.81.1','173.0.81.33','66.211.170.66')
In your list miss 173.0.81.33 and it's one of 3 PayPal IPN servers IPs.
https://ppmts.custhelp.com/app/answers/detail/a_id/92 said:
...
------------notify.paypal.com (IPN delivery)------------
173.0.81.1
173.0.81.33
66.211.170.66
...
 
Won't work with old Gesior ACC's. Try this query instead on line 42 of ipn.php
Code:
$qry2 = "UPDATE accounts SET premium_points = premium_points + {$paylist[$mc_gross]} WHERE name = '$custom'";
 
Is there anyway to make it blend in with the website?

- - - Updated - - -

Did nt add points automaticly ...
Paypal.htm
PHP:
<b>Lightonia donation system.</b><br><br>
You will receive points as a thank you, You can spend these points in our online shop system:<ul><li> 5 EUR 300 points</li><li> 10 EUR for 650 points</li><li> 20 EUR for 1400 points</li><li>40 EUR for 3000 points!</li><br>

<b>Here are the steps you need to make:</b> <br>
1. A PayPal account with a required balance [5, 10, 20 or 40 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 300, 650, 1400 or 3000 points will be automatically added to your account. <br>
6. Go to Item shop and use your points <br> <br> <br> </b>

<span style="color:red">Incase u entered a wrong account name, or u didnt receive the donation points, contact us on the forums. Include ur Paypal Email in the board post.</span>

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

<select name="amount">
  <option value="5.00">5 EUR</option>
  <option value="10.0">10 EUR</option>
  <option value="20.0">20 EUR</option>
  <option value="40.0">40 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="0">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="notify_url" value="http://lightonia.servegame.com/ipn/ipn.php">
<input type="hidden" name="return" value="http://lightonia.servegame.com">
<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.paypalobjects.com/en_US/i/btn/btn_donateCC_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>
<br>
<br>
<center><font size="4"><b>By pressing the donate button you automaticly agree to these terms.</b></font>
<br>
<br>
<br><TEXTAREA ROWS="18" WRAP="physical" COLS="80" READONLY="true" font-family="verdana">
1. Definition of donating
You agree that you are using it of your own free will and independent of any expectation of any item in return. Your payment is not a payment, and not an exchange for a good or service. It is currently the policy to reward those who donate with certain in-game items. However, these items are not being purchased or bought in any way; they are merely a gift given by us, the server staff. We do not sell any good or service, and relies on payments to offset administration and server fees; therefore any item you may receive from us will be considered a gift and not a tangible good or an exchange of any kind.

2. Payment Rewards
You understand that if the item you receive as a donation is lost, broken, unusable, or unwanted, you will not be entitled to a refund. Your payment is not an exchange for any reward, so all gifts are completely non-refundable.  We reserves the right to pursue any legal or collection action necessary to recover damages in the event of a forced charge-back. We reserves the right to not give you the items back if there was an rollback in the server which caused u an lost of ur items/points. And we reserves the right reset the server and delete all the items whenever we want.

3. Right to Change Prices
We reserves the right to change, with or without notice, the gifts given to those who donate to the server. In the event that you have donated for an item and such a change occurs, you will not be refunded anything. 

4. Indemnification
You agree to indemnify and harmless the staff, owners, hosts, advertisers, officers, directors, employees, partners, and all other parties related to this servers staff, By agreeing to these terms, you agree not to present any lawsuit or other legal challenge against the server staff for any reason, whether related to using this service or not.

5. Disclaimer of warranties
You understand and agree that your use of this website and any services or content provided is made available and provided to you at your own risk. It is provided to you as-is and we expressly disclaim all warranties of any kind, expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. We make no warranty, implied or express, that any part of the service will be uninterrupted, error-free, virus-free, timely, secure, accurate, reliable, of any quality, nor that any content is safe in any manner for download. You understand and agree that neither us nor any participant in the service provides professional advice of any kind and thus use of such advice or any other information is solely at your own risk and without our liability of any kind. Some jurisdictions may not allow disclaimers of implied warranties and the above disclaimer may not apply to you only as it relates to implied warranties.

6. Limitation of liability
You expressly understand and agree that we shall not be liable for any direct, indirect, special, incidental, consequential or exemplary damages, including but not limited to, damages for loss of profits, goodwill, use, data or other intangible loss (even if we have been advised of the possibility of such damages), resulting from or arising out of (I) The use of or the inability to use the service, (II) The cost to obtain substitute goods and/or services resulting from any transaction entered into on trough the service, (III) Unauthorized access to or alternation of your data transmissions, (IV) Statements or conduct of any third party on the service, or (V) any other matter relating to the service. Note that by accepting the terms in the document, you are also waiving your right, to take any action, legal or otherwise, against anyone or anything related to the staff, management, administrators, members, owners, Legendaria/Ethania Hosting or any other hosts of this server. You furthermore acknowledge that if any part of this document is found to be invalid or unenforceable in any way, any parts not found to be invalid or unenforceable will be considered fully valid and binding. 
</TEXTAREA><br>
ipn/ipn.php
PHP:
 <?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('173.0.81.1','173.0.81.33','66.211.170.66');
if(!in_array($ip, $ips)) {
    print "Scammer.. Your IP has been logged and forwarded to the server owner.";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a"); 
$paylist = array("5.00" => 300, "10.00" => 650, "20.00" => 1400, "40.00" => 3000);

// 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 PAYPAL EMAIL" && 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.");  
 }  
?>
 
So not much longer after i added this new paypal,
Someone donated and i thought this system was automatic adding points but did not.
Its for sure better then what i had before still not auto how can i fix this?
 
All works 100% automatic now thanks i guess i rushed into this and missed the IPN part :)
 
Some one from sweden having the same problem saying this at the end of paying
Code:
Vi har för närvarande tekniska problem med betalkortsprocessorn på PayPals webbplats. Vi försöker lösa problemet så fort som möjligt. Återgå till PayPals webbplats senare för att slutföra transaktionen. Vi ber om ursäkt för eventuella besvär det kan orsaka.
 
Back
Top