partial auth
[Business-OnlinePayment.git] / OnlinePayment.pm
index f8417ba..eff1ec6 100644 (file)
@@ -6,7 +6,7 @@ use Carp;
 
 require 5.005;
 
-$VERSION = '3.03_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,8 +35,12 @@ my @methods = qw(
     response_page
     avs_code
     cvv2_response
+    partial_auth
+    partial_auth_amount
 );
 
+__PACKAGE__->build_subs(@methods);
+
 #fallback
 sub _info {
   my $class = shift;
@@ -88,7 +92,6 @@ sub new {
     croak("unknown processor $processor ($@)") if $@;
 
     my $self = bless {processor => $processor}, $subclass;
-    $self->build_subs(@methods);
 
     if($self->can("set_defaults")) {
         $self->set_defaults(%data);
@@ -159,7 +162,6 @@ sub _pre_submit {
               unless ( $@ =~ m/^Can\'t locate/ );
         } else {
             my $risk_tx = bless( { processor => $fraud_detection }, $subclass );
-            $risk_tx->build_subs(@methods);
             if ($risk_tx->can('set_defaults')) {
                 $risk_tx->set_defaults();
             }
@@ -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
@@ -790,7 +802,7 @@ Phil Lobbes E<lt>phil at perkpartners dot comE<gt>
 
 Copyright (c) 1999-2004 Jason Kohles
 Copyright (c) 2004 Ivan Kohler
-Copyright (c) 2007-2014 Freeside Internet Services, Inc.
+Copyright (c) 2007-2015 Freeside Internet Services, Inc.
 
 All rights reserved.
 
@@ -799,9 +811,9 @@ the same terms as Perl itself.
 
 =head1 HOMEPAGE
 
-Homepage:  http://420.am/business-onlinepayment/
+Homepage:  http://perl.business/onlinepayment
 
-Development:  http://420.am/business-onlinepayment/ng.html
+Development:  http://perl.business/onlinepayment/ng.html
 
 =head1 MAILING LIST
 
@@ -817,11 +829,15 @@ The code is available from our public git repository:
 Or on the web:
 
   http://freeside.biz/gitweb/?p=Business-OnlinePayment.git
+  Or:
+  http://freeside.biz/gitlist/Business-OnlinePayment.git
 
 Many (but by no means all!) processor plugins are also available in the same
 repository, see:
 
   http://freeside.biz/gitweb/
+  Or:
+  http://freeside.biz/gitlist/
 
 =head1 DISCLAIMER
 
@@ -831,7 +847,7 @@ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 =head1 SEE ALSO
 
-http://420.am/business-onlinepayment/
+http://perl.business/onlinepayment
 
 For verification of credit card checksums, see L<Business::CreditCard>.