Revision history for Perl extension Business::OnlinePayment::IPPay.
+0.07 unreleased
+ - add Reverse Authorization support, patch from dougforpres
+
0.06 Wed Jan 26 13:15:21 PST 2011
- fix january bug in tests
use vars qw($VERSION $DEBUG @ISA $me);
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '0.06';
+$VERSION = '0.07_01';
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
$DEBUG = 0;
'Post Authorization',
'Void',
'Credit',
+ 'Reverse Authorization',
],
'ECHECK' => [
'Normal Authorization',
( 'normal authorization' => 'SALE',
'authorization only' => 'AUTHONLY',
'post authorization' => 'CAPT',
+ 'reverse authorization' => 'REVERSEAUTH',
'void' => 'VOID',
'credit' => 'CREDIT',
);
}elsif ( $action eq 'post authorization' && $type eq 'CC') {
push @required_fields, qw( order_number );
+ }elsif ( $action eq 'reverse authorization' && $type eq 'CC') {
+ push @required_fields, qw( order_number card_number expiration amount );
}elsif ( $action eq 'void') {
push @required_fields, qw( order_number amount );
normal authorization
authorization only
+ reverse authorization
post authorization
credit
void
See http://www.ippay.com/ for more information.
-=head1 AUTHOR
+=head1 AUTHORS
-Jeff Finucane, ippay@weasellips.com
+Original author: Jeff Finucane
+
+Current maintainer: Ivan Kohler <ivan-ippay@freeside.biz>
+
+Reverse Authorization patch from dougforpres
=head1 SEE ALSO
require "t/lib/test_account.pl";
my($login, $password, %opt) = test_account_or_skip('card');
-plan tests => 43;
+plan tests => 50;
use_ok 'Business::OnlinePayment';
$postable_amount = $content{amount} if $tx->is_success;
}
+# authorization void test
+{
+ my $tx = Business::OnlinePayment->new("IPPay", @opts);
+ $tx->content(%content, action => 'authorization only', amount => '3.00' );
+ $tx->test_transaction(1);
+ $tx->submit;
+
+ if ($tx->is_success) {
+ my $void_tx = Business::OnlinePayment->new("IPPay", @opts);
+
+ $tx->content(%content, action => 'reverse authorization',
+ order_number => $tx->order_number );
+ tx_check(
+ $tx,
+ desc => "reverse authorization",
+ is_success => 1,
+ result_code => '000',
+ error_message => 'APPROVED',
+ authorization => qr/TEST\d{2}/,
+ avs_code => '', # so rather pointless :\
+ cvv2_response => '', # ...
+ );
+ }
+ else {
+
+ }
+}
+
# post authorization test
SKIP: {
my $tx = new Business::OnlinePayment( "IPPay", %opt );