2005-12-07 13:03:47 +00:00
|
|
|
<?php // $Id$
|
|
|
|
|
|
|
|
if (!isset($frm->enrol_cost)) $frm->enrol_cost = '5';
|
|
|
|
if (!isset($frm->enrol_currency)) $frm->enrol_currency = 'USD';
|
|
|
|
if (!isset($frm->enrol_mailstudents)) $frm->enrol_mailstudents = '';
|
|
|
|
if (!isset($frm->enrol_mailteachers)) $frm->enrol_mailteachers = '';
|
|
|
|
if (!isset($frm->enrol_mailadmins)) $frm->enrol_mailadmins = '';
|
|
|
|
|
|
|
|
if (!isset($frm->an_login)) $frm->an_login = '';
|
|
|
|
if (!isset($frm->an_tran_key)) $frm->an_tran_key = '';
|
|
|
|
if (!isset($frm->an_password)) $frm->an_password = '';
|
2006-07-31 12:45:34 +00:00
|
|
|
if (!isset($frm->delete_current)) $frm->delete_current = '';
|
2005-12-07 13:03:47 +00:00
|
|
|
if (!isset($frm->an_referer)) $frm->an_referer = 'http://';
|
2006-01-05 14:30:49 +00:00
|
|
|
if (!isset($frm->an_avs)) $frm->an_avs = '';
|
If an user's credit card cannot be captured on the internet directly, obtain authorization code over phone from customer's bank.
Some users may not wish to use their credit cards on the internet directly for security reasons.
In this case, you need to obtain an authorization code from user's bank.
Initially, ask for credit card information from the customer
like bank name, name on card, card number, expiry date and card validation code
by means of phone, face-to-face or a billing application.
Then, call the customer services of user's bank giving this information and demand an authorization code.
Finally, after obtaining it, login as user to get the user enrolled.
Alternatively, you can give it to the user saying enrol using this code.
2006-10-30 12:53:15 +00:00
|
|
|
if (!isset($frm->an_authcode)) $frm->an_authcode = '';
|
2005-12-07 13:03:47 +00:00
|
|
|
if (!isset($frm->an_test)) $frm->an_test = '';
|
|
|
|
if (!isset($frm->an_review)) $frm->an_review = '';
|
2006-01-03 10:23:28 +00:00
|
|
|
if (!isset($frm->an_capture_day)) $frm->an_capture_day = '5';
|
2006-01-04 18:16:39 +00:00
|
|
|
if (!isset($frm->an_emailexpired)) $frm->an_emailexpired = '2';
|
2006-06-14 11:53:50 +00:00
|
|
|
if (!isset($frm->an_emailexpiredteacher)) $frm->an_emailexpiredteacher = '';
|
2006-06-15 12:55:39 +00:00
|
|
|
if (!isset($frm->an_sorttype)) $frm->an_sorttype = 'ttl';
|
2006-02-01 13:03:13 +00:00
|
|
|
|
|
|
|
if (isset($CFG->an_cutoff)) {
|
2006-06-13 16:05:15 +00:00
|
|
|
$cutoff = intval($CFG->an_cutoff);
|
|
|
|
$mins = $cutoff % 60; $hrs = ($cutoff - $mins) / 60;
|
|
|
|
$frm->an_cutoff_hour = $hrs; $frm->an_cutoff_min = $mins;
|
|
|
|
}
|
|
|
|
if (!isset($frm->an_cutoff_hour)) {
|
|
|
|
$timezone = format_float(get_user_timezone_offset(), 1);
|
|
|
|
$frm->an_cutoff_hour = intval($timezone);
|
|
|
|
$frm->an_cutoff_min = (intval(round($timezone)) != intval($timezone)) ? 35 : 5;
|
2006-02-01 13:03:13 +00:00
|
|
|
}
|
2006-05-18 07:55:12 +00:00
|
|
|
|
2006-08-30 10:29:10 +00:00
|
|
|
if (!isset($frm->acceptmethods)) {
|
2006-09-02 11:49:02 +00:00
|
|
|
$frm->acceptmethods = get_list_of_payment_methods();
|
2006-08-30 14:06:40 +00:00
|
|
|
$CFG->an_acceptmethods = implode(',', $frm->acceptmethods);
|
2006-08-30 10:29:10 +00:00
|
|
|
}
|
|
|
|
|
2006-05-05 18:16:45 +00:00
|
|
|
if (!isset($frm->acceptccs)) {
|
2006-09-02 11:49:02 +00:00
|
|
|
$frm->acceptccs = array_keys(get_list_of_creditcards());
|
2006-05-05 18:16:45 +00:00
|
|
|
$CFG->an_acceptccs = implode(',', $frm->acceptccs);
|
|
|
|
}
|
2005-12-07 13:03:47 +00:00
|
|
|
|
2006-09-04 12:09:30 +00:00
|
|
|
if (!isset($frm->acceptechecktypes)) {
|
|
|
|
$frm->acceptechecktypes = get_list_of_bank_account_types();
|
|
|
|
$CFG->an_acceptechecktypes = implode(',', $frm->acceptechecktypes);
|
|
|
|
}
|
|
|
|
|
2005-12-07 13:03:47 +00:00
|
|
|
?>
|
|
|
|
|
2005-05-13 09:27:26 +00:00
|
|
|
<table cellspacing="0" cellpadding="5" border="0" align="center">
|
|
|
|
|
2006-06-13 18:31:09 +00:00
|
|
|
<tr valign="top">
|
2006-08-30 14:06:40 +00:00
|
|
|
<td colspan="2" align="right"><a href="../enrol/authorize/index.php"><?php print_string("paymentmanagement", "enrol_authorize") ?></a></td>
|
2006-06-13 18:31:09 +00:00
|
|
|
</tr>
|
|
|
|
|
2006-08-30 14:06:40 +00:00
|
|
|
<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizewide", "enrol_authorize") ?></h4></td></tr>
|
2005-12-07 13:03:47 +00:00
|
|
|
|
2005-05-13 09:27:26 +00:00
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">enrol_cost:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><input type="text" size="5" name="enrol_cost" value="<?php p($frm->enrol_cost) ?>" /><br />
|
|
|
|
<?php print_string("costdefault") ?>. <?php print_string("costdefaultdesc", "enrol_authorize") ?></td>
|
2005-05-13 09:27:26 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">enrol_currency:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php choose_from_menu(get_list_of_currencies(), "enrol_currency", $frm->enrol_currency, "","", "") ?><br />
|
|
|
|
<?php print_string("currency") ?>
|
2005-05-13 09:27:26 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2006-06-09 10:30:01 +00:00
|
|
|
|
2006-05-30 08:32:43 +00:00
|
|
|
<?php if (substr($CFG->wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?>
|
2005-07-14 08:22:35 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td align="right">loginhttps:</td>
|
2005-12-07 13:03:47 +00:00
|
|
|
<td><?php
|
2006-08-30 14:06:40 +00:00
|
|
|
echo (empty($CFG->loginhttps) ? "<font color=\"red\"><b>off</b></font>" : "<font color=\"green\">on</font>");
|
2006-09-15 09:57:10 +00:00
|
|
|
$a->url = "$CFG->wwwroot/$CFG->admin/settings.php?section=httpsecurity";
|
2006-08-30 14:06:40 +00:00
|
|
|
echo '<br />'; print_string("logindesc", "enrol_authorize", $a);
|
|
|
|
?>
|
|
|
|
</td>
|
2005-07-14 08:22:35 +00:00
|
|
|
</tr>
|
2006-05-30 08:32:43 +00:00
|
|
|
<?php } /* end: https && loginhttps */ ?>
|
2006-06-09 10:30:01 +00:00
|
|
|
|
2006-08-30 14:06:40 +00:00
|
|
|
<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizesettings", "enrol_authorize") ?></h4></td></tr>
|
2005-05-13 09:27:26 +00:00
|
|
|
|
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">an_login:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><input type="text" name="an_login" value="<?php p($frm->an_login) ?>" /><br />
|
|
|
|
<?php print_string("anlogin", "enrol_authorize") ?></td>
|
2005-05-13 09:27:26 +00:00
|
|
|
</tr>
|
|
|
|
|
2005-05-25 16:27:53 +00:00
|
|
|
<tr valign="top">
|
2006-07-31 12:45:34 +00:00
|
|
|
<td align="right"># # </td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_string("chooseone", "enrol_authorize") ?></td>
|
2005-05-25 16:27:53 +00:00
|
|
|
</tr>
|
|
|
|
|
2005-05-13 09:27:26 +00:00
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">an_tran_key:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><input type="text" name="an_tran_key" value="<?php p($frm->an_tran_key) ?>" /><sup>#1</sup><br />
|
|
|
|
<?php print_string("antrankey", "enrol_authorize") ?></td>
|
2005-05-13 09:27:26 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">an_password:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><input type="text" name="an_password" value="" /><sup>#2</sup><br />
|
|
|
|
<?php print_string("anpassword", "enrol_authorize") ?><br />(<?php print_string("leavetokeep") ?>)</td>
|
2006-07-31 12:45:34 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="right">delete_current:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_checkbox('delete_current', '1', !empty($frm->delete_current)) ?> <br />
|
|
|
|
<?php print_string("deletecheck", "moodle", get_string('oldpassword')) ?><br /><br /></td>
|
2005-05-13 09:27:26 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">an_referer:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><input type="text" name="an_referer" value="<?php p($frm->an_referer) ?>" /><br />
|
|
|
|
<?php print_string("anreferer", "enrol_authorize") ?></td>
|
2005-05-13 09:27:26 +00:00
|
|
|
</tr>
|
|
|
|
|
2006-06-09 10:30:01 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td align="right">an_cutoff:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_time_selector("an_cutoff_hour","an_cutoff_min",make_timestamp(2000,1,1,$frm->an_cutoff_hour,$frm->an_cutoff_min),5); ?><br />
|
|
|
|
<?php print_string("cutofftime", "enrol_authorize") ?></td>
|
2006-06-09 10:30:01 +00:00
|
|
|
</tr>
|
|
|
|
|
2006-01-05 14:30:49 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td align="right">an_avs:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_checkbox('an_avs', '1', !empty($frm->an_avs)) ?><br />
|
|
|
|
<?php print_string("adminavs", "enrol_authorize") ?></td>
|
2006-01-05 14:30:49 +00:00
|
|
|
</tr>
|
|
|
|
|
If an user's credit card cannot be captured on the internet directly, obtain authorization code over phone from customer's bank.
Some users may not wish to use their credit cards on the internet directly for security reasons.
In this case, you need to obtain an authorization code from user's bank.
Initially, ask for credit card information from the customer
like bank name, name on card, card number, expiry date and card validation code
by means of phone, face-to-face or a billing application.
Then, call the customer services of user's bank giving this information and demand an authorization code.
Finally, after obtaining it, login as user to get the user enrolled.
Alternatively, you can give it to the user saying enrol using this code.
2006-10-30 12:53:15 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td align="right">an_authcode:</td>
|
If an user's credit card cannot be captured on the internet directly, obtain authorization code over phone from customer's bank.
Some users may not wish to use their credit cards on the internet directly for security reasons.
In this case, you need to obtain an authorization code from user's bank.
Initially, ask for credit card information from the customer
like bank name, name on card, card number, expiry date and card validation code
by means of phone, face-to-face or a billing application.
Then, call the customer services of user's bank giving this information and demand an authorization code.
Finally, after obtaining it, login as user to get the user enrolled.
Alternatively, you can give it to the user saying enrol using this code.
2006-10-30 13:07:20 +00:00
|
|
|
<td><?php print_checkbox('an_authcode', '1', !empty($frm->an_authcode)) ?>
|
|
|
|
<?php helpbutton('authcode', '', 'enrol/authorize'); ?><br />
|
If an user's credit card cannot be captured on the internet directly, obtain authorization code over phone from customer's bank.
Some users may not wish to use their credit cards on the internet directly for security reasons.
In this case, you need to obtain an authorization code from user's bank.
Initially, ask for credit card information from the customer
like bank name, name on card, card number, expiry date and card validation code
by means of phone, face-to-face or a billing application.
Then, call the customer services of user's bank giving this information and demand an authorization code.
Finally, after obtaining it, login as user to get the user enrolled.
Alternatively, you can give it to the user saying enrol using this code.
2006-10-30 12:53:15 +00:00
|
|
|
<?php print_string("adminauthcode", "enrol_authorize") ?></td>
|
|
|
|
</tr>
|
|
|
|
|
2005-05-13 09:27:26 +00:00
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">an_test:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_checkbox('an_test', '1', !empty($frm->an_test)) ?><br />
|
|
|
|
<?php print_string("antestmode", "enrol_authorize") ?></td>
|
2005-08-24 14:59:42 +00:00
|
|
|
</tr>
|
|
|
|
|
2006-08-30 10:29:10 +00:00
|
|
|
<tr valign="top">
|
2006-09-04 12:09:30 +00:00
|
|
|
<td align="right">accepts:</td>
|
|
|
|
<td><?php print_string("adminaccepts", "enrol_authorize") ?><br /><br /><?php
|
2006-09-02 11:49:02 +00:00
|
|
|
$paymentmethodsenabled = get_list_of_payment_methods();
|
2006-09-02 12:37:01 +00:00
|
|
|
$allpaymentmethods = get_list_of_payment_methods(true);
|
2006-08-30 14:06:40 +00:00
|
|
|
foreach ($allpaymentmethods as $key) {
|
2006-09-04 12:09:30 +00:00
|
|
|
if ($key == AN_METHOD_CC) {
|
|
|
|
print_checkbox('acceptmethods[]', AN_METHOD_CC, in_array(AN_METHOD_CC, $paymentmethodsenabled), get_string('method'.AN_METHOD_CC,'enrol_authorize'));
|
|
|
|
echo("<blockquote>");
|
|
|
|
$acceptedccs = array_keys(get_list_of_creditcards());
|
|
|
|
$allccs = get_list_of_creditcards(true);
|
|
|
|
foreach ($allccs as $key => $val) {
|
|
|
|
print_checkbox('acceptccs[]', $key, in_array($key, $acceptedccs), $val); echo "<br />\n";
|
|
|
|
}
|
|
|
|
echo("</blockquote>");
|
|
|
|
}
|
|
|
|
elseif ($key == AN_METHOD_ECHECK) {
|
|
|
|
print_checkbox('acceptmethods[]', AN_METHOD_ECHECK, in_array(AN_METHOD_ECHECK, $paymentmethodsenabled), get_string('method'.AN_METHOD_ECHECK,'enrol_authorize'));
|
|
|
|
echo("<blockquote>");
|
|
|
|
$echecktypesenabled = get_list_of_bank_account_types();
|
|
|
|
$allechecktypes = get_list_of_bank_account_types(true);
|
|
|
|
foreach ($allechecktypes as $key) {
|
|
|
|
print_checkbox('acceptechecktypes[]', $key, in_array($key, $echecktypesenabled), get_string('echeck'.strtolower($key),'enrol_authorize')); echo "<br />\n";
|
|
|
|
}
|
|
|
|
echo("</blockquote>");
|
|
|
|
}
|
2006-05-05 18:16:45 +00:00
|
|
|
}
|
2006-09-01 09:04:11 +00:00
|
|
|
?><br /></td>
|
2006-05-05 18:16:45 +00:00
|
|
|
</tr>
|
|
|
|
|
2006-08-30 14:06:40 +00:00
|
|
|
<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizeccapture", "enrol_authorize") ?>
|
2006-06-13 18:04:25 +00:00
|
|
|
<?php helpbutton('orderreview', '', 'enrol/authorize'); ?>
|
2006-08-30 14:06:40 +00:00
|
|
|
</h4></td></tr>
|
2005-12-07 13:03:47 +00:00
|
|
|
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="right">an_review:</td>
|
2006-05-18 10:02:22 +00:00
|
|
|
<td><?php print_checkbox('an_review', '1', !empty($frm->an_review)) ?>
|
2006-08-30 14:06:40 +00:00
|
|
|
<?php helpbutton('review', get_string('adminhelpreviewtitle', 'enrol_authorize'), 'enrol/authorize'); ?><br />
|
|
|
|
<?php print_string("adminreview", "enrol_authorize") ?></td>
|
2005-12-07 13:03:47 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2006-01-03 10:23:28 +00:00
|
|
|
<td align="right">an_capture_day:</td>
|
|
|
|
<td><input type="text" name="an_capture_day" size="2" maxlength="2" value="<?php p($frm->an_capture_day) ?>" />
|
2006-08-30 14:06:40 +00:00
|
|
|
<?php helpbutton('captureday', get_string('adminhelpcapturetitle', 'enrol_authorize'), 'enrol/authorize'); ?><br />
|
|
|
|
<?php print_string("reviewday", "enrol_authorize", $frm->an_capture_day) ?></td>
|
2005-12-07 13:03:47 +00:00
|
|
|
</tr>
|
|
|
|
|
2006-08-30 14:06:40 +00:00
|
|
|
<tr valign="top"><td colspan="2"><h4><?php print_string("adminauthorizeemail", "enrol_authorize") ?></h4></td></tr>
|
2006-06-09 10:30:01 +00:00
|
|
|
|
2005-12-22 15:24:05 +00:00
|
|
|
<tr valign="top">
|
2006-01-04 18:16:39 +00:00
|
|
|
<td align="right">an_emailexpired:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><input type="text" name="an_emailexpired" size="1" maxlength="1" value="<?php p($frm->an_emailexpired) ?>" /><br />
|
|
|
|
<?php print_string("adminemailexpired", "enrol_authorize", $frm->an_emailexpired) ?><br />
|
2006-06-09 11:25:57 +00:00
|
|
|
<?php print_string("adminemailexpsetting", "enrol_authorize") ?></td>
|
2005-12-22 15:24:05 +00:00
|
|
|
</tr>
|
|
|
|
|
2006-06-14 11:53:50 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td align="right">an_emailexpiredteacher:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_checkbox('an_emailexpiredteacher', '1', !empty($frm->an_emailexpiredteacher)) ?><br />
|
|
|
|
<?php print_string("adminemailexpiredteacher", "enrol_authorize") ?></td>
|
2006-06-14 11:53:50 +00:00
|
|
|
</tr>
|
|
|
|
|
2006-06-15 12:55:39 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td align="right">an_sorttype:</td>
|
|
|
|
<td><?php
|
|
|
|
$sorts = array('ttl' => get_string('adminemailexpiredsortsum', 'enrol_authorize'),
|
|
|
|
'cnt' => get_string('adminemailexpiredsortcount', 'enrol_authorize'));
|
2006-08-30 14:06:40 +00:00
|
|
|
choose_from_menu($sorts, "an_sorttype", $frm->an_sorttype, "","", "") ?><br />
|
|
|
|
<?php print_string("adminemailexpiredsort", "enrol_authorize") ?></td>
|
2006-06-15 12:55:39 +00:00
|
|
|
</tr>
|
|
|
|
|
2005-05-13 09:27:26 +00:00
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">enrol_mailstudents:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_checkbox('enrol_mailstudents', '1', !empty($frm->enrol_mailstudents)) ?><br />
|
|
|
|
<?php print_string("mailstudents") ?></td>
|
2005-05-13 09:27:26 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">enrol_mailteachers:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_checkbox('enrol_mailteachers', '1', !empty($frm->enrol_mailteachers)) ?><br />
|
|
|
|
<?php print_string("mailteachers") ?></td>
|
2005-05-13 09:27:26 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2005-05-16 22:22:31 +00:00
|
|
|
<td align="right">enrol_mailadmins:</td>
|
2006-08-30 14:06:40 +00:00
|
|
|
<td><?php print_checkbox('enrol_mailadmins', '1', !empty($frm->enrol_mailadmins)) ?><br />
|
|
|
|
<?php print_string("mailadmins") ?></td>
|
2005-05-13 09:27:26 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
</table>
|