From 7516d92e433d4e74589e1e4337dc885aaf523f01 Mon Sep 17 00:00:00 2001 From: jeff Date: Sat, 17 Jul 2010 22:34:58 +0000 Subject: [PATCH] never send an empty country --- Changes | 1 + IPPay.pm | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Changes b/Changes index cbc09c3..6cab229 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,7 @@ Revision history for Perl extension Business::OnlinePayment::IPPay. - 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 diff --git a/IPPay.pm b/IPPay.pm index c58e14a..2786c95 100644 --- a/IPPay.pm +++ b/IPPay.pm @@ -309,6 +309,7 @@ sub submit { Phone => 'phone', ); } + delete $shippingaddr{Country} unless $shippingaddr{Country}; tie my %shippinginfo, 'Tie::IxHash', $self->revmap_fields( @@ -362,6 +363,7 @@ sub submit { IndustryInfo => \%industryinfo, ShippingInfo => \%shippinginfo, ); + delete $req{BillingCountry} unless $req{BillingCountry}; my $post_data; my $writer = new XML::Writer( OUTPUT => \$post_data, -- 2.20.1