What's new

Account Maker Paypal - blacklista maili

Status
Not open for further replies.

Arkam

Forum friend
Joined
Dec 20, 2008
Messages
1,980
Reaction score
180
Hi, jako ?e jestem pehapowym zerem musz? napisa? posta ;[
Ot?? jaki? niedorozwini?ty g?owon?g od jakiego? czasu robi sobie cofki po 1-2 tyg z paypala a to 15 a to 20$ no i trzeba tasiemca zlikwidowa?, a ?e delete wszystkich jego postaci nie pomog?o mus?e pozby? si? ?r?d?a problemu, mianowicie potrzebuje zablokowa? w skrypcie paypala dawanie premium points?w w przypadku gdy p?atno?? wysy?ana jest z danego maila.

Nieruszany skrypt paypala:
Code:
<?php
if(!defined('INITIALIZED'))
    exit;


require_once('./custom_scripts/paypal/config.php');
/*
 * PayPal IPN IPs (it can change in future)
 * https://ppmts.custhelp.com/app/answers/detail/a_id/92
 * search: notify.paypal.com (IPN delivery) 
*/
if(!in_array($_SERVER['REMOTE_ADDR'], array('173.0.81.1','173.0.81.33','66.211.170.66')))
{
    echo 'wrong IP';
    exit;
}
$receiverMail = $_REQUEST['receiver_email']; // ots admin mail
$status = $_REQUEST['payment_status']; // payment status, we add only when is 'Completed'
$currency = $_REQUEST['mc_currency']; // money currency, like USD or EUR
$gross = $_REQUEST['mc_gross']; // amount of money, like: 10.00
$payerMail = $_REQUEST['payer_email']; // player mail
$accountID = $_REQUEST['custom']; // user account ID
$transactionID = $_REQUEST['txn_id']; // transaction ID


$logFile = 'custom_scripts/paypal/reported_ids/' . $transactionID . '.log';
if(!file_exists($logFile) && $status == 'Completed')
{
    foreach($paypals as $pay)
    {
        if($receiverMail == $pay['mail'] && $currency == $pay['money_currency'] && $gross == $pay['money_amount'])
        {
            $account = new Account($accountID);
            if($account->isLoaded())
            {
                if(file_put_contents($logFile, 'accountID:' . $accountID . ',mail:' . $payerMail . ',amount:' . $gross . ' ' . $currency . ',points:' . $pay['premium_points']) !== false)
                {
                    $account->setPremiumPoints($account->getPremiumPoints() + $pay['premium_points']);
                    $account->save();
                }
            }
            break;
        }
    }
}
exit;

A tutaj pr?bowa?em doda? co? ale po tym jak to doda?em to nikt nie otrzymywa? pp a to tez nie jest moim celem xD

Code:
<?phpif(!defined('INITIALIZED'))
	exit;


require_once('./custom_scripts/paypal/config.php');
/*
 * PayPal IPN IPs (it can change in future)
 * https://ppmts.custhelp.com/app/answers/detail/a_id/92
 * search: notify.paypal.com (IPN delivery) 
*/
if(!in_array($_SERVER['REMOTE_ADDR'], array('173.0.81.1','173.0.81.33','66.211.170.66')))
{
	echo 'wrong IP';
	exit;
}
$receiverMail = $_REQUEST['receiver_email']; // ots admin mail
$status = $_REQUEST['payment_status']; // payment status, we add only when is 'Completed'
$currency = $_REQUEST['mc_currency']; // money currency, like USD or EUR
$gross = $_REQUEST['mc_gross']; // amount of money, like: 10.00
$payerMail = $_REQUEST['payer_email']; // player mail
$accountID = $_REQUEST['custom']; // user account ID
$transactionID = $_REQUEST['txn_id']; // transaction ID


$blockedMail = 'testmail@gmail.com';




$logFile = 'custom_scripts/paypal/reported_ids/' . $transactionID . '.log';
if(!file_exists($logFile) && $status == 'Completed')
{
	foreach($paypals as $pay)
	{
		if($receiverMail == $pay['mail'] && $currency == $pay['money_currency'] && $gross == $pay['money_amount'] && $payerMail != $blockedMail)
		{
			$account = new Account($accountID);
			if($account->isLoaded())
			{
				if(file_put_contents($logFile, 'accountID:' . $accountID . ',mail:' . $payerMail . ',amount:' . $gross . ' ' . $currency . ',points:' . $pay['premium_points']) !== false)
				{`
					$account->setPremiumPoints($account->getPremiumPoints() + $pay['premium_points']);
					$account->save();
				}
			}
			break;
		}
	}
}
exit;

Jakie? pomys?y why to nie dzia?a ew jak poprawi?? 100 reput?w dla tego kto ma jaki? pomys? xd
 

keno kerania

Active User
Joined
Mar 2, 2015
Messages
95
Reaction score
3
Odp: Paypal - blacklista maili

//edit
?le zrozumia?em skrypt, delete
 
Last edited:

SanninStory

https://www.twitch.tv/sdrn
Joined
Oct 13, 2012
Messages
1,778
Reaction score
119
Odp: Paypal - blacklista maili

[MENTION=430263]Azuusiek[/MENTION]
Obadaj spraw? ;)
 

Arkam

Forum friend
Joined
Dec 20, 2008
Messages
1,980
Reaction score
180
Odp: Paypal - blacklista maili

ale serio jak kto? nie potrafi przeczyta? ze zrozumieniem tego skryptu to niech nie spami w tym temacie xd
 

Placek

Blue Waffle
Joined
Sep 30, 2008
Messages
6,793
Reaction score
672
Age
9
Odp: Paypal - blacklista maili

Nie znam sie na pehapie...
Ale moze jakos tak:
PHP:
<?php
if(!defined('INITIALIZED'))
    exit;


require_once('./custom_scripts/paypal/config.php');
/*
 * PayPal IPN IPs (it can change in future)
 * https://ppmts.custhelp.com/app/answers/detail/a_id/92
 * search: notify.paypal.com (IPN delivery) 
*/
if(!in_array($_SERVER['REMOTE_ADDR'], array('173.0.81.1','173.0.81.33','66.211.170.66')))
{
    echo 'wrong IP';
    exit;
}
$receiverMail = $_REQUEST['receiver_email']; // ots admin mail
$status = $_REQUEST['payment_status']; // payment status, we add only when is 'Completed'
$currency = $_REQUEST['mc_currency']; // money currency, like USD or EUR
$gross = $_REQUEST['mc_gross']; // amount of money, like: 10.00
$payerMail = $_REQUEST['payer_email']; // player mail
$accountID = $_REQUEST['custom']; // user account ID
$transactionID = $_REQUEST['txn_id']; // transaction ID


$logFile = 'custom_scripts/paypal/reported_ids/' . $transactionID . '.log';
if(!file_exists($logFile) && $status == 'Completed')
{
    foreach($paypals as $pay)
    {
        if($receiverMail == $pay['mail'] && $currency == $pay['money_currency'] && $gross == $pay['money_amount'])
        {
            $account = new Account($accountID);
            if($account->isLoaded())
            {
                if(file_put_contents($logFile, 'accountID:' . $accountID . ',mail:' . $payerMail . ',amount:' . $gross . ' ' . $currency . ',points:' . $pay['premium_points']) !== false)
                {
                  if(!in_array($payerMail, array('a@mail.com','b@mail.com')))
                  {
                      $account->setPremiumPoints($account->getPremiumPoints() + $pay['premium_points']);
                      $account->save();
                  }
                }
            }
            break;
        }
    }
}
exit;
?

Poza tym, jak ci nie dziala twoje rozwiazanie ani to, to moze sprawdz jakims echem co wlasciwie zwraca payer mail i metode porownywania, bo moze samo != nie wydziala dobrze i przydalo by sie !== albo jakies moetody typu x.equals(y)...
 
Last edited:

Tuchol1992

Advanced User
Joined
Aug 3, 2010
Messages
256
Reaction score
20
Odp: Paypal - blacklista maili

PHP:
if(in_array($payerMail, array('testmail@gmail.com', 'anotherTestmail@gmail.com', 'and1more@gmail.com')))
{
    echo 'Blocked email!';
    exit;
}
 

Arkam

Forum friend
Joined
Dec 20, 2008
Messages
1,980
Reaction score
180
Odp: Paypal - blacklista maili

ok thz, sprawdz? jutro bo nie mam nikogo online z paypalem a nie da si? kupowa? czego? samemu od siebie xd
 
Status
Not open for further replies.
Top