correct default_ns for non-USD/CAD transactions, RT#26568
authorIvan Kohler <ivan@freeside.biz>
Mon, 23 Jun 2014 22:54:46 +0000 (15:54 -0700)
committerIvan Kohler <ivan@freeside.biz>
Mon, 23 Jun 2014 22:54:46 +0000 (15:54 -0700)
Changes
lib/Business/OnlinePayment/IATSPayments.pm

diff --git a/Changes b/Changes
index 19d4049..52bb9c2 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,10 @@
 
 Revision history for Perl extension Business::OnlinePayment::IATSPayments.
 
+0.03  unreleased
+        - Correct default_ns for non-USD/CAD transactions, patch from Doug
+          Juhlin / Donor.com, thanks!
+
 0.02  Sat Feb 15 12:45:24 PST 2014
         - trim spaces from authorization (TRANSACTIONID)
         - return numeric IATS error message as result_code
index cb5eda3..8bc3d78 100644 (file)
@@ -8,7 +8,7 @@ use Business::CreditCard;
 use SOAP::Lite;
 #SOAP::Lite->import(+trace=>'debug');
 
-our $VERSION = '0.02';
+our $VERSION = '0.03_01';
 $VERSION = eval $VERSION; # modperlstyle: convert the string into a number
 
 sub _info {
@@ -221,6 +221,9 @@ sub submit {
 
   my $uri = $base_uri. "ProcessLink.asmx?op=$action";
 
+  # never "uk.iatspayments.com"
+  my $default_ns = 'https://www.iatspayments.com/NetGate/';
+
   my %data = map { $_ => $content{$_} } (qw(
     agentCode
     password
@@ -268,7 +271,7 @@ sub submit {
 
   my $result = SOAP::Lite
                  ->proxy($uri)
-                 ->default_ns($base_uri)
+                 ->default_ns($default_ns)
                  #->on_action( sub { join '/', @_ } )
                  ->on_action( sub { join '', @_ } )
                  ->autotype(0)