diff --git a/enrol/authorize/enrol.html b/enrol/authorize/enrol.html index 1b89b7cb099..83880dd4c4b 100755 --- a/enrol/authorize/enrol.html +++ b/enrol/authorize/enrol.html @@ -23,7 +23,7 @@ $usercountry = empty($form->cccountry) ? $USER->country : $form->cccountry;

-

+

@@ -31,13 +31,13 @@ $usercountry = empty($form->cccountry) ? $USER->country : $form->cccountry; - - @@ -78,7 +78,7 @@ $usercountry = empty($form->cccountry) ? $USER->country : $form->cccountry; an_avs)) { /* Address Verification System */ ?> - @@ -92,6 +92,15 @@ $usercountry = empty($form->cccountry) ? $USER->country : $form->cccountry; + + + + diff --git a/enrol/authorize/enrol.php b/enrol/authorize/enrol.php index 3e252ade0e8..933ff28fe6c 100755 --- a/enrol/authorize/enrol.php +++ b/enrol/authorize/enrol.php @@ -147,26 +147,28 @@ class enrolment_plugin extends enrolment_base } $extra = new stdClass(); - $extra->x_phone = ''; - $extra->x_fax = ''; - $extra->x_first_name = $form->ccfirstname; - $extra->x_last_name = $form->cclastname; - $extra->x_address = $form->ccaddress; - $extra->x_city = $form->cccity; - $extra->x_zip = $form->cczip; - $extra->x_state = $form->ccstate; - $extra->x_country = $form->cccountry; $extra->x_card_num = $form->cc; $extra->x_card_code = $form->cvv; $extra->x_exp_date = $exp_date; $extra->x_currency_code = $curcost['currency']; $extra->x_amount = $curcost['cost']; + $extra->x_first_name = $form->ccfirstname; + $extra->x_last_name = $form->cclastname; + $extra->x_country = $form->cccountry; + $extra->x_address = $form->ccaddress; + $extra->x_state = $form->ccstate; + $extra->x_city = $form->cccity; + $extra->x_zip = $form->cczip; + $extra->x_invoice_num = $order->id; $extra->x_description = $course->shortname; + $extra->x_cust_id = $USER->id; - $extra->x_customer_ip = $useripno; $extra->x_email = $USER->email; + $extra->x_customer_ip = $useripno; $extra->x_email_customer = empty($CFG->enrol_mailstudents) ? 'FALSE' : 'TRUE'; + $extra->x_phone = ''; + $extra->x_fax = ''; $message = ''; $an_review = !empty($CFG->an_review); @@ -296,7 +298,7 @@ class enrolment_plugin extends enrolment_base if (empty($form->cc)) { $this->ccerrors['cc'] = get_string('missingcc', 'enrol_authorize'); } - if (empty($form->cvv) || !is_int($form->cvv)) { + if (empty($form->cvv) || !is_numeric($form->cvv)) { $this->ccerrors['cvv'] = get_string('missingcvv', 'enrol_authorize'); } if (empty($form->cctype)) { @@ -313,7 +315,7 @@ class enrolment_plugin extends enrolment_base $this->ccerrors['cccountry'] = get_string('missingcountry'); } } - if (empty($form->cczip) || !is_int($form->cczip)) { + if (empty($form->cczip) || !is_numeric($form->cczip)) { $this->ccerrors['cczip'] = get_string('missingzip', 'enrol_authorize'); } if (!empty($this->ccerrors)) { diff --git a/enrol/authorize/index.php b/enrol/authorize/index.php index 3635abd9670..a0787f1c400 100644 --- a/enrol/authorize/index.php +++ b/enrol/authorize/index.php @@ -2,7 +2,6 @@ require_once '../../config.php'; require_once $CFG->dirroot.'/enrol/authorize/const.php'; -require_once $CFG->dirroot.'/enrol/authorize/enrol.php'; require_once $CFG->dirroot.'/enrol/authorize/action.php'; define('ORDER_CAPTURE', 'capture');
: + ccerrors['cc'])) { formerr($this->ccerrors['cc']); } ?>
: - + + ccerrors['ccfirstlast'])) { formerr($this->ccerrors['ccfirstlast']); } ?>
: + ccerrors['ccaddress'])) { formerr($this->ccerrors['ccaddress']); } ?>
ccerrors['cccountry'])) { formerr($this->ccerrors['cccountry']); } ?>
+ + + + +
: