projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sipwise export, part 2
[freeside.git]
/
FS
/
FS
/
payment_gateway.pm
diff --git
a/FS/FS/payment_gateway.pm
b/FS/FS/payment_gateway.pm
index
68d8418
..
afae266
100644
(file)
--- a/
FS/FS/payment_gateway.pm
+++ b/
FS/FS/payment_gateway.pm
@@
-1,12
+1,10
@@
package FS::payment_gateway;
package FS::payment_gateway;
+use base qw( FS::option_Common );
use strict;
use strict;
-use vars qw( @ISA $me $DEBUG );
-use FS::Record qw( qsearch qsearchs dbh );
-use FS::option_Common;
-use FS::agent_payment_gateway;
+use vars qw( $me $DEBUG );
+use FS::Record qw( qsearch dbh ); #qw( qsearch qsearchs dbh );
-@ISA = qw( FS::option_Common );
$me = '[ FS::payment_gateway ]';
$DEBUG=0;
$me = '[ FS::payment_gateway ]';
$DEBUG=0;
@@
-171,13
+169,6
@@
sub check {
Returns any agent overrides for this payment gateway.
Returns any agent overrides for this payment gateway.
-=cut
-
-sub agent_payment_gateway {
- my $self = shift;
- qsearch('agent_payment_gateway', { 'gatewaynum' => $self->gatewaynum } );
-}
-
=item disable
Disables this payment gateway: deletes all associated agent_payment_gateway
=item disable
Disables this payment gateway: deletes all associated agent_payment_gateway
@@
-277,6
+268,13
@@
sub batch_processor {
eval "use Business::BatchPayment;";
die "couldn't load Business::BatchPayment: $@" if $@;
eval "use Business::BatchPayment;";
die "couldn't load Business::BatchPayment: $@" if $@;
+ #false laziness with processor
+ foreach (qw(username password)) {
+ if (length($self->get("gateway_$_"))) {
+ $opt{$_} = $self->get("gateway_$_");
+ }
+ }
+
my $module = $self->gateway_module;
my $processor = eval {
Business::BatchPayment->create($module, $self->options, %opt)
my $module = $self->gateway_module;
my $processor = eval {
Business::BatchPayment->create($module, $self->options, %opt)