[freeside-commits] freeside/FS/FS agent.pm,1.22,1.23
Ivan,,,
ivan at wavetail.420.am
Mon Jun 7 10:32:08 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv29943
Modified Files:
agent.pm
Log Message:
fix agent payment gateway overrides not working in 2.1, RT#8695
Index: agent.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/agent.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -w -d -r1.22 -r1.23
--- agent.pm 24 Oct 2009 00:16:27 -0000 1.22
+++ agent.pm 7 Jun 2010 17:32:06 -0000 1.23
@@ -269,16 +269,20 @@
cardtype => '',
taxclass => '', } );
- my $payment_gateway = new FS::payment_gateway;
+ my $payment_gateway;
+ my $conf = new FS::Conf;
if ( $override ) { #use a payment gateway override
$payment_gateway = $override->payment_gateway;
+ $payment_gateway->gateway_namespace('Business::OnlinePayment')
+ unless $payment_gateway->gateway_name;
+
} else { #use the standard settings from the config
+
# the standard settings from the config could be moved to a null agent
# agent_payment_gateway referenced payment_gateway
- my $conf = new FS::Conf;
unless ( $conf->exists('business-onlinepayment') ) {
if ( $options{'nofatal'} ) {
return '';
@@ -302,6 +306,8 @@
"did you set the business-onlinepayment configuration value?\n"
unless $processor;
+ $payment_gateway = new FS::payment_gateway;
+
$payment_gateway->gateway_namespace( $conf->config('business-onlinepayment-namespace') ||
'Business::OnlinePayment');
$payment_gateway->gateway_module($processor);
@@ -312,6 +318,13 @@
}
+ unless ( $payment_gateway->gateway_namespace ) {
+ $payment_gateway->gateway_namespace(
+ scalar($conf->config('business-onlinepayment-namespace'))
+ || 'Business::OnlinePayment'
+ );
+ }
+
$payment_gateway;
}
More information about the freeside-commits
mailing list