diff options
-rw-r--r-- | FS/FS/part_pkg.pm | 30 | ||||
-rw-r--r-- | FS/FS/part_pkg/flat.pm | 4 | ||||
-rw-r--r-- | FS/FS/part_pkg/flat_comission.pm | 7 | ||||
-rw-r--r-- | FS/FS/part_pkg/flat_comission_cust.pm | 7 | ||||
-rw-r--r-- | FS/FS/part_pkg/flat_comission_pkg.pm | 8 | ||||
-rw-r--r-- | FS/FS/part_pkg/flat_delayed.pm | 7 | ||||
-rw-r--r-- | FS/FS/part_pkg/prorate.pm | 7 | ||||
-rw-r--r-- | FS/FS/part_pkg/sesmon_hour.pm | 11 | ||||
-rw-r--r-- | FS/FS/part_pkg/sesmon_minute.pm | 10 | ||||
-rw-r--r-- | FS/FS/part_pkg/sql_external.pm | 11 | ||||
-rw-r--r-- | FS/FS/part_pkg/sql_generic.pm | 11 | ||||
-rw-r--r-- | FS/FS/part_pkg/sqlradacct_hour.pm | 12 | ||||
-rw-r--r-- | FS/FS/part_pkg/subscription.pm | 7 | ||||
-rw-r--r-- | FS/FS/part_pkg/voip_sqlradacct.pm | 4 | ||||
-rwxr-xr-x | fs_signup/FS-SignupClient/cgi/signup-freeoption.html | 262 |
15 files changed, 328 insertions, 70 deletions
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index f2719ce69..9392f4bf4 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -453,9 +453,9 @@ sub svcpart { Returns a list of the acceptable payment types for this package. Eventually this should come out of a database table and be editable, but currently has the -following logic instead; +following logic instead: -If the package has B<0> setup and B<0> recur, the single item B<BILL> is +If the package is free, the single item B<BILL> is returned, otherwise, the single item B<CARD> is returned. (CHEK? LEC? Probably shouldn't accept those by default, prone to abuse) @@ -464,15 +464,35 @@ returned, otherwise, the single item B<CARD> is returned. sub payby { my $self = shift; - #if ( $self->setup == 0 && $self->recur == 0 ) { - if ( $self->setup =~ /^\s*0+(\.0*)?\s*$/ - && $self->recur =~ /^\s*0+(\.0*)?\s*$/ ) { + if ( $self->is_free ) { ( 'BILL' ); } else { ( 'CARD' ); } } +=item is_free + +Returns true if this package is free. + +=cut + +sub is_free { + my $self = shift; + unless ( $self->plan ) { + $self->setup =~ /^\s*0+(\.0*)?\s*$/ + && $self->recur =~ /^\s*0+(\.0*)?\s*$/; + } elsif ( $self->can('is_free_options') ) { + not grep { $_ !~ /^\s*0*(\.0*)?\s*$/ } + map { $self->option($_) } + $self->is_free_options; + } else { + warn "FS::part_pkg::is_free: FS::part_pkg::". $self->plan. " subclass ". + "provides neither is_free_options nor is_free method; returning false"; + 0; + } +} + =item freq_pretty Returns an english representation of the I<freq> field, such as "monthly", diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index a3939ba9e..b62aebd7d 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -33,4 +33,8 @@ sub calc_recur { $self->option('recur_fee'); } +sub is_free_options { + qw( setup_fee recur_fee ); +} + 1; diff --git a/FS/FS/part_pkg/flat_comission.pm b/FS/FS/part_pkg/flat_comission.pm index d39347015..9b288c3a3 100644 --- a/FS/FS/part_pkg/flat_comission.pm +++ b/FS/FS/part_pkg/flat_comission.pm @@ -5,7 +5,7 @@ use vars qw(@ISA %info); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Flat rate with recurring commission per (any) active package', @@ -29,11 +29,6 @@ use FS::part_pkg; 'weight' => 62, ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg ) = @_; diff --git a/FS/FS/part_pkg/flat_comission_cust.pm b/FS/FS/part_pkg/flat_comission_cust.pm index 5de45c5ef..8aa993ca6 100644 --- a/FS/FS/part_pkg/flat_comission_cust.pm +++ b/FS/FS/part_pkg/flat_comission_cust.pm @@ -5,7 +5,7 @@ use vars qw(@ISA %info); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Flat rate with recurring commission per active customer', @@ -29,11 +29,6 @@ use FS::part_pkg; 'weight' => '60', ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg ) = @_; diff --git a/FS/FS/part_pkg/flat_comission_pkg.pm b/FS/FS/part_pkg/flat_comission_pkg.pm index 1e6e69bb7..befa77e23 100644 --- a/FS/FS/part_pkg/flat_comission_pkg.pm +++ b/FS/FS/part_pkg/flat_comission_pkg.pm @@ -5,7 +5,7 @@ use vars qw(@ISA %info); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Flat rate with recurring commission per (selected) active package', @@ -37,11 +37,7 @@ use FS::part_pkg; 'weight' => '64', ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - +# XXX this needs to be fixed!!! sub calc_recur { my($self, $cust_pkg ) = @_; $self->option('recur_fee'); diff --git a/FS/FS/part_pkg/flat_delayed.pm b/FS/FS/part_pkg/flat_delayed.pm index cf4ffef84..f39783fd6 100644 --- a/FS/FS/part_pkg/flat_delayed.pm +++ b/FS/FS/part_pkg/flat_delayed.pm @@ -5,7 +5,7 @@ use vars qw(@ISA %info); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Free (or setup fee) for X days, then flat rate'. @@ -37,9 +37,4 @@ sub calc_setup { $self->option('setup_fee'); } -sub calc_recur { - my($self, $cust_pkg ) = @_; - $self->option('recur_fee'); -} - 1; diff --git a/FS/FS/part_pkg/prorate.pm b/FS/FS/part_pkg/prorate.pm index 37cb37faf..d27adbda7 100644 --- a/FS/FS/part_pkg/prorate.pm +++ b/FS/FS/part_pkg/prorate.pm @@ -6,7 +6,7 @@ use Time::Local qw(timelocal); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'First partial month pro-rated, then flat-rate (1st of month billing)', @@ -25,11 +25,6 @@ use FS::part_pkg; 'weight' => 20, ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg, $sdate ) = @_; my $mnow = $$sdate; diff --git a/FS/FS/part_pkg/sesmon_hour.pm b/FS/FS/part_pkg/sesmon_hour.pm index 8f6da197e..0367b2b4c 100644 --- a/FS/FS/part_pkg/sesmon_hour.pm +++ b/FS/FS/part_pkg/sesmon_hour.pm @@ -5,7 +5,7 @@ use vars qw(@ISA %info); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Base charge plus charge per-hour from the session monitor', @@ -29,11 +29,6 @@ use FS::part_pkg; 'weight' => 80, ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg ) = @_; @@ -45,4 +40,8 @@ sub calc_recur { } +sub is_free_options { + qw( setup_fee recur_fee recur_hourly_charge ); +} + 1; diff --git a/FS/FS/part_pkg/sesmon_minute.pm b/FS/FS/part_pkg/sesmon_minute.pm index 9ef76d781..7cafbe056 100644 --- a/FS/FS/part_pkg/sesmon_minute.pm +++ b/FS/FS/part_pkg/sesmon_minute.pm @@ -5,7 +5,7 @@ use vars qw(@ISA %info); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Base charge plus charge per-minute from the session monitor', @@ -29,10 +29,6 @@ use FS::part_pkg; 'weight' => 80, ); -sub calc_setup { - my( $self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} sub cakc_recur { my( $self, $cust_pkg ) = @); @@ -43,4 +39,8 @@ sub cakc_recur { $self->option('recur_flat') + $min * $self->option('recur_minly_charge'); } +sub is_free_options { + qw( setup_fee recur_fee recur_minly_charge ); +} + 1; diff --git a/FS/FS/part_pkg/sql_external.pm b/FS/FS/part_pkg/sql_external.pm index 688f91887..8da4d3135 100644 --- a/FS/FS/part_pkg/sql_external.pm +++ b/FS/FS/part_pkg/sql_external.pm @@ -6,7 +6,7 @@ use DBI; #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Base charge plus additional fees for external services from a configurable SQL query', @@ -36,11 +36,6 @@ use FS::part_pkg; 'weight' => '72', ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg ) = @_; @@ -65,4 +60,8 @@ sub calc_recur { $price; } +sub is_free { + 0; +} + 1; diff --git a/FS/FS/part_pkg/sql_generic.pm b/FS/FS/part_pkg/sql_generic.pm index 85c341375..b7c7008c1 100644 --- a/FS/FS/part_pkg/sql_generic.pm +++ b/FS/FS/part_pkg/sql_generic.pm @@ -6,7 +6,7 @@ use DBI; #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Base charge plus a per-domain metered rate from a configurable SQL query', @@ -44,11 +44,6 @@ use FS::part_pkg; 'weight' => '70', ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg ) = @_; @@ -76,4 +71,8 @@ sub calc_recur { $self->option('recur_flat') + $units * $self->option('recur_unit_charge'); } +sub is_free_options { + qw( setup_fee recur_flat recur_unit_charge ); +} + 1; diff --git a/FS/FS/part_pkg/sqlradacct_hour.pm b/FS/FS/part_pkg/sqlradacct_hour.pm index f5ad2b1fc..a2550e241 100644 --- a/FS/FS/part_pkg/sqlradacct_hour.pm +++ b/FS/FS/part_pkg/sqlradacct_hour.pm @@ -5,7 +5,7 @@ use vars qw(@ISA %info); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'Base charge plus per-hour (and for data) from an SQL RADIUS radacct table', @@ -51,11 +51,6 @@ use FS::part_pkg; 'weight' => 40, ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg, $sdate, $details ) = @_; @@ -112,4 +107,9 @@ sub calc_recur { + $hourscharge + $inputcharge + $outputcharge + $totalcharge; } +sub is_free_options { + qw( setup_fee recur_flat recur_hourly_charge + recur_input_charge recur_output_charge recur_total_charge ); +} + 1; diff --git a/FS/FS/part_pkg/subscription.pm b/FS/FS/part_pkg/subscription.pm index 4dc9252a7..d057b6b34 100644 --- a/FS/FS/part_pkg/subscription.pm +++ b/FS/FS/part_pkg/subscription.pm @@ -6,7 +6,7 @@ use Time::Local qw(timelocal); #use FS::Record qw(qsearch qsearchs); use FS::part_pkg; -@ISA = qw(FS::part_pkg); +@ISA = qw(FS::part_pkg::flat); %info = ( 'name' => 'First partial month full charge, then flat-rate (1st of month billing)', @@ -25,11 +25,6 @@ use FS::part_pkg; 'weight' => 30, ); -sub calc_setup { - my($self, $cust_pkg ) = @_; - $self->option('setup_fee'); -} - sub calc_recur { my($self, $cust_pkg, $sdate ) = @_; diff --git a/FS/FS/part_pkg/voip_sqlradacct.pm b/FS/FS/part_pkg/voip_sqlradacct.pm index c22e0fc9a..3989cdba6 100644 --- a/FS/FS/part_pkg/voip_sqlradacct.pm +++ b/FS/FS/part_pkg/voip_sqlradacct.pm @@ -149,5 +149,9 @@ sub calc_recur { } +sub is_free { + 0; +} + 1; diff --git a/fs_signup/FS-SignupClient/cgi/signup-freeoption.html b/fs_signup/FS-SignupClient/cgi/signup-freeoption.html new file mode 100755 index 000000000..40ad03c0b --- /dev/null +++ b/fs_signup/FS-SignupClient/cgi/signup-freeoption.html @@ -0,0 +1,262 @@ +<HTML><HEAD><TITLE>ISP Signup form</TITLE></HEAD> +<BODY BGCOLOR="#e8e8e8" onUnload="myclose()"> +<script language="JavaScript"><!-- + var mywindow = -1; + function myopen(filename,windowname,properties) { + myclose(); + mywindow = window.open(filename,windowname,properties); + } + function myclose() { + if ( mywindow != -1 ) + mywindow.close(); + mywindow = -1 + } +//--></script> +<FONT SIZE=7>ISP Signup form</FONT><BR><BR> +<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> +<FORM NAME="OneTrueForm" ACTION="<%= $self_url %>" METHOD=POST onSubmit="document.OneTrueForm.signup.disabled=true"> +<INPUT TYPE="hidden" NAME="magic" VALUE="process"> +<INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>"> +<INPUT TYPE="hidden" NAME="ss" VALUE=""> +Where did you hear about our service? <SELECT NAME="refnum"> +<%= + $OUT .= '<OPTION VALUE="">' unless $refnum; + foreach my $part_referral ( @{$init_data->{'part_referral'}} ) { + $OUT .= '<OPTION VALUE="'. $part_referral->{'refnum'}. '"'; + $OUT .= ' SELECTED' if $part_referral->{'refnum'} eq $refnum; + $OUT .= '>'. $part_referral->{'referral'}; + } +%> +</SELECT><BR><BR> +Contact Information +<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> +<TR> + <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH> + <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="<%= $last %>">, + <INPUT TYPE="text" NAME="first" VALUE="<%= $first %>"></TD> +</TR> +<TR> + <TD ALIGN="right">Company</TD> + <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="<%= $company %>"></TD> +</TR> +<TR> + <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH> + <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="<%= $address1 %>"></TD> +</TR> +<TR> + <TD ALIGN="right"> </TD> + <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="<%= $address2 %>"></TD> +</TR> +<TR> + <TH ALIGN="right"><font color="#ff0000">*</font>City</TH> + <TD><INPUT TYPE="text" NAME="city" VALUE="<%= $city %>"></TD> + <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH> + <TD> + <%= + ($county_html, $state_html, $country_html) = + regionselector( $county, $state, $country ); + + "$county_html $state_html"; + %> + </TD> + <TH><font color="#ff0000">*</font>Zip</TH> + <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>"></TD> +</TR> +<TR> + <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH> + <TD><%= $country_html %></TD> +<TR> + <TD ALIGN="right">Day Phone</TD> + <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="<%= $daytime %>" SIZE=18></TD> +</TR> +<TR> + <TD ALIGN="right">Night Phone</TD> + <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="<%= $night %>" SIZE=18></TD> +</TR> +<TR> + <TD ALIGN="right">Fax</TD> + <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="<%= $fax %>" SIZE=12></TD> +</TR> +</TABLE><font color="#ff0000">*</font> required fields<BR> +<BR> +<%= + my $first_payby = $packages->[0]{'payby'}[0]; + unless ( grep { scalar( @{$_->{'payby'}} ) > 1 + || $_->{'payby'}->[0] ne $first_payby + } @$packages + ) { + @payby = ( $first_payby ); + } + + unless ( scalar(@payby) == 1 && $payby[0] eq 'BILL' ) { + + $OUT .= ' Billing information + <TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> + <TR><TD> + <INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"'; + + my @invoicing_list = split(', ', $invoicing_list ); + + $OUT .= ' CHECKED' + if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; + + $OUT .= '> Postal mail invoice + </TD></TR> + <TR><TD>Email invoice + <INPUT TYPE="text" NAME="invoicing_list" VALUE="' + .join(', ', grep { $_ ne 'POST' } split(', ', $invoicing_list ) ). + '"></TD></TR>'; + + $OUT .= '<TR><TD>Billing type</TD></TR>' + if scalar(@payby) > 1; + + $OUT .= '</TABLE>'; + + } else { + $OUT .= '<INPUT TYPE="hidden" NAME="invoicing_list" VALUE=""> + <INPUT TYPE="hidden" NAME="invoicing_list_POST" VALUE="">'; + } + +%> + +<TABLE BGCOLOR="#c0c0c0" BORDER=1 WIDTH="100%"> +<TR> + + <%= + + my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>'; + my %types = ( + 'VISA' => 'VISA card', + 'MasterCard' => 'MasterCard', + 'Discover' => 'Discover card', + 'American Express' => 'American Express card', + ); + foreach ( keys %types ) { + $selected = $cgi->param('CARD_type') eq $types{$_} ? 'SELECTED' : ''; + $cardselect .= qq!<OPTION $selected VALUE="$types{$_}">$_</OPTION>!; + } + $cardselect .= '</SELECT>'; + + my %payby = ( + 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!, + 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="">!, + 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="">!, + 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!, + 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, + 'BILL' => <<'END', +<INPUT TYPE="hidden" NAME="BILL_payinfo" VALUE=""> +<INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"> +<INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037"> +<INPUT TYPE="hidden" NAME="BILL_payname" VALUE=""> +END + 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("COMP"), + 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="" MAXLENGTH=80>!, + ); + + if ( $init_data->{'cvv_enabled'} ) { + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 + $payby{$payby} .= qq!<BR>CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>) <INPUT TYPE="text" NAME=${payby}_paycvv VALUE="" SIZE=4 MAXLENGTH=4>!; + } + } + + my( $account, $aba ) = split('@', $payinfo); + my %paybychecked = ( + 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname">!, + 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname">!, + 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="$payname">!, + 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="$payname">!, + 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="$payinfo" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, + 'BILL' => <<'END', +<INPUT TYPE="hidden" NAME="BILL_payinfo" VALUE=""> +<INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"> +<INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037"> +<INPUT TYPE="hidden" NAME="BILL_payname" VALUE=""> +END + + 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("COMP", $paydate), + 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="$payinfo" MAXLENGTH=80>!, + ); + + if ( $init_data->{'cvv_enabled'} ) { + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 + $paybychecked{$payby} .= qq!<BR>CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>) <INPUT TYPE="text" NAME=${payby}_paycvv VALUE="$paycvv" SIZE=4 MAXLENGTH=4>!; + } + } + + for (@payby) { + if ( scalar(@payby) == 1) { + $OUT .= '<TD VALIGN=TOP>'. + qq!<INPUT TYPE="hidden" NAME="payby" VALUE="$_">!. + "$paybychecked{$_}</TD>"; + } else { + $OUT .= qq!<TD VALIGN=TOP><INPUT TYPE="radio" NAME="payby" VALUE="$_"!; + if ($payby eq $_) { + $OUT .= qq! CHECKED> $paybychecked{$_}</TD>!; + } else { + $OUT .= qq!> $payby{$_}</TD>!; + } + + } + } + %> + +</TR></TABLE> +<%= unless ( scalar(@payby) == 1 && $payby[0] eq 'BILL' ) { + $OUT .= '<font color="#ff0000">*</font> required fields for each billing type'; + } + ''; +%> +<BR><BR>First package +<INPUT TYPE="hidden" NAME="promo_code" VALUE="<%= $cgi->param('promo_code') %>"><TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> +<TR> + <TD COLSPAN=2><SELECT NAME="pkgpart"> + + <%= + $OUT .= '<OPTION VALUE="">(none)' unless scalar(@$packages) == 1; + foreach my $package ( @{$packages} ) { + $OUT .= '<OPTION VALUE="'. $package->{'pkgpart'}. '"'; + $OUT .= ' SELECTED' + if ( $pkgpart && $package->{'pkgpart'} == $pkgpart ) + || scalar(@$packages) == 1; + $OUT .= '>'. $package->{'pkg'}; + } + %> + + </SELECT></TD> +</TR> +<TR> + <TD ALIGN="right">Username</TD> + <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> +</TR> +<TR> + <TD ALIGN="right">Password</TD> + <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $password %>"></TD> +</TR> +<TR> + <TD ALIGN="right">Re-enter Password</TD> + <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $password2 %>"></TD> +</TR> +<%= + if ( $init_data->{'security_phrase'} ) { + $OUT .= <<ENDOUT; +<TR> + <TD ALIGN="right">Security Phrase</TD> + <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> + </TD> +</TR> +ENDOUT + } else { + $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; + } +%> +<%= + if ( scalar(@$pops) ) { + $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'. + popselector($popnum). '</TD></TR>'; + } else { + $OUT .= popselector($popnum); + } +%> +</TABLE> +<BR><BR><INPUT TYPE="submit" NAME="signup" VALUE="Signup"> +</FORM></BODY></HTML> |