use vars qw( @ISA $DEBUG %import_info %export_info $conf );
use Time::Local;
use Text::CSV_XS;
-use XML::Simple qw(XMLin XMLout);
use FS::Record qw( dbh qsearch qsearchs );
use FS::cust_pay;
use FS::Conf;
# process one line at a time.
if ($filetype eq 'XML') {
+ eval "use XML::Simple";
+ die $@ if $@;
my @xmlkeys = @{ $info->{'xmlkeys'} }; # for XML
my $xmlrow = $info->{'xmlrow'}; # also for XML
# Do everything differently.
- my $data = XMLin($fh, KeepRoot => 1);
+ my $data = XML::Simple::XMLin($fh, KeepRoot => 1);
my $rows = $data;
# $xmlrow = [ RootKey, FirstLevelKey, SecondLevelKey... ]
$rows = $rows->{$_} foreach( @$xmlrow );
use Date::Format 'time2str';
use Date::Parse 'str2time';
use FS::Conf;
-use XML::Simple qw(XMLin XMLout);
my $conf;
my ($bin, $merchantID, $terminalID, $username);
%export_info = (
init => sub {
+# Load this at run time
+ eval "use XML::Simple";
+ die $@ if $@;
my $conf = shift;
($bin, $terminalID, $merchantID, $username) =
$conf->config('batchconfig-paymentech');
my $pay_batch = shift;
my @cust_pay_batch = @{(shift)};
my $count = 0;
- XMLout( {
+ XML::Simple::XMLout( {
transRequest => {
RequestCount => scalar(@cust_pay_batch),
batchFileID => {