RT# 83450 - fixed rateplan export
[freeside.git] / FS / FS / part_export / huawei_hlr.pm
index 0079818..9b405d5 100644 (file)
@@ -9,8 +9,6 @@ use FS::inventory_class;
 use FS::inventory_item;
 use IO::Socket::INET;
 use Data::Dumper;
-use MIME::Base64 qw(decode_base64);
-use Storable qw(thaw);
 
 use strict;
 
@@ -18,16 +16,16 @@ $DEBUG = 0;
 @ISA = qw(FS::part_export);
 
 tie my %options, 'Tie::IxHash',
-  'opname'    => { label=>'Operator login' },
-  'pwd'       => { label=>'Operator password' },
+  'opname'    => { label=>'Operator login (required)' },
+  'pwd'       => { label=>'Operator password (required)' },
   'tplid'     => { label=>'Template number' },
   'hlrsn'     => { label=>'HLR serial number' },
   'k4sno'     => { label=>'K4 serial number' },
-  'cardtype'  => { label  => 'Card type',
+  'cardtype'  => { label  => 'Card type (required)',
                    type   => 'select', 
                    options=> ['SIM', 'USIM']
                  },
-  'alg'       => { label  => 'Authentication algorithm',
+  'alg'       => { label  => 'Authentication algorithm (required)',
                    type   => 'select',
                    options=> ['COMP128_1',
                               'COMP128_2',
@@ -251,7 +249,7 @@ sub command {
 
 sub process_import_sim {
   my $job = shift;
-  my $param = thaw(decode_base64(shift));
+  my $param = shift;
   $param->{'job'} = $job;
   my $exportnum = delete $param->{'exportnum'};
   my $export = __PACKAGE__->by_key($exportnum);
@@ -314,8 +312,8 @@ sub import_sim {
     # push IMSI/KI to the HLR
     my $return = $self->command($socket,
       @command,
-      'IMSI', $imsi,
-      'KIVALUE', $ki,
+      'IMSI', qq{"$imsi"},
+      'KIVALUE', qq{"$ki"},
       @args
     );
     if ( $return->{success} ) {