use vars qw( @ISA $conf $unsuspendauto $smtpmachine $invoice_from );
use Date::Format;
use Mail::Header;
-use Mail::Internet;
+use Mail::Internet 1.44;
use Business::CreditCard;
use FS::UID qw( dbh );
use FS::Record qw( dbh qsearch qsearchs dbh );
=item _date - specified as a UNIX timestamp; see L<perlfunc/"time">. Also see
L<Time::Local> and L<Date::Parse> for conversion functions.
-=item payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free)
+=item payby - `CARD' (credit cards), `CHEK' (electronic check/ACH),
+`LECB' (phone bill billing), `BILL' (billing), or `COMP' (free)
=item payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively
}
}
- $dbh->commit or die $dbh->errstr if $oldAutoCommit;
-
#false laziness w/ cust_credit::insert
if ( $unsuspendauto && $old_balance && $cust_main->balance <= 0 ) {
my @errors = $cust_main->unsuspend;
}
#eslaf
+ $dbh->commit or die $dbh->errstr if $oldAutoCommit;
+
'';
}
if ( $conf->config('deletepayments') ne '' ) {
my $cust_main = qsearchs('cust_main',{ 'custnum' => $self->custnum });
- #false laziness w/FS::cust_bill::send
- $ENV{MAILADDRESS} = $conf->config('invoice_from'); #??? well as good as any
+ #false laziness w/FS::cust_bill::send & fs_signup_server
+ $ENV{MAILADDRESS} = $invoice_from; #??? well as good as any
my $header = new Mail::Header ( [
"From: $invoice_from",
"To: ". $conf->config('deletepayments'),
$self->_date(time) unless $self->_date;
- $self->payby =~ /^(CARD|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.18 2002-03-18 19:49:10 ivan Exp $
+$Id: cust_pay.pm,v 1.23 2002-11-19 09:51:58 ivan Exp $
=head1 BUGS