diff options
Diffstat (limited to 'Paymentech.pm')
-rw-r--r-- | Paymentech.pm | 7 |
1 files changed, 4 insertions, 3 deletions
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; |