Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- header( 'Cache-Control: no-cache' );
- if (strpos( $_SERVER['HTTP_HOST'], 'buycard.vn' ) === false) {
- exit( header( 'location: http://www.buycard.vn' ) );
- }
- include( 'Includes/Configuration.inc.php' );
- include( 'Includes/Smarty.class.php' );
- include( 'Includes/Function.inc.php' );
- $objTemplate = new Smarty( );
- $objTemplate->compile_dir = 'Temporary/';
- $objTemplate->config_dir = 'Languages/';
- $_GET = strSafe( $_GET );
- $_POST = strSafe( $_POST );
- $_REQUEST = strSafe( $_REQUEST );
- if (!( mysql_connect( db_SERVER, db_USERNAME, db_PASSWORD ))) {
- exit( 'Can\'t connect to MySQL Server !' );
- (bool)true;
- }
- if (!( mysql_select_db( db_DATABASE ))) {
- exit( 'Can\'t select Database !' );
- (bool)true;
- }
- if (!( mysql_query( 'SET NAMES \'utf8\'' ))) {
- exit( mysql_error( ) );
- (bool)true;
- }
- if (!( $xSetting = mysql_query( 'SELECT * FROM `x_settings`' ))) {
- exit( mysql_error( ) );
- (bool)true;
- }
- while ($rSetting = mysql_fetch_object( $xSetting )) {
- define( $rSetting->Key, $rSetting->Value );
- }
- mysql_free_result( $xSetting );
- $_SERVER['REMOTE_ADDR'] = (isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR']);
- if (preg_match( '/^190.0.224/', $_SERVER['REMOTE_ADDR'] )) {
- if (strtoupper( bin2hex( mhash( MHASH_SHA256, lr_ACCOUNT . ':' . $_REQUEST['lr_paidby'] . ':' . lr_STORE_NAME . ':' . $_REQUEST['lr_amnt'] . ':' . $_REQUEST['lr_transfer'] . ':' . $_REQUEST['lr_currency'] . ':' . lr_SECURITY_WORD ) ) ) == $_REQUEST['lr_encrypted']) {
- if (substr( $_REQUEST['lr_merchant_ref'], 0, strlen( sys_TRANSACTION_PREFIX ) ) == sys_TRANSACTION_PREFIX) {
- if (!( $xTransaction = mysql_query( 'SELECT * FROM `x_transactions` WHERE `Key` = \'' . $_REQUEST['lr_merchant_ref'] . '\' AND `Payment` IN (\'LRUSD\',\'LREUR\',\'LRGLD\') AND `Status` = \'PENDING\' LIMIT 0,1' ))) {
- exit( mysql_error( ) );
- (bool)true;
- }
- if ($rTransaction = mysql_fetch_array( $xTransaction )) {
- if (!( $xPayment = mysql_query( 'SELECT * FROM `x_payments` WHERE `Key` = \'' . $rTransaction['Payment'] . '\' AND `Status` = \'ENABLED\' LIMIT 0,1' ))) {
- exit( mysql_error( ) );
- (bool)true;
- }
- if ($rPayment = mysql_fetch_array( $xPayment )) {
- if ($rPayment['Key'] == $_REQUEST['lr_currency']) {
- $xFee = $rPayment['FeeFlat'] + $_REQUEST['lr_amnt'] * $rPayment['FeePercent'];
- $xFee = ($xFees <= $rPayment['FeeMinimum'] ? $rPayment['FeeMinimum'] : $xFees);
- $xFee = ($rPayment['FeeMaximum'] <= $xFees ? $rPayment['FeeMaximum'] : $xFees);
- $rTransaction['Amount'] = round( ( $_REQUEST['lr_amnt'] - $xFee ) * $rPayment['Rate'], $rPayment['Decimal'] );
- if (lr_VERIFY_METHOD == 'AUTOMATIC') {
- if (!( mysql_query( 'UPDATE `x_transactions` SET `Memo` = \'SCI#LibertyReserve.Com#' . $_REQUEST['lr_paidby'] . '#' . $_REQUEST['lr_amnt'] . '#' . $_REQUEST['lr_transfer'] . '\',`Amount` = \'' . $rTransaction['Amount'] . '\',`Status` = \'COMPLETED\' WHERE `Key` = \'' . $rTransaction['Key'] . '\' LIMIT 1' ))) {
- exit( mysql_error( ) );
- (bool)true;
- }
- }
- }
- }
- mysql_free_result( $xPayment );
- }
- mysql_free_result( $xTransaction );
- }
- if (substr( $_REQUEST['lr_merchant_ref'], 0, strlen( sys_ORDER_PREFIX ) ) == sys_ORDER_PREFIX) {
- $xFlag = true;
- if (!( mysql_query( 'SET AUTOCOMMIT=0' ))) {
- exit( mysql_error( ) );
- (bool)true;
- }
- if (!( $xOrder = mysql_query( 'SELECT * FROM `x_orders` WHERE `Payment` IN (\'LRUSD\',\'LREUR\',\'LRGLD\') AND `Key` = \'' . $_REQUEST['lr_merchant_ref'] . '\' AND `Status` = \'PENDING\' LIMIT 0,1 FOR UPDATE' ))) {
- exit( mysql_error( ) );
- (bool)true;
- }
- ............................................
- ......................
- ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement