%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.117.102.248 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sale/payment/chronopay/ |
Upload File : |
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();?><? if ($_SERVER["REQUEST_METHOD"] == "POST") { include(GetLangFileName(dirname(__FILE__)."/", "/result_rec.php")); $cs1 = intval($_POST["order_id"]); if($cs1 <= 0) $cs1 = intval($_POST["cs1"]); $bCorrectPayment = True; $techMessage = ""; if(!($arOrder = CSaleOrder::GetByID($cs1))) { $bCorrectPayment = False; $techMessage = GetMessage("SALE_CHR_REC_ORDER"); } if ($bCorrectPayment) CSalePaySystemAction::InitParamArrays($arOrder, $arOrder["ID"]); $sharedsecB = CSalePaySystemAction::GetParamValue("SHARED"); if($sharedsecB == '') $bCorrectPayment = False; if ($bCorrectPayment) { $productIdB = CSalePaySystemAction::GetParamValue("PRODUCT_ID"); $orderIdB = CSalePaySystemAction::GetParamValue("ORDER_ID"); $product_priceB = number_format(CSalePaySystemAction::GetParamValue("SHOULD_PAY"), 2, '.', ''); $product_id = trim($_POST["product_id"]); $customer_id = trim($_POST["customer_id"]); $transaction_id = trim($_POST["transaction_id"]); $transaction_type = trim($_POST["transaction_type"]); $total = trim($_POST["total"]); $currency = trim($_POST["currency"]); $date = trim($_POST["date"]); $sign = trim($_POST["sign"]); if($product_id == $productIdB) { $checkB = md5($sharedsecB.$customer_id.$transaction_id.$transaction_type.$total); if($checkB == $sign) { if($transaction_type == "onetime" || $transaction_type == "Purchase") { if($product_priceB == $total) { if($arOrder["PAYED"] != "Y") CSaleOrder::PayOrder($arOrder["ID"], "Y"); } else $techMessage = GetMessage("SALE_CHR_REC_SUMM"); } else $techMessage = GetMessage("SALE_CHR_REC_TRANS"); } else $techMessage = GetMessage("SALE_CHR_REC_SIGN"); } else $techMessage = GetMessage("SALE_CHR_REC_PRODUCT"); $strPS_STATUS_DESCRIPTION = "Customer id: ".$customer_id.";<br />"; $strPS_STATUS_DESCRIPTION .= "Transaction id: ".$transaction_id.";<br />"; $strPS_STATUS_DESCRIPTION .= "Date payed: ".$date.";<br />"; $strPS_STATUS_DESCRIPTION .= "Payment type: ".$_POST["payment_type"].";<br />". "Buyer: ".$_POST["name"].";<br />". "Email: ".$_POST["email"].";<br />". "Country: ".$_POST["country"].";<br />". "City: ".$APPLICATION->ConvertCharset($_POST["city"], "utf-8", SITE_CHARSET).";<br />". "Street: ".$APPLICATION->ConvertCharset($_POST["street"], "utf-8", SITE_CHARSET).";<br />". "Phone: ".$_POST["phone"].";<br />". "Index: ".$_POST["zip"].";<br />"; $arFields = array( "PS_STATUS" => ($transaction_type == "onetime" || $transaction_type == "Purchase") ? "Y" : "N", "PS_STATUS_CODE" => $transaction_type, "PS_STATUS_DESCRIPTION" => $strPS_STATUS_DESCRIPTION, "PS_STATUS_MESSAGE" => $techMessage, "PS_SUM" => $total, "PS_CURRENCY" => $currency, "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))), ); CSaleOrder::Update($arOrder["ID"], $arFields); } } ?>