);
}
+=item realtime_lec
+
+Attempts to pay this invoice with phone bill (LEC) payment via a
+Business::OnlinePayment realtime gateway. See
+http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment
+for supported processors.
+
+=cut
+
+sub realtime_ach {
+ my $self = shift;
+ $self->realtime_bop(
+ 'LEC',
+ $bop_processor,
+ $bop_login,
+ $bop_password,
+ $bop_action,
+ \@bop_options,
+ @_
+ );
+}
+
sub realtime_bop {
my( $self, $method, $processor, $login, $password, $action, $options ) = @_;
my $cust_main = $self->cust_main;
( $content{account_number}, $content{routing_code} ) =
split('@', $cust_main->payinfo);
$content{bank_name} = $cust_main->payname;
+ } elsif ( $method eq 'LEC' ) {
+ $content{phone} = $cust_main->payinfo;
}
my $transaction =
new Business::OnlinePayment( $processor, @$options );
$transaction->content(
- %content,
'type' => $method,
'login' => $login,
'password' => $password,
'referer' => 'http://cleanwhisker.420.am/',
'email' => $email,
'phone' => $cust_main->daytime || $cust_main->night,
+ %content, #after
);
$transaction->submit();
my %method2payby = (
'CC' => 'CARD',
'CHECK' => 'CHEK',
+ 'LEC' => 'LECB',
);
my $cust_pay = new FS::cust_pay ( {
=head1 VERSION
-$Id: cust_bill.pm,v 1.41.2.8 2002-11-16 10:33:17 ivan Exp $
+$Id: cust_bill.pm,v 1.41.2.9 2002-11-19 09:52:01 ivan Exp $
=head1 BUGS
=item ship_fax - phone (optional)
-=item payby - `CARD' (credit cards), `CHEK' (electronic check), `BILL' (billing), `COMP' (free), or `PREPAY' (special billing type: applies a credit - see L<FS::prepay_credit> and sets billing type to BILL)
+=item payby - `CARD' (credit cards), `CHEK' (electronic check), `LECB' (Phone bill billing), `BILL' (billing), `COMP' (free), or `PREPAY' (special billing type: applies a credit - see L<FS::prepay_credit> and sets billing type to BILL)
=item payinfo - card number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) or prepayment identifier (see L<FS::prepay_credit>)
$self->invoicing_list( $invoicing_list );
}
- if ( $self->payby =~ /^(CARD|CHEK)$/ &&
+ if ( $self->payby =~ /^(CARD|CHEK|LECB)$/ &&
grep { $self->get($_) ne $old->get($_) } qw(payinfo paydate payname) ) {
# card info has changed, want to retry realtime_card invoice events
#false laziness w/collect
foreach my $cust_bill_event (
grep {
#$_->part_bill_event->plan eq 'realtime-card'
- $_->part_bill_event->eventcode eq '$cust_bill->realtime_card();'
+ $_->part_bill_event->eventcode =~
+ /^\$cust_bill\->realtime_(card|ach|lec)\(\);$/
&& $_->status eq 'done'
&& $_->statustext
}
$payinfo = "$1\@$2";
$self->payinfo($payinfo);
+ } elsif ( $self->payby eq 'LECB' ) {
+
+ my $payinfo = $self->payinfo;
+ $payinfo =~ s/\D//g;
+ $payinfo =~ /^1?(\d{10})$/ or return 'invalid btn billing telephone number';
+ $payinfo = $1;
+ $self->payinfo($payinfo);
+
} elsif ( $self->payby eq 'BILL' ) {
$error = $self->ut_textn('payinfo');
if ( $self->paydate eq '' || $self->paydate eq '-' ) {
return "Expriation date required"
- unless $self->payby =~ /^(BILL|PREPAY|CHEK)$/;
+ unless $self->payby =~ /^(BILL|PREPAY|CHEK|LECB)$/;
$self->paydate('');
} else {
$self->paydate =~ /^(\d{1,2})[\/\-](\d{2}(\d{2})?)$/
L<Time::Local> and L<Date::Parse> for conversion functions.
=item payby - `CARD' (credit cards), `CHEK' (electronic check/ACH),
-`BILL' (billing), or `COMP' (free)
+`LECB' (phone bill billing), `BILL' (billing), or `COMP' (free)
=item payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively
$self->_date(time) unless $self->_date;
- $self->payby =~ /^(CARD|CHEK|BILL|COMP)$/ or return "Illegal payby";
+ $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP)$/ or return "Illegal payby";
$self->payby($1);
#false laziness with cust_refund::check
=head1 VERSION
-$Id: cust_pay.pm,v 1.21.4.1 2002-10-12 10:15:53 ivan Exp $
+$Id: cust_pay.pm,v 1.21.4.2 2002-11-19 09:52:02 ivan Exp $
=head1 BUGS
L<Time::Local> and L<Date::Parse> for conversion functions.
=item payby - `CARD' (credit cards), `CHEK' (electronic check/ACH),
-`BILL' (billing), or `COMP' (free)
+`LECB' (Phone bill billing), `BILL' (billing), or `COMP' (free)
=item payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)
unless $self->crednum
|| qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
- $self->payby =~ /^(CARD|CHEK|BILL|COMP)$/ or return "Illegal payby";
+ $self->payby =~ /^(CARD|CHEK|LECB|BILL|COMP)$/ or return "Illegal payby";
$self->payby($1);
#false laziness with cust_pay::check
=head1 VERSION
-$Id: cust_refund.pm,v 1.18.4.1 2002-10-12 10:15:53 ivan Exp $
+$Id: cust_refund.pm,v 1.18.4.2 2002-11-19 09:52:02 ivan Exp $
=head1 BUGS
=item eventpart - primary key
-=item payby - CARD, CHEK, BILL, or COMP
+=item payby - CARD, CHEK, LECB, BILL, or COMP
=item event - event name
}
my $error = $self->ut_numbern('eventpart')
- || $self->ut_enum('payby', [qw( CARD CHEK BILL COMP )] )
+ || $self->ut_enum('payby', [qw( CARD CHEK LECB BILL COMP )] )
|| $self->ut_text('event')
|| $self->ut_anything('eventcode')
|| $self->ut_number('seconds')
grep { /^\s*(\w+)\s+(.*\S)\s*$/ }
split("\n", $self->option('attributes'));
- foreach my $table (qw(reply check)) {
- my $method = "radius_$table";
- my %radius = $svc_acct->$method();
- foreach my $radius ( keys %radius ) {
- ( my $ldap = $radius ) =~ s/\-//g;
- $attrib{$ldap} = $radius{$radius};
+ if ( $self->option('radius') ) {
+ foreach my $table (qw(reply check)) {
+ my $method = "radius_$table";
+ my %radius = $svc_acct->$method();
+ foreach my $radius ( keys %radius ) {
+ ( my $ldap = $radius ) =~ s/\-//g;
+ $attrib{$ldap} = $radius{$radius};
+ }
}
}
If the package has B<0> setup and B<0> recur, 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)
+
=cut
sub payby {
#!/usr/bin/perl -Tw
#
-# $Id: signup.cgi,v 1.29.2.1 2002-10-12 10:15:53 ivan Exp $
+# $Id: signup.cgi,v 1.29.2.2 2002-11-19 09:52:02 ivan Exp $
use strict;
use vars qw( @payby $cgi $locales $packages $pops $init_data $error
$self_url
);
use subs qw( print_form print_okay print_decline
- signup_default success_default decline_default
+ success_default decline_default
expselect );
use CGI;
#use CGI::Carp qw(fatalsToBrowser);
$agentnum = $1;
}
} else {
- $signup_template = new Text::Template ( TYPE => 'STRING',
- SOURCE => &signup_default,
- DELIMITERS => [ '<%=', '%>' ]
- )
- or die $Text::Template::ERROR;
+ #too much maintenance hassle to keep in this file
+ die "can't find ./signup.html or /usr/local/freeside/signup.html";
+ #$signup_template = new Text::Template ( TYPE => 'STRING',
+ # SOURCE => &signup_default,
+ # DELIMITERS => [ '<%=', '%>' ]
+ # )
+ # or die $Text::Template::ERROR;
}
if ( -e $success_html ) {
END
}
-sub signup_default { #html to use if you don't specify a template file
- <<'END';
-<HTML><HEAD><TITLE>ISP Signup form</TITLE></HEAD>
-<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>ISP Signup form</FONT><BR><BR>
-<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT>
-<FORM ACTION="<%= $self_url %>" METHOD=POST>
-<INPUT TYPE="hidden" NAME="magic" VALUE="process">
-<INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>">
-<INPUT TYPE="hidden" NAME="ss" VALUE="">
-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><SELECT NAME="state" SIZE="1">
-
- <%=
- foreach ( @{$locales} ) {
- $OUT .= '<OPTION';
- $OUT .= ' SELECTED' if ( $state eq $_->{'state'}
- && $county eq $_->{'county'}
- && $country eq $_->{'country'}
- );
- $OUT .= '>'. $_->{'state'};
- $OUT .= ' ('. $_->{'county'}. ')' if $_->{'county'};
- $OUT .= ' / '. $_->{'country'};
- }
- %>
-
- </SELECT></TD>
- <TH><font color="#ff0000">*</font>Zip</TH>
- <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>"></TD>
-</TR>
-<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>Billing information<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%">
-<TR><TD>
-
- <%=
- $OUT .= '<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>
-<%= scalar(@payby) > 1 ? '<TR><TD>Billing type</TD></TR>' : '' %>
-</TABLE>
-<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="">!,
- '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="">!,
- 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"><INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037">Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!,
- '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>!,
- );
-
- 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">!,
- '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">!,
- 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"><INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037">Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!,
- '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>!,
- );
-
- 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><font color="#ff0000">*</font> required fields for each billing type
-<BR><BR>First package
-<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%">
-<TR>
- <TD COLSPAN=2><SELECT NAME="pkgpart"><OPTION VALUE="">(none)
-
- <%=
- foreach my $package ( @{$packages} ) {
- $OUT .= '<OPTION VALUE="'. $package->{'pkgpart'}. '"';
- $OUT .= ' SELECTED' if $pkgpart && $package->{'pkgpart'} == $pkgpart;
- $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" VALUE="Signup">
-</FORM></BODY></HTML>
-END
-}
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="">!,
+ '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="">!,
+ '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' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", "12-2037"). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!,
'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>!,
);
+ 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">!,
+ '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">!,
+ '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' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", $paydate). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!,
'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>!,
<li><a name="part_bill_event" href="man/FS/part_bill_event.html">part_bill_event</a> - Invoice event definitions
<ul>
<li>eventpart - primary key
- <li>payby - CARD, BILL, or COMP
+ <li>payby - CARD, CHEK, LECB, BILL, or COMP
<li>event - event name
<li>eventcode - event action
<li>seconds - how long after the invoice date (<a href="#cust_bill">cust_bill</a>._date) events of this type are triggered
<li><i>ship_daytime</i>
<li><i>ship_night</i>
<li><i>ship_fax</i>
- <li>payby - CARD, BILL, or COMP
+ <li>payby - CARD, CHEK, LECB, BILL, or COMP
<li>payinfo - card number, P.O.#, or comp issuer
<li>paydate - expiration date
<li>payname - billing name (name on card)
<li>custnum - <a href="#cust_main">customer</a>
<li>paid - amount
<li>_date
- <li>payby - CARD, BILL, or COMP
+ <li>payby - CARD, CHEK, LECB, BILL, or COMP
<li>payinfo - card number, P.O.#, or comp issuer
<li>paybatch - text field for tracking card processor batches
<li>closed - books closed flag, empty or `Y'
<li>custnum - <a href="#cust_main">customer</a>
<li>refund - amount
<li>_date
- <li>payby - CARD, BILL or COMP
+ <li>payby - CARD, CHEK, LECB, BILL or COMP
<li>payinfo - card number, P.O.#, or comp issuer
<li>otaker - order taker
<li>closed - books closed flag, empty or `Y'
print qq!<INPUT TYPE="hidden" NAME="invoicing_list" VALUE="!.
join(', ', $cust_main->invoicing_list). '">';
- foreach my $payby (qw( CARD CHEK BILL COMP )) {
+ foreach my $payby (qw( CARD CHEK LECB BILL COMP )) {
foreach my $field (qw( payinfo payname )) {
print qq!<INPUT TYPE="hidden" NAME="${payby}_$field" VALUE="!.
$cust_main->getfield($field). '">';
my %payby = (
'CARD' => qq!Credit card<BR>${r}<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR>${r}Exp !. expselect("CARD"). qq!<BR>${r}Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!,
'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE=""><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="">!,
+ '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' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"><INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037">Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="">!,
'COMP' => qq!Complimentary<BR>${r}Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR>${r}Exp !. expselect("COMP"),
);
my %paybychecked = (
'CARD' => qq!Credit card<BR>${r}<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR>${r}Exp !. expselect("CARD", $cust_main->paydate). qq!<BR>${r}Name on card<BR><INPUT TYPE="text" NAME="CARD_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">!,
+ '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' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"><INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037">Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!,
'COMP' => qq!Complimentary<BR>${r}Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR>${r}Exp !. expselect("COMP", $cust_main->paydate),
);
$cust_main->payby($payby_default) unless $cust_main->payby;
- for (qw(CARD CHEK BILL COMP)) {
+ for (qw(CARD CHEK LECB BILL COMP)) {
print qq!<TD VALIGN=TOP><INPUT TYPE="radio" NAME="payby" VALUE="$_"!;
if ($cust_main->payby eq "$_") {
print qq! CHECKED> $paybychecked{$_}</TD>!;
<TR><TD ALIGN="right">Payby</TD><TD><SELECT NAME="payby">
END
-for (qw(CARD CHEK BILL COMP)) {
+for (qw(CARD CHEK LECB BILL COMP)) {
print qq!<OPTION VALUE="$_"!;
if ($part_bill_event->payby eq $_) {
print " SELECTED>$_</OPTION>";
'<TR><TD ALIGN="right">Bank name</TD><TD BGCOLOR="#ffffff">',
$cust_main->payname, '</TD></TR>'
;
+ } elsif ( $cust_main->payby eq 'LECB' ) {
+ $cust_main->payinfo =~ /^(\d{3})(\d{3})(\d{4})$/;
+ my $payinfo = "$1-$2-$3";
+ print 'Phone bill billing</TD></TR>',
+ '<TR><TD ALIGN="right">Phone number</TD><TD BGCOLOR="#ffffff">',
+ $payinfo, '</TD></TR>',
+ ;
} elsif ( $cust_main->payby eq 'BILL' ) {
print 'Billing</TD></TR>';
print '<TR><TD ALIGN="right">P.O. </TD><TD BGCOLOR="#ffffff">',