never send an empty country
authorjeff <jeff>
Sat, 17 Jul 2010 22:34:58 +0000 (22:34 +0000)
committerjeff <jeff>
Sat, 17 Jul 2010 22:34:58 +0000 (22:34 +0000)
Changes
IPPay.pm

diff --git a/Changes b/Changes
index cbc09c3..6cab229 100644 (file)
--- 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
index c58e14a..2786c95 100644 (file)
--- 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,