Loading uc_rbkmoney.module +7 −9 Original line number Diff line number Diff line Loading @@ -165,8 +165,8 @@ function uc_rbkmoney_payment_method() { function uc_payment_method_rbkmoney($op, &$arg1) { switch ($op) { case 'cart-details': return $details; case 'cart-process': return; case 'settings': return; } } Loading @@ -175,8 +175,7 @@ function uc_payment_method_rbkmoney($op, &$arg1) { * Implementation of hook_form_alter(). */ function uc_rbkmoney_form_alter(&$form, $form_state, $form_id) { $order_id = (int) $_SESSION['cart_order']; if ($form_id == 'uc_cart_checkout_review_form' && $order_id > 0) { if ($form_id == 'uc_cart_checkout_review_form' && ($order_id = intval($_SESSION['cart_order'])) > 0) { $order = uc_order_load($order_id); if ($order->payment_method == 'rbkmoney') { unset($form['submit']); Loading Loading @@ -246,7 +245,7 @@ function uc_rbkmoney_done_payment() { if (variable_get('uc_rbkmoney_log', '') == 'on') { $log = '<pre>' . var_export($GLOBALS['_POST'], TRUE) . '</pre>'; watchdog('RBK Money', $log); watchdog('uc_rbkmoney', $log); } $response['eshopId'] = $GLOBALS['_POST']['eshopId']; Loading Loading @@ -277,11 +276,10 @@ function uc_rbkmoney_done_payment() { uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment successful'), $type = 'admin', $status = 1, $notify = FALSE); break; } } elseif ($response['hash'] != $crc) { } elseif ($response['hash'] !== $crc) { uc_order_update_status($response['orderId'], 'canceled'); uc_order_comment_save($response['orderId'], $order->uid, t('MD5 checksum fail, payment denied'), $type = 'admin', $status = 1, $notify = FALSE); drupal_set_message(t('MD5 checksum false, payment deny'), 'warning'); drupal_goto('cart'); uc_order_comment_save($response['orderId'], $order->uid, t('MD5 checksum fail, order canceled'), $type = 'admin', $status = 1, $notify = FALSE); watchdog('uc_rbkmoney', t('MD5 checksum fail, order canceled')); } } } Loading Loading
uc_rbkmoney.module +7 −9 Original line number Diff line number Diff line Loading @@ -165,8 +165,8 @@ function uc_rbkmoney_payment_method() { function uc_payment_method_rbkmoney($op, &$arg1) { switch ($op) { case 'cart-details': return $details; case 'cart-process': return; case 'settings': return; } } Loading @@ -175,8 +175,7 @@ function uc_payment_method_rbkmoney($op, &$arg1) { * Implementation of hook_form_alter(). */ function uc_rbkmoney_form_alter(&$form, $form_state, $form_id) { $order_id = (int) $_SESSION['cart_order']; if ($form_id == 'uc_cart_checkout_review_form' && $order_id > 0) { if ($form_id == 'uc_cart_checkout_review_form' && ($order_id = intval($_SESSION['cart_order'])) > 0) { $order = uc_order_load($order_id); if ($order->payment_method == 'rbkmoney') { unset($form['submit']); Loading Loading @@ -246,7 +245,7 @@ function uc_rbkmoney_done_payment() { if (variable_get('uc_rbkmoney_log', '') == 'on') { $log = '<pre>' . var_export($GLOBALS['_POST'], TRUE) . '</pre>'; watchdog('RBK Money', $log); watchdog('uc_rbkmoney', $log); } $response['eshopId'] = $GLOBALS['_POST']['eshopId']; Loading Loading @@ -277,11 +276,10 @@ function uc_rbkmoney_done_payment() { uc_order_comment_save($response['orderId'], $order->uid, t('RBK Money: payment successful'), $type = 'admin', $status = 1, $notify = FALSE); break; } } elseif ($response['hash'] != $crc) { } elseif ($response['hash'] !== $crc) { uc_order_update_status($response['orderId'], 'canceled'); uc_order_comment_save($response['orderId'], $order->uid, t('MD5 checksum fail, payment denied'), $type = 'admin', $status = 1, $notify = FALSE); drupal_set_message(t('MD5 checksum false, payment deny'), 'warning'); drupal_goto('cart'); uc_order_comment_save($response['orderId'], $order->uid, t('MD5 checksum fail, order canceled'), $type = 'admin', $status = 1, $notify = FALSE); watchdog('uc_rbkmoney', t('MD5 checksum fail, order canceled')); } } } Loading