(B<pkg> through B<edate>) are filled in.
=item invnum - invoice number
+
=item custnum - customer number
+
=item _date - invoice date
+
=item charged - total invoice amount
+
=item first - customer first name
+
=item last - customer first name
+
=item company - company name
+
=item address1 - address line 1
+
=item address2 - address line 1
+
=item city
+
=item state
+
=item zip
+
=item country
=item pkg - line item description
-=item setup - line item setup fee (only or both of B<setup> and B<recur> will be defined)
-=item recur - line item recurring fee (only or both of B<setup> and B<recur> will be defined)
+
+=item setup - line item setup fee (one or both of B<setup> and B<recur> will be defined)
+
+=item recur - line item recurring fee (one or both of B<setup> and B<recur> will be defined)
+
=item sdate - start date for recurring fee
+
=item edate - end date for recurring fee
=back
$self->invnum,
$self->custnum,
time2str("%x", $self->_date),
+ sprintf("%.2f", $self->charged),
( map { $cust_main->getfield($_) }
qw( first last company address1 address2 city state zip country ) ),
map { '' } (1..5),
my @invoicing_list = grep { $_ ne 'POST' } $cust_main->invoicing_list;
if ( $conf->exists('emailinvoiceauto')
|| ( $conf->exists('emailinvoiceonly') && ! @invoicing_list ) ) {
- push @invoicing_list, $cust_main->default_invoicing_list;
+ push @invoicing_list, $cust_main->all_emails;
}
my $email = $invoicing_list[0];
if ( $transaction->is_success() && $action2 ) {
my $auth = $transaction->authorization;
- my $ordernum = $transaction->order_number;
+ my $ordernum = $transaction->can('order_number')
+ ? $transaction->order_number
+ : '';
#warn "********* $auth ***********\n";
#warn "********* $ordernum ***********\n";
my $capture =
new Business::OnlinePayment( $bop_processor, @bop_options );
- $capture->content(
+ my %capture = (
+ type => 'CC',
action => $action2,
login => $bop_login,
password => $bop_password,
amount => $amount,
authorization => $auth,
description => $description,
+ card_number => $cust_main->payinfo,
+ expiration => $exp,
);
+ foreach my $field (qw( authorization_source_code returned_ACI transaction_identifier validation_code
+ transaction_sequence_num local_transaction_date
+ local_transaction_time AVS_result_code )) {
+ $capture{$field} = $transaction->$field() if $transaction->can($field);
+ }
+
+ $capture->content( %capture );
+
$capture->submit();
unless ( $capture->is_success ) {
=head1 VERSION
-$Id: cust_bill.pm,v 1.39 2002-08-30 23:42:47 ivan Exp $
+$Id: cust_bill.pm,v 1.44 2002-09-17 00:40:07 ivan Exp $
=head1 BUGS