Skip to content

Commit f57fa6d

Browse files
committed
Removed EU Online Validation. VIES not available.
Updated Interface between main module and country modules.
1 parent 6b58bee commit f57fa6d

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

Api/Data/TaxSchemeInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ interface TaxSchemeInterface
88
{
99
/**
1010
* @param string $countryCode
11-
* @param string|null $taxId
11+
* @param string $taxId
1212
* @return TaxIdCheckResponseInterface
1313
*/
1414
public function checkTaxId(
1515
string $countryCode,
16-
?string $taxId
16+
string $taxId
1717
): TaxIdCheckResponseInterface;
1818

1919
/**
2020
* @param string $customerCountryCode
21-
* @param string|null $customerPostCode
2221
* @param bool $taxIdValidated
2322
* @param float $orderValue
23+
* @param string|null $customerPostCode
2424
* @param int|null $storeId
2525
* @return int|null
2626
*/
2727
public function getCustomerGroup(
2828
string $customerCountryCode,
29-
?string $customerPostCode,
3029
bool $taxIdValidated,
3130
float $orderValue,
31+
?string $customerPostCode,
3232
?int $storeId
3333
): ?int;
3434

Controller/Adminhtml/Createorder/Validate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ public function execute()
112112

113113
$groupId = $this->autoCustomerGroup->getCustomerGroup(
114114
$countryCode,
115-
$postcode,
116115
$taxIdCheckResponse->getIsValid(),
117116
$quote,
117+
$postcode,
118118
$storeId
119119
);
120120
$responseData = [

Model/AutoCustomerGroup.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,28 @@ public function checkTaxId(
6161

6262
/**
6363
* @param string $customerCountryCode
64-
* @param string $customerPostCode
6564
* @param TaxIdCheckResponseInterface $validationResults
6665
* @param Quote $quote
67-
* @param int $storeId
66+
* @param string|null $customerPostCode
67+
* @param int|null $storeId
6868
* @return int|null
6969
*/
7070
public function getCustomerGroup(
7171
string $customerCountryCode,
72-
string $customerPostCode,
7372
bool $taxIdValidated,
7473
Quote $quote,
75-
int $storeId
74+
?string $customerPostCode,
75+
?int $storeId
7676
): ?int {
7777
if ($this->isModuleEnabled($storeId)) {
7878
foreach ($this->taxSchemes->getEnabledTaxSchemes($storeId) as $taxScheme) {
7979
if (in_array($customerCountryCode, $taxScheme->getSchemeCountries())) {
8080
$schemeOrderValue = $taxScheme->getOrderValue($quote);
8181
return $taxScheme->getCustomerGroup(
8282
$customerCountryCode,
83-
$customerPostCode,
8483
$taxIdValidated,
8584
$schemeOrderValue,
85+
$customerPostCode,
8686
$storeId
8787
);
8888
}

Model/Collector/AutoCustomerGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ public function collect(
179179
//Get the auto assigned group for customer, returns null if group shouldn't be changed.
180180
$newGroup = $this->autoCustomerGroup->getCustomerGroup(
181181
$quoteAddress->getCountryId(),
182-
$quoteAddress->getPostcode() ?: "",
183182
$validationResult ? $validationResult->getIsValid() : false,
184183
$quote,
184+
$quoteAddress->getPostcode(),
185185
$storeId
186186
);
187187

Plugin/Customer/BeforeAddressSaveObserverPlugin.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public function aroundExecute(
6464
//Customer group at this stage, as the this depends on order value, which we
6565
//Don't have at this stage.
6666
if (!empty($customerAddress->getVatId()) &&
67-
!empty($customerAddress->getVatId()) &&
6867
$customer->getStore()->getId()) {
6968
$taxIdCheckResponse = $this->autoCustomerGroup->checkTaxId(
7069
$customerAddress->getCountryId(),

0 commit comments

Comments
 (0)