Comments (10)
Hi @mikeSimonson,
Our workflow is to add VAT ID's into a queue that's been picked up by a worker that checks for a heartbeat before processing. If there's no pulse, it waits for 30 minutes and tries again. If there's a pulse it validate the VAT ID from the queue.
I hope this gives you a pointer how to deal with the service. Yes, I know it's not a reliable service, but with the heartbeat we can mitigate the issue before we start processing.
from vies.
Thanks
from vies.
Hi, is there a way of blocking the validation process using the vies europe server link. This server is down almost twice a week and is making the checkout process horrible long.
Here is what i'm looking for :
- I wish to just validate every VAT number without checking it on the vies server (change the code to if the amount of numbers are correct like 9 digits, it validates the VAT number).
- Then i'll check it manually when i have to ship the product with the "Delivery adress".
This VAT validation on magento is just bullshit because it just checks if the number exist. A simple google search and i can input any validate VAT number from another company to buy exclusif tax and let if ship to my adress. The best way to control is to check the VAT number manually with the adress for the B2B clients.
Hope you can help me.
Regards,
Marc
from vies.
Well sure .. If You look at the code . . the validateVat
function calls validateVatSum
here https://github.com/DragonBe/vies/blob/master/src/Vies/Vies.php#L242. Instead of calling ValidateVat that checks the number and if its valid (sum) it calls the api endpoint You could just call validateVatSum
to check it offline (length, check-sum).
from vies.
Hi krzaczek,
Thank you for your fast reply ;) I'll try to change the code on this module, see if it works. But now that i'm looking at the code, i think it would be easier to change it directly on the native magento VAT module. Just blocking the VIES europe server check or add a fallback to the vatlayer server ( https://vatlayer.com/).
Regards,
Marc
from vies.
Hey @marcwales,
You can also use the "HeartBeat" functionality to verify if the service is online and active, as described in the main example in the README.md
.
The way we do it is to have a worker listening to incoming VAT ID's from a queue system (Gearman, RabbitMQ, ZeroMQ, …), checks if the service is operational using the heartbeat functionality and if it is, processes the queue. If not it waits for 30 minutes to check again. A simple solution, but works very effectively as the validation of VAT ID's is something that can safely run in the background. A faulty VAT ID (e.g. not validated) will be marked in a report with validation ID (from VIES) including timestamp so we can hand it over to the finance department.
If you just want to verify the "correctness" of a VAT ID, you can use the checksum validation mentioned by @krzaczek above.
I'm looking to modify this worker so I can add it to the examples.
from vies.
Sorry, but during lunch I whipped up this small Proof-of-Concept to process VAT ID's asynchronously. It's rough code and should not be used as-is in production, but it should give you a good idea how to offload the VAT validation process in an asynchronous way.
Please see https://github.com/DragonBe/vies/tree/master/examples/async_processing for details.
from vies.
Hi DragonBe,
Thanks your for your fast response also ;) I'm not used to get this quick help on a forum. I'll test this week both solution in order to see which one is the best for the checkout process. I'll try to add the vatlayer api because it looks pretty good on their website.
Regards,
Sidney
from vies.
Hey @marcwales, I hope that now things are working out for you. If you have any feedback for us how we can improve the service, please let us know. The easier we can make this tool for you (and the rest of the world) to use, the better.
from vies.
Closing this issue.
from vies.
Related Issues (20)
- Validation of Irish VAT ID failed for valid VAT ID HOT 7
- Making VIES package more inclusive
- Missing BG checksum validation for foreign natual persons
- VIES_EU_COUNTRY_LIST Visibility HOT 1
- Package upgrade to composer 2.0
- Ensure this package can be installed with Composer 2.0
- Implementing a Symfony constraint based on this library HOT 2
- Remove support for the United Kingdom ("GB") HOT 16
- Add support for United Kingdom (Northern Ireland) ("GB-NIR") HOT 7
- Support php8
- Validation failed for valid VAT numbers HOT 8
- 32 Bit Support HOT 1
- The service moved to SSL endpoint. HOT 1
- use of ::VIES_EXCLUDED_COUNTRY_CODES
- ValidatorLV results inconsistent with official EU validation
- heartbeat is not working anymore HOT 12
- Cannot populate CheckVatResponse after using `toArray`
- Optional Argument Validation Fails for ® HOT 2
- Heathbeat check always false HOT 1
- GetAddress non getting separated city, zip
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vies.