From 0184d0a8e184711d27869a244f403322e29f8843 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 12 Mar 2010 10:50:13 +0000 Subject: [PATCH] RT#7180: fix refund problems --- Changes | 4 ++++ lib/Business/OnlinePayment/Jety.pm | 20 ++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index f237aef..2785963 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Business-OnlinePayment-Jety +0.07 Wed Mar 10 21:27:53 PST 2010 + - Add _info support. + - Fix incorrect use of order_number instead of authorization. + 0.06 Wed Feb 17 19:49:45 PST 2010 - Add get_returns method. diff --git a/lib/Business/OnlinePayment/Jety.pm b/lib/Business/OnlinePayment/Jety.pm index f653e8a..8d563d8 100644 --- a/lib/Business/OnlinePayment/Jety.pm +++ b/lib/Business/OnlinePayment/Jety.pm @@ -10,7 +10,7 @@ use Date::Format; use Tie::IxHash; @ISA = qw(Business::OnlinePayment::HTTPS); -$VERSION = '0.06'; +$VERSION = '0.07'; $me = 'Business::OnlinePayment::Jety'; $DEBUG = 0; @@ -36,7 +36,7 @@ my %map = ( 'phone' => 'phone', 'programdesc' => 'description', 'ref' => sub { my %c = @_; - $c{'order_number'} || + $c{'authorization'} || substr( time2str('%Y%m%d%H%M%S',time). int(rand(10000)), -15 ) }, 'bankname' => 'bank_name', @@ -49,7 +49,7 @@ my %map = ( 'void' => [ 'username' => 'login', 'password' => 'password', - 'ref' => 'order_number', + 'ref' => 'authorization', 'accountdda' => 'account_number', 'amount' => sub { my %c = @_; sprintf("%.02f",$c{'amount'}) }, ], @@ -85,12 +85,24 @@ my %required = ( action login password - order_number + authorization account_number amount ) ], ); +sub _info { + { + info_compat => '0.01', + gateway_name => 'Jety', + gateway_url => 'http://www.jetypay.com', + module_version => $VERSION, + supported_types => [ 'ECHECK' ], + supported_actions => [ 'Normal Authorization', 'Void' ], + ECHECK_void_requires_account => 1, + } +} + sub set_defaults { my $self = shift; $self->server('api.cardservicesportal.com'); -- 2.11.0