Permalink
Browse files

Moved validation functions to enrol_authorize_form class.

  • Loading branch information...
1 parent c7aaa3c commit 9c2498d381962ac1198c42f99e55ac8d9d779b31 ethem committed Feb 5, 2007
Showing with 4 additions and 4 deletions.
  1. +4 −4 enrol/authorize/enrol_form.php
View
8 enrol/authorize/enrol_form.php
@@ -188,7 +188,7 @@ function validation($data)
}
$expdate = sprintf("%02d", intval($data['ccexpiremm'])) . $data['ccexpireyyyy'];
- $validcc = $this->validade_cc($data['cc'], $data['cctype'], $expdate);
+ $validcc = $this->validate_cc($data['cc'], $data['cctype'], $expdate);
if (!$validcc) {
if ($validcc === 0) {
$errors['ccexpiregrp'] = get_string('ccexpired', 'enrol_authorize');
@@ -204,7 +204,7 @@ function validation($data)
}
elseif (AN_METHOD_ECHECK == $data['paymentmethod'])
{
- if (!$this->validade_aba($data['abacode'])) {
+ if (!$this->validate_aba($data['abacode'])) {
$errors['abacode'] = get_string('invalidaba', 'enrol_authorize');
}
@@ -240,7 +240,7 @@ function other_method_available($currentmethod)
}
}
- function validade_aba($aba)
+ function validate_aba($aba)
{
if (ereg("^[0-9]{9}$", $aba)) {
$n = 0;
@@ -254,7 +254,7 @@ function validade_aba($aba)
return false;
}
- function validade_cc($Num, $Name = "n/a", $Exp = "")
+ function validate_cc($Num, $Name = "n/a", $Exp = "")
{
// Check the expiration date first
if (strlen($Exp))

0 comments on commit 9c2498d

Please sign in to comment.