Supported format keys (defined in the specified FS::pay_batch module) are:
-I<filetype> - CSV, fixed, variable, XML
+I<filetype> - required, can be CSV, fixed, variable, XML
-I<fields> - list of field names for each row/line
+I<fields> - required list of field names for each row/line
I<formatre> - regular expression for fixed filetype
-I<parse> - for variable filetype
+I<parse> - required for variable filetype
-I<xmlkeys> - for XML filetype
+I<xmlkeys> - required for XML filetype
-I<xmlrow> - for XML filetype
+I<xmlrow> - required for XML filetype
I<begin_condition> - sub, ignore all lines before this returns true
I<skip_condition> - sub, skip lines when this returns true
-I<hook> - sub, runs before approved/declined conditions are checked
+I<hook> - required, sub, runs before approved/declined conditions are checked
-I<approved> - sub, returns true when approved
+I<approved> - required, sub, returns true when approved
-I<declined> - sub, returns true when declined
+I<declined> - required, sub, returns true when declined
I<close_condition> - sub, decide whether or not to close the batch
my $processor = $gateway->batch_processor(%proc_opt);
- my @batches = $processor->receive;
+ my @processor_ids = map { $_->processor_id }
+ qsearch({
+ 'table' => 'pay_batch',
+ 'hashref' => { 'status' => 'I' },
+ 'extra_sql' => q( AND processor_id != '' AND processor_id IS NOT NULL)
+ });
+
+ my @batches = $processor->receive(@processor_ids);
my $num = 0;
);
$processor->submit($batch);
+ if ($batch->processor_id) {
+ $self->set('processor_id',$batch->processor_id);
+ $self->replace;
+ }
+
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
'';
}