Open stkrelax opened 4 years ago
Hi @stkrelax. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
having same issue in my siteVAT CALCULATOR
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1006 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Summary (*)
I came accross this when i was searching why our VatValidation Service is blocking calls from our side. i figured out that there is an explicit deleting of quote billing addresses at
https://github.com/magento/magento2/blob/ba25897c151b4f33505a8fe91aa1942bb6e71330/app/code/Magento/Checkout/Model/PaymentInformationManagement.php#L124
this method is called up to 4 times in our checkout (classic OneStepCheckout plus iways/magento2-paypal-plus module) the Reasons therefor are
Note that there was no change in billingAddress, but the billingaddress is still posted due to the
false
inhttps://github.com/magento/magento2/blob/ba25897c151b4f33505a8fe91aa1942bb6e71330/app/code/Magento/Checkout/view/frontend/web/js/action/set-payment-information.js#L17
this
false
tells the script to not skip billing. Thus billing data is provided and in management a new billing address is created and the old one deleted.All together almost okay, despite the fact that i sometimes had 2 billingaddresses and 1 shippingaddress set to my quote at one time... This does not seem to affect checkout or order place in any kind, so it is working.
But it affects the Vat Validation.
You may know a certain amount of calls/same calls lead to a block (around 1 minute) on the VIES or the german https://evatr.bff-online.de/eVatR/xmlrpc/ which actually uses the same endpoints.
There were some tickets that tried to prevent this behaviour. One good approach was that not everytime there must be a validation when nothing has changed. In this Feature the request data for validation ist stored in the quote address. A check is only made, when a change in the request data appears.
Examples (*)
And there is the problem:
Having set Vat Validation based on billing address and having a billingaddress that renews itself on every call causes multiple Validation call to VIES. Sometimes to much so that VIES or other will block your ip for a while.
Proposed solution
OR