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

need help with IPN.php

<?php
$paypal_report_url = 'yoursite.wtf/paypal_report';
$paypal_return_url = 'yoursite.wtf/?subtopic=shopsystem';
$paypal_image = 'https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif';
$paypal_payment_type = '_xclick'; // '_xclick' (Buy Now) or '_donations'

$paypals[0]['mail'] = '[email protected]'; // your paypal login
$paypals[0]['name'] = 'Donate for 69 points on Anonimousera OT';
$paypals[0]['money_amount'] = '69.00';
$paypals[0]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?...t_ID=developer/e_howto_api_nvp_currency_codes
$paypals[0]['premium_points'] = 6900; // how much points
 
Code:
<?  
$mysql_host = '127.0.0.1'; // Leave at localhost  
$mysql_user = 'root'; // DB User  
$mysql_pass = 'CHANGETHISSHIT'; // DB Pass  
$mysql_db = 'CHANGETHISTOO'; // 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']))));  
$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'";

// connect db  

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

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

$result = mysql_query($query);  

$prem = mysql_fetch_array($result);  

$points = $prem['premium_points'] + 20;  
// $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