#use CGI::Carp qw(fatalsToBrowser);
use Tie::IxHash;
use Text::Template;
-use Business::CreditCard;
+use Business::CreditCard 0.35;
use HTTP::BrowserDetect;
use HTML::Widgets::SelectLayers;
use FS::SelfService qw( signup_info new_customer );
my $payinfo = $cgi->param('payinfo');
$payinfo =~ s/\D//g;
- $payinfo =~ /^(\d{13,16}|\d{8,9})$/
+ $payinfo =~ /^(\d{13,19}|\d{8,9})$/
or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo;
$payinfo = $1;
validate($payinfo)
didselector
);
-sub add_password_validation {
- my $fieldid = shift;
- my $out = '';
- if ((-e './send_xmlhttp.html') && (-e './add_password_validation.html')) {
- my $template = new Text::Template( TYPE => 'FILE',
- SOURCE => "./send_xmlhttp.html",
- DELIMITERS => [ '<%=', '%>' ],
- UNTAINT => 1,
- )
- or die $Text::Template::ERROR;
- $out .= $template->fill_in( PACKAGE => 'FS::SelfService::_signupcgi' );
- $template = new Text::Template( TYPE => 'FILE',
- SOURCE => "./add_password_validation.html",
- DELIMITERS => [ '<%=', '%>' ],
- UNTAINT => 1,
- )
- or die $Text::Template::ERROR;
- $out .= $template->fill_in( PACKAGE => 'FS::SelfService::_signupcgi' );
- $out .= <<ENDOUT;
-<SCRIPT>
-add_password_validation('$fieldid');
-</SCRIPT>
-ENDOUT
- }
- return $out;
-}
-
-