Merge branch 'master' of git.freeside.biz:/home/git/freeside
authorIvan Kohler <ivan@freeside.biz>
Tue, 17 Jul 2018 01:43:48 +0000 (18:43 -0700)
committerIvan Kohler <ivan@freeside.biz>
Tue, 17 Jul 2018 01:43:48 +0000 (18:43 -0700)
FS/FS/Conf.pm
FS/FS/Upgrade.pm
FS/FS/cust_main/Billing_Batch.pm
FS/FS/svc_IP_Mixin.pm
FS/FS/svc_broadband.pm

index 35932b8..bac6a76 100644 (file)
@@ -783,7 +783,7 @@ my $validate_email = sub { $_[0] =~
   {
     'key'         => 'credit-card-surcharge-flatfee',
     'section'     => 'credit_cards',
-    'description' => 'Add a credit card surcharge to invoices, as a flat fee.',
+    'description' => 'Add a credit card surcharge to invoices, as a flat fee.  WARNING: Although recently permitted to US merchants in general, specific consumer protection laws may prohibit or restrict this practice in California, Colorado, Connecticut, Florda, Kansas, Maine, Massachusetts, New York, Oklahome, and Texas.  Surcharging is also generally prohibited in most countries outside the US, AU and UK.  When allowed, typically not permitted to be above 4%.',
     'type'        => 'text',
     'per_agent'   => 1,
   },
index adf973e..aebfc29 100644 (file)
@@ -338,7 +338,10 @@ sub upgrade {
       });
       foreach my $object ( @objects ) {
           my $payinfo = $object->decrypt($object->payinfo);
-          die "error decrypting payinfo" if $payinfo eq $object->payinfo;
+          if ( $payinfo eq $object->payinfo ) {
+            warn "error decrypting payinfo for $table: $payinfo\n";
+            next;
+          }
           $object->payinfo($payinfo);
           my $error = $object->replace;
           die $error if $error;
index 35e2714..eb66436 100644 (file)
@@ -138,6 +138,11 @@ sub batch_card {
     'country'  => $options{country}  || $loc->country,
     'payby'    => $options{payby}    || $cust_payby->payby,
     'payinfo'  => $options{payinfo}  || $cust_payby->payinfo,
+    'paymask'  => ( $options{payinfo}
+                      ? FS::payinfo_Mixin->mask_payinfo( $options{payby},
+                                                         $options{payinfo} )
+                      : $cust_payby->paymask
+                  ),
     'exp'      => $options{paydate}  || $cust_payby->paydate,
     'payname'  => $options{payname}  || $cust_payby->payname,
     'paytype'  => $options{paytype}  || $cust_payby->paytype,
index b6af0a6..4c2180e 100644 (file)
@@ -81,7 +81,7 @@ sub svc_ip_check {
   my $error = $self->ip_check;
   return $error if $error;
   if ( my $router = $self->router ) {
-    if ( grep { $_->routernum eq $router->routernum } $self->allowed_routers ) {
+    if ( grep { $_->routernum == $router->routernum } $self->allowed_routers ) {
       return '';
     } else {
       return 'Router '.$router->routername.' not available for this service';
index 1908ebb..b8b1a6e 100755 (executable)
@@ -110,12 +110,12 @@ sub table_info {
       'speed_down'  => 'Download speed (Kbps)',
       'speed_up'    => 'Upload speed (Kbps)',
       'ip_addr'     => 'IP address',
-      'blocknum'    => 
-      { 'label' => 'Address block',
-                         'type'  => 'select',
-                         'select_table' => 'addr_block',
-                          'select_key'   => 'blocknum',
-                         'select_label' => 'cidr',
+      'blocknum'    => {
+                         'label'             => 'Address block',
+                         'type'              => 'select',
+                         'select_table'      => 'addr_block',
+                          'select_key'       => 'blocknum',
+                         'select_label'      => 'cidr',
                          'disable_inventory' => 1,
                        },
      'plan_id' => 'Service Plan Id',