Advertisement
Guest User

Untitled

a guest
Jun 15th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 09.06.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. header( 'Cache-Control: no-cache' );
  15.  
  16. if (strpos( $_SERVER['HTTP_HOST'], 'buycard.vn' ) === false) {
  17. exit( header( 'location: http://www.buycard.vn' ) );
  18. }
  19.  
  20. include( 'Includes/Configuration.inc.php' );
  21. include( 'Includes/Smarty.class.php' );
  22. include( 'Includes/Function.inc.php' );
  23. $objTemplate = new Smarty( );
  24. $objTemplate->compile_dir = 'Temporary/';
  25. $objTemplate->config_dir = 'Languages/';
  26. $_GET = strSafe( $_GET );
  27. $_POST = strSafe( $_POST );
  28. $_REQUEST = strSafe( $_REQUEST );
  29.  
  30. if (!( mysql_connect( db_SERVER, db_USERNAME, db_PASSWORD ))) {
  31. exit( 'Can\'t connect to MySQL Server !' );
  32. (bool)true;
  33. }
  34.  
  35.  
  36. if (!( mysql_select_db( db_DATABASE ))) {
  37. exit( 'Can\'t select Database !' );
  38. (bool)true;
  39. }
  40.  
  41.  
  42. if (!( mysql_query( 'SET NAMES \'utf8\'' ))) {
  43. exit( mysql_error( ) );
  44. (bool)true;
  45. }
  46.  
  47.  
  48. if (!( $xSetting = mysql_query( 'SELECT * FROM `x_settings`' ))) {
  49. exit( mysql_error( ) );
  50. (bool)true;
  51. }
  52.  
  53.  
  54. while ($rSetting = mysql_fetch_object( $xSetting )) {
  55. define( $rSetting->Key, $rSetting->Value );
  56. }
  57.  
  58. mysql_free_result( $xSetting );
  59. $_SERVER['REMOTE_ADDR'] = (isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : $_SERVER['REMOTE_ADDR']);
  60.  
  61. if (preg_match( '/^190.0.224/', $_SERVER['REMOTE_ADDR'] )) {
  62. 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']) {
  63. if (substr( $_REQUEST['lr_merchant_ref'], 0, strlen( sys_TRANSACTION_PREFIX ) ) == sys_TRANSACTION_PREFIX) {
  64. 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' ))) {
  65. exit( mysql_error( ) );
  66. (bool)true;
  67. }
  68.  
  69.  
  70. if ($rTransaction = mysql_fetch_array( $xTransaction )) {
  71. if (!( $xPayment = mysql_query( 'SELECT * FROM `x_payments` WHERE `Key` = \'' . $rTransaction['Payment'] . '\' AND `Status` = \'ENABLED\' LIMIT 0,1' ))) {
  72. exit( mysql_error( ) );
  73. (bool)true;
  74. }
  75.  
  76.  
  77. if ($rPayment = mysql_fetch_array( $xPayment )) {
  78. if ($rPayment['Key'] == $_REQUEST['lr_currency']) {
  79. $xFee = $rPayment['FeeFlat'] + $_REQUEST['lr_amnt'] * $rPayment['FeePercent'];
  80. $xFee = ($xFees <= $rPayment['FeeMinimum'] ? $rPayment['FeeMinimum'] : $xFees);
  81. $xFee = ($rPayment['FeeMaximum'] <= $xFees ? $rPayment['FeeMaximum'] : $xFees);
  82. $rTransaction['Amount'] = round( ( $_REQUEST['lr_amnt'] - $xFee ) * $rPayment['Rate'], $rPayment['Decimal'] );
  83.  
  84. if (lr_VERIFY_METHOD == 'AUTOMATIC') {
  85. 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' ))) {
  86. exit( mysql_error( ) );
  87. (bool)true;
  88. }
  89. }
  90. }
  91. }
  92.  
  93. mysql_free_result( $xPayment );
  94. }
  95.  
  96. mysql_free_result( $xTransaction );
  97. }
  98.  
  99.  
  100. if (substr( $_REQUEST['lr_merchant_ref'], 0, strlen( sys_ORDER_PREFIX ) ) == sys_ORDER_PREFIX) {
  101. $xFlag = true;
  102.  
  103. if (!( mysql_query( 'SET AUTOCOMMIT=0' ))) {
  104. exit( mysql_error( ) );
  105. (bool)true;
  106. }
  107.  
  108.  
  109. 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' ))) {
  110. exit( mysql_error( ) );
  111. (bool)true;
  112. }
  113. ............................................
  114. ......................
  115. ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement