summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-02-17 15:50:46 -0800
committerIvan Kohler <ivan@freeside.biz>2013-02-17 15:50:46 -0800
commit53ee797fc1e02879e5f2f9631487f5ac565e8277 (patch)
tree938af132a0f062a6ef64d4bbfdd611b0d4f52699
parent9ab92d47962317a7d87de290a12a1720ad8e7963 (diff)
parentbacd29721a27f99471a74623bdc3b626f46568a0 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/Business-BatchPayment-Paymentech
-rw-r--r--Changes3
-rw-r--r--Paymentech.pm7
2 files changed, 7 insertions, 3 deletions
diff --git a/Changes b/Changes
index 1221a72..8038f0c 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
Revision history for Business-BatchPayment-Paymentech
+0.04 unreleased
+ - make filenames unique when sending multiple batches
+
0.03 unreleased
- truncate state to 2 characters
diff --git a/Paymentech.pm b/Paymentech.pm
index 027bbee..e505c0f 100644
--- a/Paymentech.pm
+++ b/Paymentech.pm
@@ -94,7 +94,6 @@ sub default_transport {
Business::BatchPayment::Paymentech::Transport->new(
login => $self->login,
password => $self->password,
- put_path => $self->fileDateTime,
debug => $self->debug,
test_mode => $self->test_mode,
);
@@ -132,7 +131,8 @@ sub format_header {
$xml->startTag('batchFileID');
$xml->dataElement(userID => $self->login);
$xml->dataElement(fileDateTime => $self->fileDateTime);
- $xml->dataElement(fileID => $self->fileDateTime);
+ $xml->dataElement(fileID => sprintf('%06d-', $batch->batch_id) .
+ $self->fileDateTime);
$xml->endTag('batchFileID');
}
@@ -286,7 +286,8 @@ sub upload {
my $self = shift;
my $content = shift;
my $tmpdir = tempdir( CLEANUP => 1 );
- my $filename = $self->put_path; # also the value of the fileId tag
+ $content =~ /<fileID>(.*)<\/fileID>/;
+ my $filename = $1;
my $archive_dir = $self->archive_to;
warn "Writing temp file to $tmpdir/$filename.xml.\n" if $self->debug;