RT#7274: accept CR/LF in RBC batch import
[freeside.git] / FS / FS / pay_batch / paymentech.pm
index b75f256..89f0c77 100644 (file)
@@ -66,7 +66,7 @@ my %paytype = (
     $xml->startTag('transRequest', RequestCount => scalar(@cust_pay_batch) + 1);
     $xml->startTag('batchFileID');
     $xml->dataElement(userID => $username);
-    $xml->dataElement(fileDateTime => time2str('%Y%m%d%H%M%s', time));
+    $xml->dataElement(fileDateTime => time2str('%Y%m%d%H%M%S', time));
     $xml->dataElement(fileID => 'FILEID');
     $xml->endTag('batchFileID');
 
@@ -87,12 +87,12 @@ my %paytype = (
           ecpBankAcctType => $paytype{lc($_->cust_main->paytype)},
           ecpDelvMethod   => 'A',
         ),
-        avsZip          => $_->zip,
-        avsAddress1     => $_->address1,
-        avsAddress2     => $_->address2,
-        avsCity         => $_->city,
+        avsZip          => substr($_->zip, 0, 10),
+        avsAddress1     => substr($_->address1, 0, 30),
+        avsAddress2     => substr($_->address2, 0, 30),
+        avsCity         => substr($_->city, 0, 20),
         avsState        => $_->state,
-        avsName        => $_->first . ' ' . $_->last,
+        avsName        => substr($_->first . ' ' . $_->last, 0, 30),
         avsCountryCode => $_->country,
         orderID        => $_->paybatchnum,
         amount         => $_->amount * 100,