Skip to content
Browse files

fixo

  • Loading branch information...
1 parent 18e2de4 commit 79cd394c8218eaf5a68a929d3517b16c8844f1db ethem committed Aug 29, 2006
Showing with 3 additions and 6 deletions.
  1. +3 −6 enrol/authorize/authorizenetlib.php
View
9 enrol/authorize/authorizenetlib.php
@@ -289,7 +289,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());
@@ -316,12 +316,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);

0 comments on commit 79cd394

Please sign in to comment.
Something went wrong with that request. Please try again.