taxjar / vat_check

Validate EU VAT numbers the easy way with VIES!
23 stars 16 forks source link

Fix failed VIES calls since Oct 28th 2021 #7

Open berislavbabic opened 3 years ago

berislavbabic commented 3 years ago

VIES calls started failing with this gem around October 28th. We traced the issue back to the SOAPAction key being included in the request header. Here is a quick fix to exclude the offending header.

For search purposes, the error we got was: "Unknown error: (soap:Server) The given SOAPAction checkVat does not match an operation."

Before this fix:

>> VatCheck.new('LU20260743')
=> #<VatCheck:0x00007f8b98a09828 @vat="LU20260743", @regex=true, @response={:error=>"Unknown error: (soap:Server) The given SOAPAction checkVat does not match an operation."}, @vies_available=false, @vies=false>

After the fix:

>> VatCheck.new('LU20260743')
=> #<VatCheck:0x00007fc6fdabeca0 @vat="LU20260743", @regex=true, @response={:country_code=>"LU", :vat_number=>"20260743", :request_date=>Mon, 01 Nov 2021, :valid=>true, :name=>"AMAZON EU SARL", :address=>"38, AVENUE JOHN F. KENNEDY\nL-1855  LUXEMBOURG"}, @vies_available=true, @vies=true>
thomasvbeek commented 2 years ago

Looking good from our end, would be great if someone could merge this :)

thomasvbeek commented 2 years ago

@fastdivision Could we merge this? Looks good from our end and would fix the error that makes the gem unusable now :)

mvz commented 2 years ago

@fastdivision I'd really like to have this in a new release. Is there anything I can do to help move this forward?

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

mvz commented 1 year ago

@berislavbabic any chance you could sign that CLA so @fastdivision or someone else at TaxJar can merge this?

berislavbabic commented 1 year ago

@mvz sorry I missed this notification. It's now signed

mvz commented 1 year ago

Thanks, @berislavbabic!

berislavbabic commented 1 year ago

@fastdivision can we get this merged please?