Skip to content
Browse files

Show only one message for actions (Capture/Void/Credit) in test mode.

  • Loading branch information...
1 parent 4d1014d commit 181c06ea6bfb652c60bb63f421ca2b8a1252a409 ethem committed Jan 31, 2006
Showing with 17 additions and 14 deletions.
  1. +15 −10 enrol/authorize/index.php
  2. +2 −4 lang/en/enrol_authorize.php
View
25 enrol/authorize/index.php
@@ -5,9 +5,9 @@
require_once $CFG->dirroot.'/enrol/authorize/action.php';
define('ORDER_CAPTURE', 'capture');
-define('ORDER_DELETE', 'delete');
-define('ORDER_REFUND', 'refund');
-define('ORDER_VOID', 'void');
+define('ORDER_DELETE', 'delete');
+define('ORDER_REFUND', 'refund');
+define('ORDER_VOID', 'void');
if (!($site = get_site())) {
error("Could not find a site!");
@@ -45,7 +45,7 @@ function authorize_orders()
{
global $CFG;
global $strs, $authstrs;
- require_once($CFG->libdir.'/tablelib.php');
+ require_once $CFG->libdir.'/tablelib.php';
$perpage = 10;
$userid = optional_param('user', 0, PARAM_INT);
@@ -88,11 +88,16 @@ function authorize_orders()
$where = "WHERE (E.status = '" . AN_STATUS_AUTHCAPTURE . "') ";
}
else {
- $where = "WHERE (status = '$status') ";
+ $where = "WHERE (E.status = '$status') ";
}
}
else {
- $where = "WHERE (status != '" . AN_STATUS_NONE . "') ";
+ if (empty($CFG->an_test)) {
+ $where = "WHERE (E.status != '" . AN_STATUS_NONE . "') ";
+ }
+ else {
+ $where = "WHERE (1=1) ";
+ }
}
if ($userid > 0) {
@@ -224,7 +229,7 @@ function authorize_order_details($orderno) {
}
else {
$table->data[] = array(get_string('testmode', 'enrol_authorize'),
- get_string('capturetestwarn', 'enrol_authorize'));
+ get_string('testwarning', 'enrol_authorize'));
}
}
}
@@ -274,7 +279,7 @@ function authorize_order_details($orderno) {
}
else {
$table->data[] = array(get_string('testmode', 'enrol_authorize'),
- get_string('credittestwarn', 'enrol_authorize'));
+ get_string('testwarning', 'enrol_authorize'));
}
}
else {
@@ -306,7 +311,7 @@ function authorize_order_details($orderno) {
}
else {
$table->data[] = array(get_string('testmode', 'enrol_authorize'),
- get_string('voidtestwarn', 'enrol_authorize'));
+ get_string('testwarning', 'enrol_authorize'));
}
}
else {
@@ -349,7 +354,7 @@ function authorize_order_details($orderno) {
}
else {
$table->data[] = array(get_string('testmode', 'enrol_authorize'),
- get_string('voidtestwarn', 'enrol_authorize'));
+ get_string('testwarning', 'enrol_authorize'));
}
}
else {
View
6 lang/en/enrol_authorize.php
@@ -68,7 +68,6 @@
$string['capture'] = 'Capture';
$string['capturedpendingsettle'] = 'Captured / Pending Settlement';
$string['capturedsettled'] = 'Captured / Settled';
-$string['capturetestwarn'] = 'Capture seems working, but no record was updated in test mode';
$string['captureyes'] = 'The credit card will be captured and student will be enrolled to course. Are you sure?';
$string['ccexpire'] = 'Expiry Date';
$string['ccexpired'] = 'The credit card has expired';
@@ -79,14 +78,13 @@
$string['ccvvhelp'] = 'Look at the back of card (last 3 digits)';
$string['choosemethod'] = 'If you know enrolment key of the course, enter it; otherwise you need to pay for this course.';
$string['chooseone'] = 'Fill one or both of the following two fields';
-$string['credittestwarn'] = 'Credit seems working, but no record was inserted to database in test mode';
$string['cutofftime'] = 'Transaction Cut-Off Time. When the last transaction is picked up for settlement?';
$string['delete'] = 'Destroy';
$string['description'] = 'The Authorize.net module allows you to set up paid courses by merchants. If the cost for any course is zero, then students are not asked to pay for entry. There is a site-wide cost that you set here as a default for the whole site and then a course setting that you can set for each course individually. The course cost overrides the site cost.<br /><br /><b>Note:</b> If you enter an enrolment key in the course settings, then students will also have the option to enrol using a key. This is useful if you have a mixture of paying and non-paying students.';
$string['enrolname'] = 'Authorize.net Credit Card Gateway';
$string['expired'] = 'Expired';
$string['howmuch'] = 'How much?';
-$string['httpsrequired'] = 'We are sorry to inform you that your request cannot be processed currently. This site\'s configuration couldn\'t be set up correcly.
+$string['httpsrequired'] = 'We are sorry to inform you that your request cannot be processed currently. This site\'s configuration couldn\'t be set up correctly.
<br /><br />
Please don\'t enter your credit card number unless you see a yellow lock at the bottom of the browser. It means, it simply encrypts all data sent between client and server. So the information during the transaction between 2 computers is protected and your credit card number cannot captured over the internet.';
$string['logindesc'] = 'This option must be ON. <br /><br />
@@ -143,10 +141,10 @@
$string['subvoidyes'] = 'Refunded transaction $a->transid will be cancelled and it will credit $a->amount to your account. Are you sure?';
$string['tested'] = 'Tested';
$string['testmode'] = '[TEST MODE]';
+$string['testwarning'] = 'Capture/Void/Credit seems working in test mode, but no record was updated or inserted in database.';
$string['transid'] = 'Transaction ID';
$string['unenrolstudent'] = 'Unenrol student?';
$string['void'] = 'Void';
-$string['voidtestwarn'] = 'Void seems working, but no record was updated in test mode';
$string['voidyes'] = 'Transaction will be cancelled. Are you sure?';
$string['zipcode'] = 'Zip Code';

0 comments on commit 181c06e

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