X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=2c21f1e46b1c19c43fc14610e1a8be9eed31ddc2;hb=95a40a1b8ebf86c76784c220d0d561f952d934ef;hp=cb2aa46293f515c1092238eb357ebe372f8bb24b;hpb=17ddcceb66e4c5c45abe890403d2ca98b128d375;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index cb2aa4629..2c21f1e46 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -483,7 +483,8 @@ sub realtime_card { if ( $conf->exists('business-onlinepayment-description') ) { my $dtempl = $conf->config('business-onlinepayment-description'); - my $agent = $self->cust_main->agent->agent; + my $agent_obj = $cust_main->agent; + my $agent = $agent_obj->agent; my $pkgs = join(', ', map { $_->cust_pkg->part_pkg->pkg } grep { $_->pkgnum } $self->cust_bill_pkg @@ -582,9 +583,9 @@ sub realtime_card { my $template = new Text::Template ( TYPE => 'ARRAY', SOURCE => [ map "$_\n", @templ ], - ) or die "($perror) can't create template: $Text::Template::ERROR"; + ) or return "($perror) can't create template: $Text::Template::ERROR"; $template->compile() - or die "($perror) can't compile template: $Text::Template::ERROR"; + or return "($perror) can't compile template: $Text::Template::ERROR"; my $error = $transaction->error_message; @@ -605,7 +606,7 @@ sub realtime_card { $!=0; $message->smtpsend( Host => $smtpmachine ) or $message->smtpsend( Host => $smtpmachine, Debug => 1 ) - or die "($perror) (customer # ". $self->custnum. + or return "($perror) (customer # ". $self->custnum. ") can't send card decline email to ". join(', ', grep { $_ ne 'POST' } $cust_main->invoicing_list ). " via server $smtpmachine with SMTP: $!"; @@ -944,7 +945,7 @@ sub print_text { =head1 VERSION -$Id: cust_bill.pm,v 1.28 2002-04-16 09:38:19 ivan Exp $ +$Id: cust_bill.pm,v 1.31 2002-04-16 22:52:14 ivan Exp $ =head1 BUGS