+#!/usr/bin/perl -T
#!/usr/bin/perl -Tw
#some false laziness w/selfservice.cgi
my $error = '';
- #some false laziness w/signup.cgi
+ #false laziness w/signup.cgi, identical except for agentnum vs session_id
my $payby = $cgi->param('payby');
if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) {
#$payinfo = join('@', map { $cgi->param( $payby. "_payinfo$_" ) } (1,2) );
my $payinfo = $cgi->param('payinfo');
$payinfo =~ s/\D//g;
- $payinfo =~ /^(\d{13,16})$/
+ $payinfo =~ /^(\d{13,16}|\d{8,9})$/
or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo;
$payinfo = $1;
validate($payinfo)
unless ( $error ) {
my $rv = new_customer ( {
'session_id' => $session_id,
- map { $_ => $cgi->param($_) }
+ map { $_ => scalar($cgi->param($_)) }
qw( last first ss company
address1 address2 city county state zip country
daytime night fax
+
+ ship_last ship_first ship_company
+ ship_address1 ship_address2 ship_city ship_county ship_state
+ ship_zip ship_country
+ ship_daytime ship_night ship_fax
+
payby payinfo paycvv paydate payname invoicing_list
+ referral_custnum promo_code reg_code
pkgpart username sec_phrase _password popnum refnum
),
grep { /^snarf_/ } $cgi->param
} );
$error = $rv->{'error'};
}
+ #eslaf
if ( $error ) {
$action = 'signup';
} else {
$action = 'agent_main';
my $agent_info = agent_info( 'session_id' => $session_id );
- $agent_info->{'message'} = 'Signup sucessful';
+ $agent_info->{'message'} = 'Signup successful';
$agent_info;
}
$action = 'agent_provision';
return {
%{agent_provision()},
- 'message' => $result->{'svc'}. ' setup sucessfully.',
+ 'message' => $result->{'svc'}. ' setup successfully.',
};
}
%{agent_provision()},
'message' => $result->{'error'}
? '<FONT COLOR="#FF0000">'. $result->{'error'}. '</FONT>'
- : $result->{'svc'}. ' setup sucessfully'.
+ : $result->{'svc'}. ' setup successfully'.
': serial number '.
sprintf('%010d', $result->{'id'}). '-'. $result->{'title'}
};
#$cgi->delete( grep { $_ ne 'custnum' } $cgi->param );
return {
%{view_customer()},
- 'message' => 'Package order sucessful.',
+ 'message' => 'Package order successful.',
};
}
#warn join(' / ', map { "$_=>".$fill_in->{$_} } keys %$fill_in). "\n";
$cgi->delete_all();
- $fill_in->{'selfurl'} = $cgi->self_url;
+ $fill_in->{'selfurl'} = $cgi->self_url; #OLD
+ $fill_in->{'self_url'} = $cgi->self_url;
$fill_in->{'cgi'} = \$cgi;
my $template = new Text::Template( TYPE => 'FILE',