r64315 - in /branches/upstream/libbusiness-onlinepayment-ippay-perl/current: Changes IPPay.pm META.yml t/card.t
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Wed Oct 27 21:31:25 UTC 2010
Author: periapt-guest
Date: Wed Oct 27 21:31:17 2010
New Revision: 64315
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64315
Log:
[svn-upgrade] new version libbusiness-onlinepayment-ippay-perl (0.05)
Modified:
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml
branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes?rev=64315&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/Changes Wed Oct 27 21:31:17 2010
@@ -1,8 +1,10 @@
Revision history for Perl extension Business::OnlinePayment::IPPay.
-0.05 unreleased
+0.05 Mon Jul 19 10:19:34 EDT 2010
- add introspection info used in Business::OnlinePayment 3.01+
- (0.05_02) add ECHECK_void_requires_account to introspection info
+ - add a quick routing_code validation for a better error message
+ - never send an empty country for shipping or billing address
0.04 Tue Jul 22 12:19:54 2008 EDT
- force country and ship country to ISA-3166-alpha-3
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm?rev=64315&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/IPPay.pm Wed Oct 27 21:31:17 2010
@@ -11,7 +11,7 @@
use vars qw($VERSION $DEBUG @ISA $me);
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '0.05_02';
+$VERSION = '0.05';
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
$DEBUG = 0;
@@ -213,6 +213,14 @@
$self->required_fields(@required_fields);
+ #quick validation because ippay dumps an error indecipherable to the end user
+ if (grep { /^routing_code$/ } @required_fields) {
+ unless( $content{routing_code} =~ /^\d{9}$/ ) {
+ $self->_error_response('Invalid routing code');
+ return;
+ }
+ }
+
if ($self->test_transaction()) {
$self->server('test1.jetpay.com');
$self->port('443');
@@ -301,6 +309,7 @@
Phone => 'phone',
);
}
+ delete $shippingaddr{Country} unless $shippingaddr{Country};
tie my %shippinginfo, 'Tie::IxHash',
$self->revmap_fields(
@@ -354,6 +363,7 @@
IndustryInfo => \%industryinfo,
ShippingInfo => \%shippinginfo,
);
+ delete $req{BillingCountry} unless $req{BillingCountry};
my $post_data;
my $writer = new XML::Writer( OUTPUT => \$post_data,
@@ -406,6 +416,17 @@
}
}
+}
+
+sub _error_response {
+ my ($self, $error_message) = (shift, shift);
+ $self->result_code('');
+ $self->order_number('');
+ $self->authorization('');
+ $self->cvv2_response('');
+ $self->avs_code('');
+ $self->is_success( 0);
+ $self->error_message($error_message);
}
sub _xmlwrite {
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml?rev=64315&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/META.yml Wed Oct 27 21:31:17 2010
@@ -1,16 +1,28 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Business-OnlinePayment-IPPay
-version: 0.03
-version_from: IPPay.pm
-installdirs: site
+--- #YAML:1.0
+name: Business-OnlinePayment-IPPay
+version: 0.05
+abstract: ~
+author:
+ - Jeff Finucane <ippay at weasellips.com>
+license: unknown
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
- Business::OnlinePayment: 3
- Business::OnlinePayment::HTTPS: 0.09
- Test::More: 0.42
- Tie::IxHash: 0
- XML::Simple: 0
- XML::Writer: 0
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+ Business::OnlinePayment: 3
+ Business::OnlinePayment::HTTPS: 0.09
+ Locale::Country: 2
+ Test::More: 0.42
+ Tie::IxHash: 0
+ XML::Simple: 0
+ XML::Writer: 0
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.55_02
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t?rev=64315&op=diff
==============================================================================
--- branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t (original)
+++ branches/upstream/libbusiness-onlinepayment-ippay-perl/current/t/card.t Wed Oct 27 21:31:17 2010
@@ -44,7 +44,8 @@
result_code => '000',
error_message => 'APPROVED',
authorization => qr/TEST\d{2}/,
- avs_code => 'U', # so rather pointless :\
+# avs_code => 'U', # so rather pointless :\
+ avs_code => 'Y', # so very pointless :\
cvv2_response => 'P', # ...
);
$voidable = $tx->order_number if $tx->is_success;
@@ -79,7 +80,8 @@
result_code => '000',
error_message => 'APPROVED',
authorization => qr/TEST\d{2}/,
- avs_code => 'U', # so rather pointless :\
+# avs_code => 'U', # so rather pointless :\
+ avs_code => 'Y', # so very pointless :\
cvv2_response => 'P', # ...
);
$postable = $tx->order_number if $tx->is_success;
More information about the Pkg-perl-cvs-commits
mailing list