[insert_php] $response_array = array(); foreach ($_REQUEST as $key => $value) { $value = urldecode($value); $response_array[$key] = $value; } $dateTime = preg_replace(‘/[^0-9- :]/’, », $response_array[‘DateTime’]); $transactionID = preg_replace(‘/[^0-9]/’, », $response_array[‘TransactionID’]); $orderId = preg_replace(‘/[^0-9]/’, », $response_array[‘OrderId’]); $amount = preg_replace(‘/[^0-9.]/’, », $response_array[‘Amount’]); $currency=preg_replace(‘/[^A-Z]/’, », $response_array[‘Currency’]); $privateSecurityKey = ‘3b658444-6c4a-4a8a-8a01-9f17076127d9’; $proposedHash = preg_replace(‘/[^a-f0-9]/’, », $response_array[‘SecurityKey’]); $localHash = md5(«DateTime=$dateTime&TransactionID=$transactionID&OrderId=$orderId&Amount=$amount&Currency=$currency&PrivateSecurityKey=$privateSecurityKey»); if ($localHash == $proposedHash) { easyreservations_ipn_callback($orderId, $amount); $description = preg_replace(‘/[^\w (),:\/-]/u’, », $response_array[‘OrderDescription’]); echo »
Оплата произведена успешно
Заказ №$orderId
На Ваше имя забронирован: $description
Мы подготовим его к Вашему приезду
«;}[/insert_php]