partial auth
authorIvan Kohler <ivan@freeside.biz>
Sat, 8 Aug 2015 04:15:18 +0000 (21:15 -0700)
committerIvan Kohler <ivan@freeside.biz>
Sat, 8 Aug 2015 04:15:18 +0000 (21:15 -0700)
Changes
OnlinePayment.pm
notes_for_module_writers_v3

diff --git a/Changes b/Changes
index 3ea8ab6..6807c7d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for Perl extension Business::OnlinePayment.
 
 3.04    unreleased
+        - Partial authorizations
         - Doc: Moo is a-okay for module authors
         - Doc: update URLs for new domain
 
index c5ed1bd..eff1ec6 100644 (file)
@@ -6,7 +6,7 @@ use Carp;
 
 require 5.005;
 
-$VERSION = '3.04_01';
+$VERSION = '3.04_02';
 $VERSION = eval $VERSION; # modperlstyle: convert the string into a number
 
 # Remember subclasses we have "wrapped" submit() with _pre_submit()
@@ -35,6 +35,8 @@ my @methods = qw(
     response_page
     avs_code
     cvv2_response
+    partial_auth
+    partial_auth_amount
 );
 
 __PACKAGE__->build_subs(@methods);
@@ -381,6 +383,11 @@ just a whole or floating point number (i.e. 26, 26.1 or 26.13).
 
 =over 4
 
+=item partial_auth
+
+Set true to accept a partial authorization.  If this flag is not set, a partial
+authorization will be immediately reversed or voided.
+
 =item description
 
 A description of the transaction (used by some processors to send
@@ -671,6 +678,11 @@ other errors).
 Note that not all processor modules support this, and that if supported,
 it may not be set for all declines.
 
+=head2 partial_auth_amount()
+
+Amount of the partial authorization, if the processor supports them and the
+partial_auth flag was passed to indicate they should be processed.
+
 =head2 authorization()
 
 If the transaction has been submitted and accepted, this function will
index 94b598f..41ae2dd 100644 (file)
@@ -47,6 +47,7 @@ These are the module writer's notes for v3.  See the regular
           'supported_types'       => [ qw( CC ECHECK ) ],
           'token_support'         => 0, #card storage/tokenization support
           'test_transaction'      => 0, #set true if ->test_transaction(1) works
+          'partial_auth'          => 1, #can gateway partial auth (new in 3.04)
           'supported_actions'     => [
                                        'Normal Authorization',
                                        'Authorization Only',
@@ -111,3 +112,13 @@ These are the module writer's notes for v3.  See the regular
   Feel free to write gateway modules which use Moo.  Please do not require
   Moo newer than 0.091011 at this time (until 2018 or so).
 
+- Partial authorization (NEW in 3.04)
+
+  If your gateway supports partial authorizations:
+
+  + Indicate this in the introspection _info subroutine (see above)
+  + Accept the partial_auth transaction field:
+    * if not explicitly set, partial authorizations should be reversed/voided
+      and returned as is_success 0
+    * if explicitly set, partial authorizations should return is_success 1
+      and the authorized amount as partial_auth_amount