[freeside-commits] freeside/FS/FS agent.pm,1.20,1.21
Ivan,,,
ivan at wavetail.420.am
Thu Jun 25 12:47:50 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv7762
Modified Files:
agent.pm
Log Message:
fix signups for the no-gateway-at-all case, RT#5673
Index: agent.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/agent.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- agent.pm 14 Apr 2009 17:16:16 -0000 1.20
+++ agent.pm 25 Jun 2009 19:47:47 -0000 1.21
@@ -206,7 +206,10 @@
Returns a payment gateway object (see L<FS::payment_gateway>) for this agent.
-Currently available options are I<invnum>, I<method>, and I<payinfo>.
+Currently available options are I<nofatal>, I<invnum>, I<method>, and I<payinfo>.
+
+If I<nofatal> is set, and no gateway is available, then the empty string
+will be returned instead of throwing a fatal exception.
If I<invnum> is set to the number of an invoice (see L<FS::cust_bill>) then
an attempt will be made to select a gateway suited for the taxes paid on
@@ -276,8 +279,13 @@
# agent_payment_gateway referenced payment_gateway
my $conf = new FS::Conf;
- die "Real-time processing not enabled\n"
- unless $conf->exists('business-onlinepayment');
+ unless ( $conf->exists('business-onlinepayment') ) {
+ if ( $options{'nofatal'} ) {
+ return '';
+ } else {
+ die "Real-time processing not enabled\n";
+ }
+ }
#load up config
my $bop_config = 'business-onlinepayment';
More information about the freeside-commits
mailing list