diff options
| author | ivan <ivan> | 2002-04-07 05:56:09 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2002-04-07 05:56:09 +0000 | 
| commit | 44e3eff0aa6e7bdb7f4ecd9ee1ddf141e1b68af3 (patch) | |
| tree | 6a636ec1d2984f18a97515ef54969c4c9a641e8c /fs_signup/FS-SignupClient | |
| parent | fca110eff969104793774ed717985e91c53f5318 (diff) | |
working message catalogs (not used for enough yet)
- almost (but not quite) closes Bug#385 - still have to catalog the
  backend things triggered by signup server.
Diffstat (limited to 'fs_signup/FS-SignupClient')
| -rwxr-xr-x | fs_signup/FS-SignupClient/cgi/signup.cgi | 17 | 
1 files changed, 12 insertions, 5 deletions
| diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index 7cf4230e6..46621d1e8 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ b/fs_signup/FS-SignupClient/cgi/signup.cgi @@ -1,6 +1,6 @@  #!/usr/bin/perl -Tw  # -# $Id: signup.cgi,v 1.18 2002-04-07 00:00:40 ivan Exp $ +# $Id: signup.cgi,v 1.19 2002-04-07 05:56:08 ivan Exp $  use strict;  use vars qw( @payby $cgi $locales $packages $pops $init_data $error @@ -120,15 +120,22 @@ if ( defined $cgi->param('magic') ) {      $error = '';      if ( $cgi->param('_password') ne $cgi->param('_password2') ) { -      $error = "Passwords don't match"; #msgcat +      $error = $init_data->{msgcat}{passwords_dont_match}; #msgcat        $password  = '';        $password2 = '';      } else {        $password2 = $cgi->param('_password2'); -      if ( $payby eq 'CARD' && $cgi->param('CARD_type') -           && cardtype($payinfo) ne $cgi->param('CARD_type') ) { -        $error = 'Not an '. $cgi->param('CARD_type'). '| - is: |'. cardtype($payinfo). '|'; #msgcat +      if ( $payby eq 'CARD' && $cgi->param('CARD_type') ) { +        $payinfo =~ s/\D//g; + +        $payinfo =~ /^(\d{13,16})$/ +          or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; +        $payinfo = $1; +        validate($payinfo) +          or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; +        cardtype($payinfo) eq $cgi->param('CARD_type') +          or $error ||= $init_data->{msgcat}{not_a}. $cgi->param('CARD_type');        }        $error ||= new_customer ( { | 
