DragonBe / vies

Component using the European Commission (EC) VAT Information Exchange System (VIES) to verify and validate VAT registration numbers in the EU, using PHP and Composer.
http://ec.europa.eu/taxation_customs/vies/faqvies.do#item16
MIT License
266 stars 59 forks source link

heartbeat is not working anymore #148

Open NielsLinde opened 1 year ago

NielsLinde commented 1 year ago

The heartbeat is calling tls://ec.europa.eu:443 but there has been a change on this website.

Now the status code is "HTTP/1.1 301 Moved Permanently" and the heartbeat is failing : https://github.com/DragonBe/vies/blob/master/src/Vies/HeartBeat.php#L161

domantasslai commented 1 year ago

I can approve, heartbeat is not working.

Response from readContents method: array:11 [▼ 0 => "HTTP/1.1 301 Moved Permanently" 1 => "Date: Wed, 21 Dec 2022 11:44:43 GMT" 2 => "Content-Length: 40616" 3 => "X-FPFIS: 179059083" 4 => "Location: https://commission.europa.eu/select-language?destination=/node/1" 5 => "Retry-After: 5" 6 => "Host: ec.europa.eu" 7 => "Server: Europa" 8 => "Connection: close" 9 => "" 10 => """

Sorry - 179059083

Server inaccessibility

301 - Moved Permanently/ Request ID: 179059083

bg
Сървърът е временно недостъпен

Извиняваме се за неудобството. Моля, опитайте пак по-късно.

cs
Server je dočasně nedostupný

Omlouváme se za způsobené nepříjemnosti. Zkuste to prosím znovu později.

da
Serveren er midlertidigt utilgængelig

Vi undskylder ulejligheden. Prøv igen senere.

de
Der Server ist vorübergehend nicht verfügbar

Wir entschuldigen uns für etwaige Unannehmlichkeiten. Bitte versuchen Sie es später noch einmal.

el
Ο διακομιστής δεν είναι διαθέσιμος προσωρινά

Ζητούμε συγγνώμη για τυχόν προβλήματα. Δοκιμάστε ξανά αργότερα.

en
The server is temporarily unavailable

We apologise for any inconvenience. Please try again later.

es
El servidor no está disponible temporalmente

Le rogamos disculpe las molestias. Vuelva a intentarlo más tarde.

et
Server ei ole ajutiselt kättesaadav

Palume vabandust tekkinud ebamugavuste pärast. Palun proovige hiljem uuesti.

fi
Palvelin on väliaikaisesti poissa käytöstä

Pahoittelemme mahdollista haittaa. Yritä myöhemmin uudelleen.

fr
Le serveur est temporairement indisponible

Veuillez nous excuser pour ce désagrément. Merci de réessayer plus tard.

ga
Níl fáil ar an bhfreastalaí i láthair na huaire

Is oth linn an chiotaí. Bain triail as arís ar ball.

hr
Poslužitelj je privremeno nedostupan

Ispričavamo se zbog neugodnosti. Pokušajte ponovno kasnije.

hu
A szerver átmenetileg nem érhető el, kérjük, próbálkozzon újra később

Az esetleges kellemetlenségekért elnézését kérjük.

it
Il server è temporaneamente non disponibile

Ci scusiamo per il disagio arrecato. Riprovare più tardi.

lt
Serveris laikinai neveikia

Atsiprašome už nepatogumus. Bandykite dar kartą vėliau.

lv
Serveris pagaidām nav pieejams

Atvainojamies par neērtībām. Mēģiniet vēlreiz vēlāk.

mt
Is-server mhux disponibbli temporanjament

Niskużaw ruħna għal kwalunkwe inkonvenjenza. Jekk jogħġbok erġa’ pprova aktar tard.

nl
De server is tijdelijk niet beschikbaar

Onze excuses voor het ongemak. Probeer het later nog een keer.

pl
Serwer jest tymczasowo niedostępny

Przepraszamy za wszelkie niedogodności. Proszę spróbować później.

pt
O servidor está temporariamente indisponível

Pedimos desculpa pelo incómodo. Volte a tentar mais tarde.

ro
Serverul este temporar indisponibil

Ne cerem scuze pentru eventualele inconveniente. Vă rugăm să reîncercați mai târziu.

sk
Server je dočasne nedostupný

Ospravedlňujeme sa za prípadné problémy, ktoré môžu v dôsledku toho vzniknúť.

sl
Strežnik je začasno nedosegljiv

Opravičujemo se za morebitne nevšečnosti. Poskusite ponovno pozneje.

sv
Servern är inte tillgänglig för tillfället

Vi ber om ursäkt för besväret. Försök igen senare.

"""

]

sophie-kuehn commented 1 year ago

I too. No longer working anymore.

pkrzaczkowski-hippo commented 1 year ago

We should monitor ec.europa.eu/taxation_customs/vies istead of ec.europa.eu

jbrinksmeier commented 1 year ago

~~Looks like they have a all-new restful api now: https://viesapi.eu/vies-rest-api-documentation/ Anybody with information if the soap service will be maintained and how long? Should this library move to the mentioned rest api eventually?~~

NielsLinde commented 1 year ago

No i don't think the https://viesapi.eu/ is a original vies service? But just a company which builds a rest api on top of it? Also you have to pay for the usage.

But about the heartbeat? I'm not really sure it is really needed, but if so than the "ec.europa.eu/taxation_customs/vies" would be better. I can give it a try maybe this weekend to create a merge request

pkrzaczkowski-hippo commented 1 year ago

Yep it's a wrapper. A quick fix would be to add 301 header as a correct response - the same as 308 was added.

jbrinksmeier commented 1 year ago

Yep it's a wrapper. A quick fix would be to add 301 header as a correct response - the same as 308 was added.

Given it more thought, that even appears to be the better solution to me as the heartbeat is about host availability, right? Checking if their GUI is up seems...unimportant because it might not affect the soap service at all. We might even consider if we treat any http response below 400 as a success imo, to maybe stop the rat race if this is the second time already as @pkrzaczkowski-hippo mentioned. Not to mention that this is also the easier fix as the the current HearBeat class is not built to handle an actual URL

sophie-kuehn commented 1 year ago

Client-side question: Is there actually any good reason for doing this heartbeat check? What is the risk if we don't use it at all? If the service is down, the VAT check fails and you have an error anyway.

NielsLinde commented 1 year ago

Well @sophie-kuehn i don't use the heartbeat anymore and we just try catch the calls with a timeout. You don't really need the heartbeat

pmaruszczyk commented 1 year ago

Pull Request https://github.com/DragonBe/vies/pull/149

dademaru commented 1 year ago

@pmaruszczyk

Pull Request #149

tested and it fixes the issue, thanks!

rikgirbes commented 1 year ago

If fixed, why is this issue still open?