From 0c101247559cd1298ede64a70240328cfdc9b3bd Mon Sep 17 00:00:00 2001 From: ethem Date: Tue, 29 Aug 2006 09:04:03 +0000 Subject: [PATCH] merged from 16stable --- enrol/authorize/authorizenetlib.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/enrol/authorize/authorizenetlib.php b/enrol/authorize/authorizenetlib.php index fa9e55ae41..6b4869766e 100644 --- a/enrol/authorize/authorizenetlib.php +++ b/enrol/authorize/authorizenetlib.php @@ -297,7 +297,7 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE) $order->transid = $transid; if ($action == AN_ACTION_AUTH_ONLY) { $order->status = AN_STATUS_AUTH; - // dont't update settletime + // don't update order->settletime } else { $order->status = AN_STATUS_AUTHCAPTURE; $order->settletime = authorize_getsettletime(time()); @@ -324,12 +324,9 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE) } case AN_ACTION_VOID: { - $tableupdate = 'enrol_authorize'; - if ($order->status == AN_STATUS_CREDIT) { - $tableupdate = 'enrol_authorize_refunds'; - } - // dont't update settletime + $tableupdate = ($order->status == AN_STATUS_CREDIT) ? 'enrol_authorize_refunds' : 'enrol_authorize'; $order->status = AN_STATUS_VOID; + // don't update order->settletime if (! update_record($tableupdate, $order)) { enrolment_plugin_authorize::email_to_admin("Error while trying to update data " . "in table $tableupdate. Please edit manually this record: ID=$order->id.", $order); -- 2.39.5