diff options
Diffstat (limited to 'FS/bin')
| -rwxr-xr-x | FS/bin/freeside-paymentech-download | 16 | ||||
| -rwxr-xr-x | FS/bin/freeside-paymentech-upload | 16 | 
2 files changed, 14 insertions, 18 deletions
| diff --git a/FS/bin/freeside-paymentech-download b/FS/bin/freeside-paymentech-download index 48dfe9b4b..214b7f8e7 100755 --- a/FS/bin/freeside-paymentech-download +++ b/FS/bin/freeside-paymentech-download @@ -2,6 +2,8 @@  use strict;  use Getopt::Std; +use Date::Format qw(time2str); +use File::Temp qw(tempdir); #0.19 for ->newdir() interface, not in 5.10.0  use Net::SFTP::Foreign;  use FS::UID qw(adminsuidsetup datasrc);  use FS::Record qw(qsearch qsearchs); @@ -9,19 +11,14 @@ use FS::pay_batch;  use FS::cust_pay_batch;  use FS::Conf; -use Date::Format 'time2str'; -use File::Temp; -  use vars qw( $opt_t $opt_v $opt_a );  getopts('vta:');  #$Net::SFTP::Foreign::debug = -1; -sub usage { ' +sub usage { "    Usage: -      paymentech-download [ -v ] [ -t ] [ -a archivedir ] user - -' -} +      paymentech-download [ -v ] [ -t ] [ -a archivedir ] user\n +" }  my $user = shift or die &usage;  adminsuidsetup $user; @@ -33,7 +30,8 @@ if ( $opt_a ) {      unless -w $opt_a;  } -my $tmpdir = File::Temp->newdir(); +#my $tmpdir = File::Temp->newdir(); +my $tmpdir = tempdir( CLEANUP => 1 ); #DIR=>somewhere?  my $conf = new FS::Conf;  my @batchconf = $conf->config('batchconfig-paymentech'); diff --git a/FS/bin/freeside-paymentech-upload b/FS/bin/freeside-paymentech-upload index 6de29ddbb..e0ec4bdac 100755 --- a/FS/bin/freeside-paymentech-upload +++ b/FS/bin/freeside-paymentech-upload @@ -2,6 +2,8 @@  use strict;  use Getopt::Std; +use Date::Format qw(time2str); +use File::Temp qw(tempdir); #0.19 for ->newdir() interface, not in 5.10.0  use Net::SFTP::Foreign;  use FS::UID qw(adminsuidsetup datasrc);  use FS::Record qw(qsearch qsearchs); @@ -9,21 +11,16 @@ use FS::pay_batch;  use FS::cust_pay_batch;  use FS::Conf; -use Date::Format 'time2str'; -use File::Temp; -  use vars qw( $opt_a $opt_t $opt_v );  getopts('avt');  #$Net::SFTP::Foreign::debug = -1; -sub usage { ' +sub usage { "    Usage:      paymentech-upload [ -v ] [ -t ] user batchnum -    paymentech-upload -a [ -v ] [ -t ] user - -' -} +    paymentech-upload -a [ -v ] [ -t ] user\n +" }  my $user = shift or die &usage;  adminsuidsetup $user; @@ -47,7 +44,8 @@ my @batchconf = $conf->config('batchconfig-paymentech');  my $username = $batchconf[3] or die "no Paymentech batch username configured\n";  my $password = $batchconf[4] or die "no Paymentech batch password configured\n"; -my $tmpdir = File::Temp->newdir(); +#my $tmpdir = File::Temp->newdir(); +my $tmpdir = tempdir( CLEANUP => 1 ); #DIR=>somewhere?  my @filenames; | 
