... process items and record successful/failed payments
}
+ # if your processor uses processor_id...
+
+ $processor->submit(@request);
+ foreach (@request) {
+ ... record process_id for that request
+ }
+ # later...
+ my @reply = $processor->receive(@process_ids);
+
=head1 CLASS METHODS
=over 4
be set to 0 by C<format_header> and incremented every time C<format_item>
is called. Convenient for formats that require record numbers.
+=item processor_id
+
+Processor-specific value to be set by the processor during submit and
+passed to receive, useful for processors that require their own identifiers
+for download.
+
=back
=head1 METHODS
default => '',
);
+has processor_id => (
+ is => 'rw',
+ isa => 'Str',
+ default => '',
+);
+
has items => (
traits => ['Array'],
is => 'rw',
=item submit BATCH
Send a batch of requests to the gateway. BATCH must be a
-L<Business::BatchPayment::Batch>.
+L<Business::BatchPayment::Batch>. No defined return value,
+but processors may optionally set the 'processor_id' field
+on the input batch, which should then be stored and passed
+to receive.
=item receive
Download/otherwise acquire the available confirmed transactions from the
gateway, parse them, and return a list of L<Business::BatchPayment::Batch>
objects. The items in these batches will have, at minimum, the 'approved'
-field and either the 'tid' or 'amount' field set.
+field and either the 'tid' or 'amount' field set. Accepts an optional
+list of processor_id strings, if required by your processor.
=item format_request BATCH