diff --git a/lib/vat_check/requests.rb b/lib/vat_check/requests.rb index 95edd8b..f54598a 100644 --- a/lib/vat_check/requests.rb +++ b/lib/vat_check/requests.rb @@ -6,7 +6,7 @@ def self.lookup(vat) client = Savon.client(wsdl: 'https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl', follow_redirects: true, log: false, log_level: :debug, pretty_print_xml: false) country_code, vat_number = VatCheck::Utility.split(vat) begin - response = client.call(:check_vat, message: {country_code: country_code, vat_number: vat_number}, message_tag: :checkVat) + response = client.call(:check_vat, message: {country_code: country_code, vat_number: vat_number}, message_tag: :checkVat, soap_action: nil) response.to_hash[:check_vat_response].reject { |key| key == :@xmlns } rescue Savon::SOAPFault => e if !!(e.message =~ /MS_UNAVAILABLE/)