RT#73993 - updated selfservice and ngselfservice to allow for the control of changes...
[freeside.git] / FS / FS / ClientAPI / MasonComponent.pm
index 3c3bf4c..d09d6da 100644 (file)
@@ -21,6 +21,7 @@ my %allowed_comps = map { $_=>1 } qw(
   /misc/phonenums.cgi
   /misc/states.cgi
   /misc/counties.cgi
+  /misc/cities.cgi
   /misc/svc_acct-domains.cgi
   /misc/part_svc-columns.cgi
   /edit/elements/svc_forward.html
@@ -61,7 +62,7 @@ my %session_callbacks = (
       'process-display'    => scalar($conf->config('selfservice_process-display')),
       'process-skip_first' => $conf->exists('selfservice_process-skip_first'),
       'num_payments'       => scalar($cust_main->cust_pay), 
-      'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')),
+      'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum)),
     );
     @$argsref = ( %args );
 
@@ -144,7 +145,7 @@ sub mason_comp {
     return { 'error' => 'Illegal component' };
   }
 
-  my @args = $packet->{'args'} ? @{ $packet->{'args'} } : ();
+  my @args = $packet->{'args'} ? $packet->{'args'} : ();
 
   if ( $session_comps{$comp} ) {