[freeside-commits] branch master updated. 5da68ff1a7c638e30cbafbc9b0749f1e82b333df

Ivan ivan at 420.am
Thu Nov 5 10:44:53 PST 2015


The branch, master has been updated
       via  5da68ff1a7c638e30cbafbc9b0749f1e82b333df (commit)
       via  88ed72cdd96321a0eeaacc3107da413ab6e9dc98 (commit)
      from  052eb9b8d16c4e81c0b6c609674e9ab768cb817d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5da68ff1a7c638e30cbafbc9b0749f1e82b333df
Merge: 88ed72c 052eb9b
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Nov 5 10:44:38 2015 -0800

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit 88ed72cdd96321a0eeaacc3107da413ab6e9dc98
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Nov 5 10:44:31 2015 -0800

    pass an invoice_number for void/refund when available, RT#37292

diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm
index 7a20407..403d8dd 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -11,6 +11,7 @@ use FS::Record qw( qsearch qsearchs );
 use FS::payby;
 use FS::cust_pay;
 use FS::cust_pay_pending;
+use FS::cust_bill_pay;
 use FS::cust_refund;
 use FS::banned_pay;
 
@@ -1366,6 +1367,8 @@ sub realtime_refund_bop {
     warn "  $_ => $options{$_}\n" foreach keys %options;
   }
 
+  my %content = ();
+
   ###
   # look up the original payment and optionally a gateway for that payment
   ###
@@ -1384,6 +1387,9 @@ sub realtime_refund_bop {
       or return "Unknown paynum $options{'paynum'}";
     $amount ||= $cust_pay->paid;
 
+    my @cust_bill_pay = qsearch('cust_bill_pay', { paynum=>$cust_pay->paynum });
+    $content{'invoice_number'} = $cust_bill_pay[0]->invnum if @cust_bill_pay;
+
     if ( $cust_pay->get('processor') ) {
       ($gatewaynum, $processor, $auth, $order_number) =
       (
@@ -1456,7 +1462,8 @@ sub realtime_refund_bop {
   eval "use $namespace";  
   die $@ if $@;
 
-  my %content = (
+  %content = (
+    %content,
     'type'           => $options{method},
     'login'          => $login,
     'password'       => $password,

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_main/Billing_Realtime.pm |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list