diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-07-11 00:08:15 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-07-11 00:08:15 -0700 |
commit | 3c5cccf1bf74f2e60482fe62cfbcbe06722da1f5 (patch) | |
tree | d0bfc425deb44dbaa0cad9f272cd2023407ebd05 /BatchPayment/Transport.pm |
initial commit
Diffstat (limited to 'BatchPayment/Transport.pm')
-rw-r--r-- | BatchPayment/Transport.pm | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/BatchPayment/Transport.pm b/BatchPayment/Transport.pm new file mode 100644 index 0000000..4ac8b71 --- /dev/null +++ b/BatchPayment/Transport.pm @@ -0,0 +1,32 @@ +package Business::BatchPayment::Transport; + +use Moose::Role; +with 'Business::BatchPayment::Debug'; + +requires 'upload'; +requires 'download'; + +=head1 NAME + +Business::BatchPayment::Transport + +=head1 USAGE + +Business::BatchPayment::Processor classes must have a 'transport' attribute +which does the Business::BatchPayment::Transport role (implements 'upload' +and 'download'). The B::BP::Processor class can implement 'default_transport' +to construct a B::BP::Transport object. + +'upload' must take a scalar argument containing the (correctly formatted) +batch for upload. On success, it may return nothing, or a scalar identifier +for the batch (such as a serial number) if the gateway requires one. + +'download' takes the return value from 'upload' (if any) as its argument, +and returns any number of scalars containing batch files. If there are no +batches available, it should return an empty list. + +Both of these methods should die on error. + +=cut + +1; |