[freeside-commits] branch master updated. 7bfdea32633df161273631bcdc6b33b93867f5b2

Mitch Jackson mitch at freeside.biz
Tue May 21 13:12:44 PDT 2019


The branch, master has been updated
       via  7bfdea32633df161273631bcdc6b33b93867f5b2 (commit)
       via  7b90424db790634149932f49e253e4b33f8186a5 (commit)
      from  7917cc1f73ef49554d05bc5039add533be725a3e (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 7bfdea32633df161273631bcdc6b33b93867f5b2
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Tue May 21 15:54:13 2019 -0400

    RT# 83401 Send country field to B::OP on tokenize

diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm
index 1ac12ce6b..89d63dd26 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -323,7 +323,8 @@ sub _bop_cust_payby_options {
 
     if ( $cust_payby->locationnum ) {
       my $cust_location = $cust_payby->cust_location;
-      $options->{$_} = $cust_location->$_() for qw( address1 address2 city state zip );
+      $options->{$_} = $cust_location->$_()
+        for qw( address1 address2 city state zip country );
     }
   }
 }

commit 7b90424db790634149932f49e253e4b33f8186a5
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Tue May 21 13:42:16 2019 -0400

    RT# 83401 Catch exception and display suitable error

diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index 56bcfd872..5b18367f7 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -186,15 +186,22 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) {
       %saveopt = map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}};
     }
 
-    my $error = $cust_main->save_cust_payby(
-      'saved_cust_payby' => \$cust_payby,
-      'payment_payby' => $payby,
-      'auto'          => scalar($cgi->param('auto')),
-      'weight'        => scalar($cgi->param('weight')),
-      'payinfo'       => $payinfo,
-      'payname'       => $payname,
-      %saveopt
-    );
+    my $error;
+    {
+      local $@;
+      eval {
+        $error = $cust_main->save_cust_payby(
+          'saved_cust_payby' => \$cust_payby,
+          'payment_payby' => $payby,
+          'auto'          => scalar($cgi->param('auto')),
+          'weight'        => scalar($cgi->param('weight')),
+          'payinfo'       => $payinfo,
+          'payname'       => $payname,
+          %saveopt
+        );
+      };
+      $error ||= $@;
+    }
 
     errorpage("error saving info, payment not processed: $error")
       if $error;	

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

Summary of changes:
 FS/FS/cust_main/Billing_Realtime.pm |  3 ++-
 httemplate/misc/process/payment.cgi | 25 ++++++++++++++++---------
 2 files changed, 18 insertions(+), 10 deletions(-)




More information about the freeside-commits mailing list