Skip to content

Commit 6d32e32

Browse files
mescalanteaclaude
andcommitted
Gate service sub-fields behind enabledForServices in GeneralSettingsService
allowFirstServicePaymentDelay and allowServiceRegistrationItems were being populated independently of enabledForServices. A merchant credential could have allow_first_instalment_delay or with_registration in its contract options without having services enabled, causing those country codes to appear in the response even when the country was not in enabledForServices. The sub-option checks are now nested inside the isEnabledForServices() block so that a country can only appear in allowFirstServicePaymentDelay or allowServiceRegistrationItems if it is also present in enabledForServices. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6e41115 commit 6d32e32

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/BusinessLogic/Domain/GeneralSettings/Services/GeneralSettingsService.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ public function getGeneralSettings(): ?GeneralSettings
7777

7878
if ($credentials->isEnabledForServices()) {
7979
$enabledForServices[] = $credentials->getCountry();
80-
}
81-
if ($credentials->isAllowFirstServicePaymentDelay()) {
82-
$allowFirstServicePaymentDelay[] = $credentials->getCountry();
83-
}
84-
if ($credentials->isAllowServiceRegistrationItems()) {
85-
$allowServiceRegistrationItems[] = $credentials->getCountry();
80+
if ($credentials->isAllowFirstServicePaymentDelay()) {
81+
$allowFirstServicePaymentDelay[] = $credentials->getCountry();
82+
}
83+
if ($credentials->isAllowServiceRegistrationItems()) {
84+
$allowServiceRegistrationItems[] = $credentials->getCountry();
85+
}
8686
}
8787
}
8888
}

0 commit comments

Comments
 (0)