if ($billingCountry === null
) { throw new RuntimeException('Billing address needs a country'
);
} $country =
$this->
get(CountryGatewayInterface::
class)->
getCountry($billingCountry->
getId(),
$context);
if (!
$country->
allowShipping()) { $errors['billing'
]['country'
] =
$this->
get('snippets'
)->
getNamespace('frontend/register/index'
)->
get('CountryNotAvailableForShipping'
);
} } $validCaptcha =
$this->
validateCaptcha($this->
get(Shopware_Components_Config::
class)->
get('registerCaptcha'
),
$this->request
);
if (!
$validCaptcha) { $errors['captcha'
] =
[ $this->
get('snippets'
) ->
getNamespace('widgets/captcha/custom_captcha'
) ->
get('invalidCaptchaMessage'
),
];
} $errors['occurred'
] = !
empty($errors['personal'
]) || !
empty($errors['shipping'
]) || !
empty($errors['billing'
])