case AN_METHOD_ECHECK:
{
- print_eheck_form($this);
+ print_echeck_form($this);
break;
}
}
-?>
-<?php
function print_cc_form($classreference)
{
- global $form, $course, $paymentmethodsenabled;
+ global $form, $course;
global $CFG, $USER;
$formvars = array(
<form name="form" method="post" action="enrol.php" autocomplete="off">
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
+ <input type="hidden" name="paymentmethod" value="<?php p(AN_METHOD_CC) ?>" />
<table align="center" width="100%" border=0>
<tr>
- <td align="right" colspan="2"> <?php print_other_method(AN_METHOD_CC, $paymentmethodsenabled, $course); ?></td>
+ <td align="right" colspan="2"> <?php print_other_method(AN_METHOD_CC); ?></td>
</tr>
<tr>
<td align="right"><?php print_string("ccno", "enrol_authorize") ?>: </td>
</form>
</div>
<!-- END CC -->
-<?php } /* end: print_cc_form */ ?>
<?php
+}
+
function print_echeck_form($classreference)
- {
- global $form, $course, $paymentmethodsenabled;
+{
+ global $form, $course;
global $CFG, $USER;
$formvars = array('password', 'abacode', 'accnum', 'acctype', 'bankname', 'firstname', 'lastname');
<form name="form" method="post" action="enrol.php" autocomplete="off">
<input type="hidden" name="id" value="<?php p($course->id) ?>" />
+ <input type="hidden" name="paymentmethod" value="<?php p(AN_METHOD_ECHECK) ?>" />
echeck form (not ready)
<table align="center" width="100%" border=0>
<tr>
- <td align="right" colspan="2"> <?php print_other_method(AN_METHOD_ECHECK, $paymentmethodsenabled, $course); ?></td>
+ <td align="right" colspan="2"> <?php print_other_method(AN_METHOD_ECHECK); ?></td>
</tr>
<tr>
<td align="right"><?php print_string("echeckabacode", "enrol_authorize") ?>: </td>
</form>
</div>
<!-- END ECHECK -->
-<?php } /* end: print_echeck_form */ ?>
<?php
-function print_other_method($currentmethod, $paymentmethodsenabled, $course)
+}
+
+function print_other_method($currentmethod)
{
+ global $course;
+
if ($currentmethod == AN_METHOD_CC) {
- $otheravailable = in_array(AN_METHOD_ECHECK, $paymentmethodsenabled);
+ $otheravailable = in_array(AN_METHOD_ECHECK, enrolment_plugin_authorize::get_list_of_payment_methods());
$url = 'enrol.php?id='.$course->id.'&paymentmethod='.AN_METHOD_ECHECK;
$stringtofetch = 'usingecheckmethod';
}
else {
- $otheravailable = in_array(AN_METHOD_CC, $paymentmethodsenabled);
+ $otheravailable = in_array(AN_METHOD_CC, enrolment_plugin_authorize::get_list_of_payment_methods());
$url = 'enrol.php?id='.$course->id.'&paymentmethod='.AN_METHOD_CC;
$stringtofetch = 'usingccmethod';
}