Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

merged from 16stable

  • Loading branch information...
commit 0c101247559cd1298ede64a70240328cfdc9b3bd 1 parent 32b0adf
ethem authored
Showing with 3 additions and 6 deletions.
  1. +3 −6 enrol/authorize/authorizenetlib.php
View
9 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);
Please sign in to comment.
Something went wrong with that request. Please try again.