/* Decoded by unphp.net */ '
'; $log = fopen("psb.txt","w"); fputs($log,print_r($_POST,true)); require_once("config.php"); require_once(DB_INIT_PATH); require_once("core/inc/category.class.php"); require_once("inc/order.php"); $order = $_POST['ORDER']; var_dump($order); if (!$order){ fputs($log,"ÐÑибка по номеÑÑ Ð·Ð°ÐºÐ°Ð·Ð° $order"); echo "ÐÑибка по номеÑÑ Ð·Ð°ÐºÐ°Ð·Ð° $order"; exit(); } $orderData = getOrder($dbh,$order); $key = '38155EFD426017A368EDA0524DDDEF2F'; $hmac = strlen($_POST['AMOUNT']).$_POST['AMOUNT'] .strlen($_POST['CURRENCY']).$_POST['CURRENCY'] .strlen($_POST['ORDER']).$_POST['ORDER'] .strlen($_POST['MERCH_NAME']).$_POST['MERCH_NAME'] .strlen($_POST['MERCHANT']).$_POST['MERCHANT'] .strlen($_POST['TERMINAL']).$_POST['TERMINAL'] .strlen($_POST['EMAIL']).$_POST['EMAIL'] .strlen($_POST['TRTYPE']).$_POST['TRTYPE'] .strlen($_POST['TIMESTAMP']).$_POST['TIMESTAMP'] .strlen($_POST['NONCE']).$_POST['NONCE'] .strlen($_POST['BACKREF']).$_POST['BACKREF'] .strlen($_POST['RESULT']).$_POST['RESULT'] .strlen($_POST['RC']).$_POST['RC'] .strlen($_POST['RCTEXT']).$_POST['RCTEXT'] .strlen($_POST['AUTHCODE']).$_POST['AUTHCODE'] .strlen($_POST['RRN']).$_POST['RRN'] .strlen($_POST['INT_REF']).$_POST['INT_REF']; $p_sign = strtoupper(hash_hmac('sha1',$hmac,pack('H*',$key))); if ($_POST['P_SIGN'] <>$p_sign){ fputs($log,"ÐÑибка по P_SIGN"); echo "ÐÑибка по P_SIGN"; exit(); } if ($orderData['NONCE'] != $_POST['NONCE']){ fputs($log,"ÐÑибка паÑамеÑÑов."); echo "ÐÑибка паÑамеÑÑов."; } if ($orderData['allPaySum'] != $_POST['AMOUNT']){ fputs($log,"ÐÑибка паÑамеÑÑов 1."); echo "ÐÑибка паÑамеÑÑов 1."; } if ( $_POST['MERCHANT'] != "000553330693101"){ fputs($log,"ÐÑибка паÑамеÑÑов 2."); echo "ÐÑибка паÑамеÑÑов 2."; exit(); } if ( $_POST['TERMINAL'] != 30693101 ){ fputs($log,"ÐÑибка паÑамеÑÑов 3."); echo "ÐÑибка паÑамеÑÑов 3."; exit(); } if ( $_POST['RESULT'] != 0 ){ fputs($log,"ÐÑибка паÑамеÑÑов 4."); echo "ÐÑибка паÑамеÑÑов 4."; exit(); } if (order::updateFields($dbh, array( "payDate"=>$_POST['TIMESTAMP'], "AUTHCODE"=>$_POST['AUTHCODE'], "RRN"=>$_POST['RRN'], "INT_REF"=>$_POST['INT_REF'], "NAME"=>$_POST['NAME'], "CARD"=>$_POST['CARD'], "payStatus"=>1 ) ,$order)){ echo "OK"; fputs($log,print_r( array("ORDER"=>$order, "payDate"=>$_POST['TIMESTAMP'], "AUTHCODE"=>$_POST['AUTHCODE'], "RRN"=>$_POST['RRN'], "INT_REF"=>$_POST['INT_REF'], "NAME"=>$_POST['NAME'], "CARD"=>$_POST['CARD'], "payStatus"=>1),true)); }else{ fputs($log,"оШÐÐÐÐ ÐРРСÐХРÐÐÐÐÐÐ ÐÐÐ ÐÐÐТРÐÐ"); };