Merge pull request #6788 from turbo124/v5-develop

Minor fixes for requirements
This commit is contained in:
David Bomba 2021-10-07 18:02:01 +11:00 committed by GitHub
commit be78eb069a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -561,15 +561,15 @@ class BaseDriver extends AbstractPaymentDriver
}
}
if ($this->company_gateway->require_contact_name) {
if ($this->checkRequiredResource($this->first_name)) {
$this->required_fields[] = 'contact_first_name';
}
// if ($this->company_gateway->require_contact_name) {
// if ($this->checkRequiredResource($this->first_name)) {
// $this->required_fields[] = 'contact_first_name';
// }
if ($this->checkRequiredResource($this->last_name)) {
$this->required_fields[] = 'contact_last_name';
}
}
// if ($this->checkRequiredResource($this->last_name)) {
// $this->required_fields[] = 'contact_last_name';
// }
// }
if ($this->company_gateway->require_postal_code) {
// In case "require_postal_code" is true, we don't need billing address.