Failure when cURL or Simple methods set as default
-
Since my comments on a different thread were deleted, here it is again:
* VIES has closed down the service that the “cURL” and “Simple” methods used.
* The plugin is supposed to keep trying until a method works, but that mechanism does not work.
* If cURL or Simple are selected as the first method to try, validation will always show “Invalid ID” to the customer – the working SOAP method is not called
* Only if SOAP is selected as the first method to try does the current plugin workDetails:
In alg_wc_eu_vat_validate_vat_no_soap() the cURL method checks if the cURL response == false. Since the URL it requests returns a 404, and curl_exec() returns true for 404s, failure is not properly detected. The code then goes on to check for the string “validStyle” and returns false (meaning an invalid VAT ID) rather than null (meaning the validation process failed). The customer is therefore shown an Invalid ID message, and the other methods aren’t tried.
This also happens if “Simple” is chosen as the first method. The simple method itself fails properly (returning null) but cURL is the next method tried, and because of the above, SOAP is never tried, so also always shows an Invalid ID message.I don’t need support on this – switching to SOAP is a simple remedy – I’m just adding this in case it’s useful to others before it’s fixed in the plugin.
- The topic ‘Failure when cURL or Simple methods set as default’ is closed to new replies.