![]() |
|
Script PaymentWall - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Website Scripting & Security (https://lckb.dev/forum/forumdisplay.php?fid=197) +---- Forum: Security (https://lckb.dev/forum/forumdisplay.php?fid=164) +----- Forum: Website Security (https://lckb.dev/forum/forumdisplay.php?fid=141) +----- Thread: Script PaymentWall (/showthread.php?tid=960) |
- barroso - 07-28-2012 i need to send an e-mail? - Wizatek - 07-29-2012 Don't be afraid to contact them - barroso - 07-29-2012 ok I'll talk with them more if not sure I turn to you to help me, because I've never done this kind of contract with any company - barroso - 08-02-2012 thanks a lot I got it today thanks wizatek - Creep - 08-05-2012 how to install the script to the website? - fonsy84 - 08-10-2012 Copy and paste this code prepare( $query ); $dbh->execute( array( ':uid' => $uid )); } // Add the cash to the account. // In case of a drawback or fraud paymentwall deletes the cash also // But since they use a negative amount, this will work perfectly function SetCash($uid, $amount) { global $dbs, $db; $query = sprintf (" UPDATE %s.bg_user SET cash = cash + :amount WHERE user_code = :uid ", $dbs['user_dbase'] ); $dbh = $db->prepare( $query ); $dbh->execute( array( ':amount' => $amount, ':uid' => $uid )); } // Function to check if the user exists function CheckUserExist( $uid ) { global $dbs, $db; $query = sprintf (" SELECT count(*) FROM %s.bg_user WHERE user_code = :uid ", $dbs['user_dbase'] ); $dbh = $db->prepare( $query ); $dbh->execute( array( ':uid' => $uid )); $result = $dbh->fetch(); if( $result[0] == 1 ) return true; else return false; } $uid = $_GET['uid']; $currency = $_GET['currency']; $type = $_GET['type']; $ref = $_GET['ref']; $sig = $_GET['sig']; // Check the incomming data if( !ctype_digit( $uid ) ) echo 'UID: ' . htmlspecialchars( $uid ) . ' is not a number'; elseif( !is_numeric( $currency ) ) echo 'Currency: ' . htmlspecialchars( $currency ) . ' is not a number'; elseif( !ctype_digit( $type ) ) echo 'Type: ' . htmlspecialchars( $type ) . ' is not a number'; elseif( !ctype_alnum($ref) ) echo 'Reference: ' . htmlspecialchars( $ref ) . ' can only contain 0-9 a-Z'; elseif( !ctype_alnum($sig) ) echo 'Signature: ' . htmlspecialchars( $sig ) . ' can only contain 0-9 a-Z'; else { // See if the userid exists if( CheckUserExist( $uid ) ) { // Add the cash to the user if( $type == 0 || $type == 1 ) { SetCash($uid, $currency); echo 'OK'; } // Chargeback or Fraud elseif( $type == 2 ) { $reason = $_GET['reason']; switch( $reason ) { case 1: BanUser($uid,'Chargeback'); break; case 2: BanUser($uid,'Credit Card fraud'); break; case 3: BanUser($uid,'Order fraud'); break; case 4: BanUser($uid,'Bad data entry'); break; case 5: BanUser($uid,'Fake / proxy user'); break; case 6: BanUser($uid,'Rejected by advertiser'); break; case 7: BanUser($uid,'Duplicate conversions'); break; case 8: BanUser($uid,'Goodwill credit taken back'); break; case 9: BanUser($uid,'Cancelled order'); break; case 10: BanUser($uid,'Partially reversed transaction'); break; } // Remove the cash SetCash($uid, $currency); echo 'OK'; } else echo 'Unknown type : ' . htmlspecialchars( $type ); } else echo 'Not found user : ' . htmlspecialchars($uid); } } else echo 'IP Unknown : ' . $ip; ?> in notepad and create folder inside web example: www.lalalalal.com/donation/pingback.php , and later u have insert "paymentwall code in your web site " - Creep - 08-12-2012 i just get the a white page with the code as text is that normal? - olo3007 - 08-12-2012 i just get the a white page with the code as text is that normal? Same here :/ anyone would like to answer us? - barroso - 08-21-2012 u need save as .php - Creep - 08-23-2012 its what i did but well.. yeah it calls out some fails like unexspected } or anything like that.. |