suretax-hostname option, and minor UI fix, #33015
[freeside.git] / FS / FS / TaxEngine / suretax.pm
index 327a728..8139b1d 100644 (file)
@@ -20,9 +20,6 @@ our %taxproduct_cache;
 
 our $conf;
 
-our $host = 'testapi.taxrating.net';
-# production: 'api.taxrating.net'
-
 FS::UID->install_callback( sub {
     $conf = FS::Conf->new;
     # should we enable conf caching here?
@@ -314,6 +311,9 @@ sub make_taxlines {
   my $request_json = $json->encode($request);
   warn $request_json if $DEBUG > 1;
 
+  my $host = $conf->config('suretax-hostname');
+  $host ||= 'testapi.taxrating.net';
+
   # We are targeting the "V05" interface:
   # - accepts both telecom and general sales transactions
   # - produces results broken down by "invoice" (Freeside line item)