[freeside-commits] freeside/FS/FS Conf.pm, 1.409, 1.410 agent.pm, 1.23, 1.24 cust_pay_pending.pm, 1.8, 1.9

Mark Wells mark at wavetail.420.am
Tue Dec 21 01:12:47 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv20871/FS/FS

Modified Files:
	Conf.pm agent.pm cust_pay_pending.pm 
Log Message:
changes to support eWay third-party payment, #10208

Index: agent.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/agent.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -w -d -r1.23 -r1.24
--- agent.pm	7 Jun 2010 17:32:06 -0000	1.23
+++ agent.pm	21 Dec 2010 09:12:45 -0000	1.24
@@ -276,7 +276,7 @@
     $payment_gateway = $override->payment_gateway;
 
     $payment_gateway->gateway_namespace('Business::OnlinePayment')
-      unless $payment_gateway->gateway_name;
+      unless $payment_gateway->gateway_namespace;
 
   } else { #use the standard settings from the config
 

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.409
retrieving revision 1.410
diff -u -w -d -r1.409 -r1.410
--- Conf.pm	20 Dec 2010 03:14:46 -0000	1.409
+++ Conf.pm	21 Dec 2010 09:12:44 -0000	1.410
@@ -584,6 +584,26 @@
   'per_agent' => 1,
 );
 
+my $_gateway_name = sub {
+  my $g = shift;
+  return '' if !$g;
+  ($g->gateway_username . '@' . $g->gateway_module);
+};
+
+my %payment_gateway_options = (
+  'type'        => 'select-sub',
+  'options_sub' => sub {
+    my @gateways = qsearch({
+        'table' => 'payment_gateway',
+        'hashref' => { 'disabled' => '' },
+      });
+    map { $_->gatewaynum, $_gateway_name->($_) } @gateways;
+  },
+  'option_sub'  => sub {
+    my $gateway = FS::payment_gateway->by_key(shift);
+    $_gateway_name->($gateway);
+  },
+);
 
 #Billing (81 items)
 #Invoicing (50 items)
@@ -1726,6 +1746,13 @@
   },
 
   {
+    'key'         => 'selfservice-payment_gateway',
+    'section'     => 'self-service',
+    'description' => 'Force the use of this payment gateway for self-service.',
+    %payment_gateway_options,
+  },
+
+  {
     'key'         => 'selfservice-save_unchecked',
     'section'     => 'self-service',
     'description' => 'In self-service, uncheck "Remember information" checkboxes by default (normally, they are checked by default).',
@@ -2971,7 +2998,7 @@
 #  {
 #    'key'         => 'batch-manual_approval',
 #    'section'     => 'billing',
-#    'description' => 'Allow manual batch closure, which will approve all payments that do not yet have a status.  This is dangerous, but may be needed if your processor does not provide a list of approved payments.',
+#    'description' => 'Allow manual batch closure, which will approve all payments that do not yet have a status.  This is very dangerous.',
 #    'type'        => 'checkbox',
 #  },
 #

Index: cust_pay_pending.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pay_pending.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- cust_pay_pending.pm	30 Jul 2009 06:42:31 -0000	1.8
+++ cust_pay_pending.pm	21 Dec 2010 09:12:45 -0000	1.9
@@ -120,9 +120,9 @@
 
 Additional status information.
 
-=cut
+=item gatewaynum
 
-#=item cust_balance - 
+L<FS::payment_gateway> id.
 
 =item paynum - 
 
@@ -292,10 +292,10 @@
 
 }
 
-=item decline
+=item decline [ STATUSTEXT ]
 
-Sets the status of this pending pament to "done" (with statustext
-"declined (manual)").
+Sets the status of this pending payment to "done" (with statustext
+"declined (manual)" unless otherwise specified).
 
 Currently only used when resolving pending payments manually.
 
@@ -303,11 +303,12 @@
 
 sub decline {
   my $self = shift;
+  my $statustext = shift || "declined (manual)";
 
   #could send decline email too?  doesn't seem useful in manual resolution
 
   $self->status('done');
-  $self->statustext("declined (manual)");
+  $self->statustext($statustext);
   $self->replace;
 }
 



More information about the freeside-commits mailing list