Script PaymentWall
#71
i will post my working one soon if i find time to..

#72


i will post my working one soon if i find time to..

 

You should do this, will stop all the PM's I get. I don't like nor use paymentwall and cba with all the slow contact BS from them which is why I not bothered with this script.

I dont know why Wiz or anyone has fixed this yet.

#73

well yeah i found my fixxed one in a package but this package is still released so it shouldnt be the problem but make sure that ure configs in it are correctly filled and ure databases are named like newproject_xxx

 

and anyways u shouldnt be that sure that paymentwall want u to be their partner most of the times i tried the risk team rated me too bad ..

 

 

here it is

 

 

<?php

error_reporting(E_ALL);

ini_set('display_errors', '1');

 

include '../site_configs/con_set.php';

 

$ip = $_SERVER['REMOTE_ADDR'];

 

$allowIP[0] = '';

$allowIP[1] = '';

$allowIP[2] = '';

$allowIP[3] = '';

$allowIP[4] = '';

$allowIP[5] = '';

$allowIP[6] = '';

 

if( in_array($ip, $allowIP) )

{

 

function Sanitize($data)

{

 

// remove whitespaces (not a must though)

$data = trim($data);

 

// apply stripslashes if magic_quotes_gpc is enabled

if(get_magic_quotes_gpc())

{

$data = stripslashes($data);

}

 

// a mySQL connection is required before using this function

$data = mysql_real_escape_string($data);

 

return $data;

}

 

function BanUser($uid, $reason)

{

include '../site_configs/con_set.php';

$mysql = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("UPDATE t_users SET a_enable = 0 WHERE a_portal_index = '". $uid ."'") or die( mysql_error() );

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("INSERT INTO t_banlist (a_user_index, a_timestamp, a_reason, a_admin_name, a_action)

VALUES ('". $uid ."','". time() ."','". $reason ."','Paymentwall','BAN')") or die( mysql_error() );

}

 

function AddCash($uid, $amount, $ref)

{

include '../site_configs/con_set.php';

$mysql = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("UPDATE newproject_db_auth.bg_user SET cash = cash + ". $amount ." WHERE user_code = '". $uid ."'") or die( mysql_error() );

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("INSERT INTO t_donate_log (a_user_index, a_timestamp, a_points, a_gm, a_ref)

VALUES('". $uid ."','".time()."','". $amount ."','Paymentwall','". $ref ."')") or die( mysql_error() );

}

 

function RemCash($uid, $amount, $ref)

{

include '../site_configs/con_set.php';

$mysql = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("UPDATE bg_user SET cash = cash + ". addslashes( $amount )." WHERE user_code = '". addslashes( $uid ) ."'") or die( mysql_error() );

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("INSERT INTO t_donate_log (a_user_index, a_timestamp, a_points, a_gm, a_ref)

VALUES('". $uid ."','".time()."','". $amount ."','Paymentwall','". $ref ."')") or die( mysql_error() );

}

 

 

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result22 = mysql_query("SELECT a_secretkey from t_settings WHERE a_index = 1");

$key = mysql_fetch_array( $result22 );

 

$secretKey = $key['a_secretkey'];

 

$uid = Sanitize( $_GET['uid'] );

$currency = Sanitize( $_GET['currency'] );

$type = Sanitize( $_GET['type'] );

$ref = Sanitize( $_GET['ref'] );

$sig = Sanitize( $_GET['sig'] );

 

$pingback = 1;

$mysql = mysql_select_db( $SiteSQL["config-database_auth"] , $Site_sqlcon) or die( mysql_error() );

$query = sprintf("SELECT count(*) FROM bg_user WHERE user_code = '%s';", $uid);

$result = mysql_query($query) or die( mysql_error() );

$r = mysql_fetch_row( $result );

 

if( $r[0] == 1 )

{

 

 

if( $type == 0 || $type == 1 ) // Add cash

{

AddCash($uid, $currency, $ref);

echo 'OK';

}

 

 

// --> Chargeback

elseif( $type == 2 )

{

 

$reason = $_GET['reason'];

 

switch( $reason )

{

case 1:

BanUser($uid,'Chargeback',$ref);

break;

case 2:

BanUser($uid,'Credit Card fraud',$ref);

break;

case 3:

BanUser($uid,'Order fraud',$ref);

break;

case 4:

BanUser($uid,'Bad data entry',$ref);

break;

case 5:

BanUser($uid,'Fake / proxy user',$ref);

break;

case 6:

BanUser($uid,'Rejected by advertiser',$ref);

break;

case 7:

BanUser($uid,'Duplicate conversions',$ref);

break;

case 8:

BanUser($uid,'Goodwill credit taken back',$ref);

break;

case 9:

BanUser($uid,'Cancelled order',$ref);

break;

case 10:

BanUser($uid,'Partially reversed transaction',$ref);

break;

 

 

 

}

 

RemCash($uid, $currency);

echo 'OK';

 

 

}

// <---

 

 

 

}

else

{

echo 'Not found user '. $uid;

}

 

 

}

else

{

echo 'No Access : ' . $_SERVER['REMOTE_ADDR'];

}

 

?>

 

In the area of paymentwall where u can add ure path to the pingback it has to be like this:

 

http'://www.yoursite.com/pingback/pingback.php

 

so u have to create an subfolder for ure website wich is called like u want and there has to be only the pingbackfile in format ".php" dont use html or htm or stuff like that it needs to be .php

 

 

in the ip fields u need to fill in the paymentwall pingbackips u can find them here:

 

2

 

on page 5

 

thoose are the right ones too:

 

 

 

174.36.92.186

174.36.96.66

174.36.92.187

174.36.92.192

174.37.14.28

 

u will need to have the con_set.php too thats no matter in any version of max site (the newer ones need to readd the con_set.php)

for the ones they need it here is the phpcode:

 

 

<?php//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

// Edit these variables to your own settings

//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

 

// Add all needed website setting below:

$SiteSQL["config-server"] = 'localhost'; // Mysql Ip

$SiteSQL["config-username"] = 'root'; // Mysql Username

$SiteSQL["config-password"] = ''; // Mysql Password

$SiteSQL["config-database_auth"] = 'newproject_db_auth'; // Auth Database Name

$SiteSQL["config-database_db"] = 'newproject_db'; // Db Database Name

$SiteSQL["config-database_data"] = 'newproject_data'; // Data Database Name

$SiteSQL["config-database_site"] = 'newproject_site'; // Website Database Name

 

 

 

/*

* IMPORTANT :

* Set this value "Your Salt Here" to something else.

* This is vital for the security!

* Never share this salt with anyone!

* Salt is used to encrypt passwords.

*/

 

$config["Salt"] = '';

 

 

 

 

 

 

//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

// STOP HERE!!! NO MORE EDITS BELOW

//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

$Site_sqlcon = mysql_connect( $SiteSQL["config-server"] , $SiteSQL["config-username"] , $SiteSQL["config-password"] ) or die( mysql_error() );

 

$mysql = mysql_select_db( $SiteSQL["config-database_site"] , $Site_sqlcon) or die( mysql_error() );

$result = mysql_query("SELECT a_page_title, a_forum_link, a_login_server_ip, a_login_server_port, a_game_server_ip, a_billing_server_ip, a_game_server_port, a_billing_server_port, a_donation_sys from t_settings WHERE a_index = 1");

$result1 = mysql_fetch_array( $result );

$PageTitle = $result1['a_page_title'];

$forumlink = $result1['a_forum_link'];

$donatelink = $result1['a_donation_sys'];

$LoginServerIP = $result1['a_login_server_ip'];

$GameServerIP = $result1['a_game_server_ip'];

$BillingServerIP = $result1['a_billing_server_ip'];

$LoginPort = $result1['a_login_server_port'];

$GameServerPort = $result1['a_game_server_port'];

$BillingServerPort = $result1['a_billing_server_port'];

 

?>

 

 

the path has to be: yorsitefolder/site_configs/con_set.php

 

 

Hope i helped u

 

Greetz Creep

 

A Thx would be nice!

#74
thatmany views not even 1 like... really nice guys... reaaallly nice -.-'

#75

thatmany views not even 1 like... really nice guys... reaaallly nice -.-
have no time to check it, but thanks Wink

#76

hi  somone can help please with pingback 

if i make www.xxxxxxxx/pingback.php

i get thes error

 

Warning: include(../site_configs/con_set.php): failed to open stream: No such file or directory in /var/www/html/pingback.php on line 5 Warning: include(): Failed opening ../site_configs/con_set.php for inclusion (include_path=.:/usr/share/pear:/usr/share/php) in /var/www/html/pingback.php on line 5 No Access : 85.180.223.91

 

 

and if i go to test Pingback in paymenwall i get thes error here

 

HTTP/1.0 200 OK

Date: Sat, 17 Aug 2013 17:26:31 GMT
Server: Apache/2.2.15 (CentOS)
X-powered-by: PHP/5.3.3
Content-length: 583
Content-type: text/html; charset=UTF-8
Connection: close
 
 
Warning: include(../site_configs/con_set.php): failed to open stream: No such file or directory in /var/www/html/pingback.php on line 5
 
Warning: include(): Failed opening ../site_configs/con_set.php for inclusion (include_path=.:/usr/share/pear:/usr/share/php) in /var/www/html/pingback.php on line 5
 
Notice: Undefined variable: SiteSQL in /var/www/html/pingback.php on line 69
 
Notice: Undefined variable: Site_sqlcon in /var/www/html/pingback.php on line 69
 
Warning: mysql_select_db() expects parameter 2 to be resource, null given in /var/www/html/pingback.php on line 69
#77

../site_configs/con_set.php

 

Suggests your using my pingback which will only work on my cms, where you get it from?? and its failing cos it cant find that file and also its very very old pingback lol

 

Warning: mysql_select_db()

 

Not PDO an thats how i code php now.

#78

i get that from youre old hompage premium ep1 i buy it from you 

 

and how to fix that please



Forum Jump:


Users browsing this thread: 1 Guest(s)