Permalink
Browse files

Stop responding on error.

  • Loading branch information...
1 parent b06334e commit 3c07bc5a327a5c85f18e2393e598dbd53fd73a0d ethem committed Nov 16, 2006
Showing with 10 additions and 7 deletions.
  1. +10 −7 enrol/authorize/enrol.php
@@ -10,12 +10,12 @@
class enrolment_plugin_authorize
{
/**
- * Credit card and Echeck error messages.
+ * Error message after connected authorize.net.
*
- * @var array
+ * @var string
* @access public
*/
- var $authorizeerrors = array();
+ var $authorizeerror;
/**
* Cron log.
@@ -93,6 +93,9 @@ function print_entry($course) {
$this->echeck_submit($form, $course);
break;
}
+ if (!empty($this->authorizeerror)) {
+ error($this->authorizeerror);
+ }
}
$authorize_enrol->display();
}
@@ -165,7 +168,7 @@ function cc_submit($form, $course)
$order->id = insert_record("enrol_authorize", $order);
if (!$order->id) {
email_to_admin("Error while trying to insert new data", $order);
- $this->authorizeerrors['header'] = "Insert record error. Admin has been notified!";
+ $this->authorizeerror = "Insert record error. Admin has been notified!";
return;
}
@@ -208,7 +211,7 @@ function cc_submit($form, $course)
$message = '';
if (AN_APPROVED != authorize_action($order, $message, $extra, $action, $form->cctype)) {
email_to_admin($message, $order);
- $this->authorizeerrors['header'] = $message;
+ $this->authorizeerror = $message;
return;
}
@@ -327,7 +330,7 @@ function echeck_submit($form, $course)
$order->id = insert_record("enrol_authorize", $order);
if (!$order->id) {
email_to_admin("Error while trying to insert new data", $order);
- $this->authorizeerrors['header'] = "Insert record error. Admin has been notified!";
+ $this->authorizeerror = "Insert record error. Admin has been notified!";
return;
}
@@ -360,7 +363,7 @@ function echeck_submit($form, $course)
$message = '';
if (AN_REVIEW != authorize_action($order, $message, $extra, AN_ACTION_AUTH_CAPTURE)) {
email_to_admin($message, $order);
- $this->authorizeerrors['header'] = $message;
+ $this->authorizeerror = $message;
return;
}

0 comments on commit 3c07bc5

Please sign in to comment.