• 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 acc Paypal problem with points

Exedras

New Member
Joined
Jun 1, 2009
Messages
12
Reaction score
0
Hello, i have a problem with point. The script work good, payment is online but didnt added the points to the account, someone can help?

ipn.php
PHP:
<?php
if ($_REQUEST['debug']) {
ini_set("display_errors", true);
error_reporting(E_ALL);
}

// GIVE HERE YOUR DB INFO

$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'root'; //DB User
$mysql_pass = 'password'; //DB Pass
$mysql_db = 'naruto'; //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" && $ip != "173.0.81.1" && $ip != "notify.paypal.com" && $ip != "73.0.81.33" && $ip != "173.0.81.33" ) {
    print "Acess restricted";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a");
// REMEBER THERE ARE DOTS AND TWO ZEROS
$paylist = array("0.01" => 500, "10.20" => 1000, "20.70" => 2000, "40.80" => 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'];

// currency

$currency =  $_REQUEST['mc_currency'];

$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 (isset($paylist[$mc_gross])) ? 1 : 0 . '\n';
print $receiver_email . '\n';
print $custom . '\n';
}
// GIVE HERE YOUR MAIL
if ($payment_status == "Completed" && $receiver_email == "[email protected]" && $currency == "EUR" && isset($paylist[$mc_gross]))
{

    $query = "SELECT premium_points FROM accounts WHERE accounts.id = '$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.id = '$custom'";
    // Log Paypal Transaction
    $hak = fopen($file, "a");
    fwrite($hak, $somecode);
    fclose($hak);
    $result2 = mysql_query($qry2);

}

else
{
echo("Error.");
}
?>

config php:
PHP:
<?php
$paypal_report_url = 'http://51.83.135.212/ipn/ipn.php'; // <-- url to ipn
$paypal_return_url = 'http://51.83.135.212/?subtopic=shopsystem'; // shop
$paypal_image = 'https://www.paypalobjects.com/en_US/i/btn/btn_paynow_LG.gif';
$paypal_payment_type = '_xclick'; // '_xclick' (Buy Now) or '_donations'

$paypals[0]['mail'] = '[email protected]'; // your paypal MAIL
$paypals[0]['name'] = '50 Premium points 1,20 EUR';
$paypals[0]['money_amount'] = '0.35';
$paypals[0]['money_currency'] = 'PLN'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
$paypals[0]['premium_points'] = 50;

$paypals[1]['mail'] = '[email protected]'; // your paypal MAIL
$paypals[1]['name'] = '100 Premium points 2,40 EUR';
$paypals[1]['money_amount'] = '2.4';
$paypals[1]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
$paypals[1]['premium_points'] = 100;

$paypals[2]['mail'] = '[email protected]'; // your paypal login
$paypals[2]['name'] = '200 Premium points 4,40 EUR';
$paypals[2]['money_amount'] = '4.4';
$paypals[2]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
$paypals[2]['premium_points'] = 200;

$paypals[3]['mail'] = '[email protected]'; // your paypal MAIL
$paypals[3]['name'] = '400 Premium points 8,00 EUR';
$paypals[3]['money_amount'] = '8';
$paypals[3]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
$paypals[3]['premium_points'] = 400;

paypal.php:
PHP:
<?php
if(!defined('INITIALIZED'))
    exit;

if($logged)
{
    require_once('./custom_scripts/paypal/config.php');


    echo '<style>
    table
    {
    border-collapse:collapse;
    }
    table, td, th
    {
    border:1px solid black;
    }
    </style>';

    echo '<table class="tabelapaypal" text-align="center" cellpadding="15" >

<tr><td colspan="2"><h2>Automatic PayPal shop system</h2><br><b>Here are the steps you need to make:</b><br>
    1. You need a valid creditcard <b>or</b> a PayPal <a href="https://www.paypal.com/signup/account">Create Paypal account</a>account with a required amount of money.<br>
    2. Choose how many points you want buy.<br />
    3. Click on the donate/buy button.<br>
    4. Make a transaction on PayPal.<br>
    5. After the transaction points will be automatically added to your account.<br>
    6. Go to Item shop Shop and use your points.</b><br /><br /><br /><br /></td></tr>



    <tr><td style="width:100%; table-layout: fixed; height: 50px;" colspan="2" ><b>Select offer:</b></td></tr>



    ';
    foreach($paypals as $paypal)
    {
        echo '<tr "><td>Buy ' . $paypal['premium_points'] . ' premium points for ' . $paypal['money_amount'] . ' ' . $paypal['money_currency'] . '</td><td style="text-align:center"><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
        <input type="hidden" name="cmd" value="' . $paypal_payment_type . '">
        <input type="hidden" name="business" value="' . $paypal['mail'] . '">
        <input type="hidden" name="item_name" value="' . htmlspecialchars($paypal['name']) . '">
        <input type="hidden" name="custom" value="' . $account_logged->getID() . '">
        <input type="hidden" name="amount" value="' . htmlspecialchars($paypal['money_amount']) . '">
        <input type="hidden" name="currency_code" value="' . htmlspecialchars($paypal['money_currency']) . '">
        <input type="hidden" name="no_note" value="0">
        <input type="hidden" name="no_shipping" value="1">
        <input type="hidden" name="notify_url" value="' . $paypal_report_url . '">
        <input type="hidden" name="return" value="' . $paypal_return_url . '">
        <input type="hidden" name="rm" value="0">
        <input type="image" src="' . $paypal_image . '" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
        </form></td></tr> ';


    }
    echo '</table> <br><br><br><br>';
}
else
    echo 'You are not logged in. Login first to buy points.';
 
Last edited:

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,387
Solutions
45
Reaction score
1,860
Location
Poland
GitHub
gesior
In case of Gesior2012 your 'IPN' (report url) should be:
Code:
http://51.83.135.212/paypal_report.php
and DISABLE IPN on paypal (if you enabled it), because it blocks default Gesior2012 paypal script.
Gesior2012 uses 'report url', not 'IPN'.
 

Kadres

Member
Joined
May 18, 2016
Messages
35
Reaction score
17
In case of Gesior2012 your 'IPN' (report url) should be:
Code:
http://51.83.135.212/paypal_report.php
and DISABLE IPN on paypal (if you enabled it), because it blocks default Gesior2012 paypal script.
Gesior2012 uses 'report url', not 'IPN'.
Have the same problem.. with same script.
this didn't help, someone...?
 
Top