Skip Menu |

This queue is for tickets about the Business-OnlinePayment-IPPay CPAN distribution.

Report information
The Basics
Id: 76999
Status: resolved
Priority: 0/
Queue: Business-OnlinePayment-IPPay

People
Owner: Nobody in particular
Requestors: dougforpres [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.06
Fixed in: (no value)



Subject: Add support for Reverse Authorization in IPPay
Hi, The attached patch adds support for Reverse Authorization in Business-OnlinePayment-IPPay-0.06. Although the patch is for 0.06 we've actually had it in production for some time using the 0.04 version of IPPay. Finally thought it might be time to give others the benefit :) Per the README file, patch attached in unified diff format. Doug
Subject: 0.06_to_mt_ext.diff
diff -r -u /Business-OnlinePayment-IPPay-0.06/IPPay.pm ./IPPay.pm --- /Business-OnlinePayment-IPPay-0.06/IPPay.pm 2011-01-26 13:15:38.000000000 -0800 +++ ./IPPay.pm 2012-05-04 14:39:59.000000000 -0700 @@ -28,6 +28,7 @@ 'Post Authorization', 'Void', 'Credit', + 'Reverse Authorization', ], 'ECHECK' => [ 'Normal Authorization', @@ -89,6 +90,7 @@ ( 'normal authorization' => 'SALE', 'authorization only' => 'AUTHONLY', 'post authorization' => 'CAPT', + 'reverse authorization' => 'REVERSEAUTH', 'void' => 'VOID', 'credit' => 'CREDIT', ); @@ -189,6 +191,8 @@ }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 ); @@ -521,6 +525,7 @@ normal authorization authorization only + reverse authorization post authorization credit void diff -r -u /Business-OnlinePayment-IPPay-0.06/t/card.t ./t/card.t --- /Business-OnlinePayment-IPPay-0.06/t/card.t 2011-01-26 13:14:26.000000000 -0800 +++ ./t/card.t 2012-05-04 11:35:13.000000000 -0700 @@ -4,7 +4,7 @@ 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'; @@ -89,6 +89,34 @@ $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 );
On Fri May 04 17:53:17 2012, dougforpres wrote: Show quoted text
> Hi, > > The attached patch adds support for Reverse Authorization in > Business-OnlinePayment-IPPay-0.06. > Although the patch is for 0.06 we've actually had it in production for > some time using the 0.04 version of IPPay. > > Finally thought it might be time to give others the benefit :) > > Per the README file, patch attached in unified diff format.
Patch applied, will be in 0.07. Thanks! Ivan
From: dougforpres [...] gmail.com
Ooops, Looks like when I sent the patch I forgot to update the "@opts => %opt" in the extra test case we added for "void authorization" - would you like another patch, or is this an easy fix for you? Doug On Fri May 04 18:20:22 2012, IVAN wrote: Show quoted text
> On Fri May 04 17:53:17 2012, dougforpres wrote:
> > Hi, > > > > The attached patch adds support for Reverse Authorization in > > Business-OnlinePayment-IPPay-0.06. > > Although the patch is for 0.06 we've actually had it in production for > > some time using the 0.04 version of IPPay. > > > > Finally thought it might be time to give others the benefit :) > > > > Per the README file, patch attached in unified diff format.
> > Patch applied, will be in 0.07. > > Thanks! > > Ivan
On Mon May 07 12:32:55 2012, dougforpres wrote: Show quoted text
> Ooops, Looks like when I sent the patch I forgot to update the "@opts => > %opt" in the extra test case we added for "void authorization" - would > you like another patch, or is this an easy fix for you?
Change applied, will be in 0.07. Ivan