Partial authorizations
authorIvan Kohler <ivan@freeside.biz>
Thu, 5 Nov 2015 18:20:27 +0000 (10:20 -0800)
committerIvan Kohler <ivan@freeside.biz>
Thu, 5 Nov 2015 18:20:27 +0000 (10:20 -0800)
Changes
OnlinePayment.pm
notes_for_module_writers_v3

diff --git a/Changes b/Changes
index e5ee202..6807c7d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,7 +1,7 @@
 Revision history for Perl extension Business::OnlinePayment.
 
 3.04    unreleased
-        - Doc: Partial authorizations
+        - Partial authorizations
         - Doc: Moo is a-okay for module authors
         - Doc: update URLs for new domain
 
index 6b32f40..2d768d2 100644 (file)
@@ -36,6 +36,8 @@ my @methods = qw(
     response_page
     avs_code
     cvv2_response
+    partial_auth
+    partial_auth_amount
 );
 
 __PACKAGE__->build_subs(@methods);
@@ -382,6 +384,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
@@ -688,6 +695,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 7313e11..aaa1223 100644 (file)
@@ -50,6 +50,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',
@@ -134,8 +135,8 @@ These are the module writer's notes for v3.  See the regular
       return is_success 0.
     + If this transaction flag is set, the application can handle a partial
       authorization.  Make sure the flag to enable them is passed to the
-      gateway, if necessary.  When a partial authorization is received, the
-      amount must be returned as "partial_auth_amount":
+      gateway, if necessary.  When a partial authorization is received, return
+      is_success 1, and the amount as "partial_auth_amount":
         $self->partial_auth_amount( $partial_amount );
       For normal full authorizations, "partial_auth_amount" must not be set.