use vars qw( $bop_processor $bop_login $bop_password $bop_action @bop_options );
use vars qw( $ach_processor $ach_login $ach_password $ach_action @ach_options );
use vars qw( $invoice_lines @buf ); #yuck
-use vars qw( $quiet );
+use vars qw( $realtime_bop_decline_quiet );
use Date::Format;
use Mail::Internet 1.44;
use Mail::Header;
@ISA = qw( FS::Record );
+$realtime_bop_decline_quiet = 0;
+
#ask FS::UID to run this stuff for us later
$FS::UID::callback{'FS::cust_bill'} = sub {
$invoice_from = $conf->config('invoice_from');
$smtpmachine = $conf->config('smtpmachine');
+ ( $bop_processor,$bop_login, $bop_password, $bop_action ) = ( '', '', '', '');
+ @bop_options = ();
+ ( $ach_processor,$ach_login, $ach_password, $ach_action ) = ( '', '', '', '');
+ @ach_options = ();
+
if ( $conf->exists('cybercash3.2') ) {
require CCMckLib3_2;
#qw($MCKversion %Config InitConfig CCError CCDebug CCDebug2);
sub realtime_bop {
my( $self, $method, $processor, $login, $password, $action, $options ) = @_;
+
+ #trim an extraneous blank line
+ pop @$options if scalar(@$options) % 2 && $options->[-1] =~ /^\s*$/;
+
my $cust_main = $self->cust_main;
my $amount = $self->owed;
( $content{account_number}, $content{routing_code} ) =
split('@', $cust_main->payinfo);
$content{bank_name} = $cust_main->payname;
+ $content{account_type} = 'CHECKING';
+ $content{account_name} = $payname;
+ $content{customer_org} = $self->company ? 'B' : 'I';
+ $content{customer_ssn} = $self->ss;
} elsif ( $method eq 'LEC' ) {
$content{phone} = $cust_main->payinfo;
}
my $perror = "$processor error, invnum #". $self->invnum. ': '.
$transaction->result_code. ": ". $transaction->error_message;
- if ( !$quiet && $conf->exists('emaildecline')
+ if ( !$realtime_bop_decline_quiet && $conf->exists('emaildecline')
&& grep { $_ ne 'POST' } $cust_main->invoicing_list
) {
my @templ = $conf->config('declinetemplate');
'state' => $cust_main->getfield('state'),
'zip' => $cust_main->getfield('zip'),
'country' => $cust_main->getfield('country'),
- 'trancode' => 77,
'cardnum' => $cust_main->getfield('payinfo'),
'exp' => $cust_main->getfield('paydate'),
'payname' => $cust_main->getfield('payname'),
#setup template variables
package FS::cust_bill::_template; #!
- use vars qw( $invnum $date $page $total_pages @address $overdue @buf );
+ use vars qw( $invnum $date $page $total_pages @address $overdue @buf $agent );
$invnum = $self->invnum;
$date = $self->_date;
$page = 1;
+ $agent = $self->cust_main->agent->agent;
if ( $FS::cust_bill::invoice_lines ) {
$total_pages =
=head1 VERSION
-$Id: cust_bill.pm,v 1.41.2.17 2002-12-20 13:02:56 steve Exp $
+$Id: cust_bill.pm,v 1.41.2.23 2003-09-21 07:31:26 ivan Exp $
=head1 BUGS