****************************************************************************/ use Tygh\Registry; if (!defined('BOOTSTRAP')) { die('Access denied'); } if (defined('PAYMENT_NOTIFICATION')) { if (empty($_REQUEST['orderId'])) { die('Access denied'); } list($order_id) = explode('_', $_REQUEST['orderId']); $pp_response = array(); if ($mode == 'placement') { if (fn_payment_rbk_is_empty($_REQUEST)) { die('Access denied'); } $sign = fn_payment_rbk_get_hash($order_id, $_REQUEST); $paymentStatus = $_REQUEST['paymentStatus']; $pp_response['transaction_id'] = $_REQUEST['paymentId']; $pp_response['reason_text'] = __('rbk_status' . $paymentStatus); if ($sign == $_REQUEST['hash']) { if ($paymentStatus == 5) { $pp_response['order_status'] = 'P'; fn_finish_payment($order_id, $pp_response); } } else { $pp_response['order_status'] = 'F'; $pp_response['reason_text'] = __('error'); fn_finish_payment($order_id, $pp_response); } exit; } elseif ($mode == 'success') {
****************************************************************************/ use Tygh\Registry; if (!defined('BOOTSTRAP')) { die('Access denied'); } if (defined('PAYMENT_NOTIFICATION')) { if (empty($_REQUEST['orderId'])) { die('Access denied'); } $order_id = $_REQUEST['orderId']; $pp_response = array(); if ($mode == 'placement') { if (fn_payment_rbk_is_empty($_REQUEST)) { die('Access denied'); } $sign = fn_payment_rbk_get_hash($_REQUEST); $paymentStatus = $_REQUEST['paymentStatus']; $pp_response['transaction_id'] = $_REQUEST['paymentId']; $pp_response['reason_text'] = __('rbk_status' . $paymentStatus); if ($sign == $_REQUEST['hash']) { if ($paymentStatus == 5) { $pp_response['order_status'] = 'P'; fn_finish_payment($order_id, $pp_response); } } else { $pp_response['order_status'] = 'F'; $pp_response['reason_text'] = __('error'); fn_finish_payment($order_id, $pp_response); } exit; } elseif ($mode == 'success') {