Email address has a wrong format error, on paypal express checkout Magento 2.3.2
-
13-04-2021 - |
سؤال
Paypal Express checkout not working, it says "Exception message: We can't save the address: Email has a wrong format". However payments are being successful but Magento order isn't creating. Anyone?
Exception message: We can't save the address:
Email has a wrong format
Trace: <pre>#1 Magento\Framework\Model\ResourceModel\Db\AbstractDb->save() called at [vendor/magento/framework/Model/AbstractModel.php:655]
I checked in this file vendor/magento/module-sales/Model/Order/Address/Validator.php
and $address->getEmail() is coming NULL/empty.
المحلول
Issue resolved with this patch https://nimb.ws/gFA06i
Here is the code in non-image format:
/* set customer email if email is found empty (bug) */
if ($this->_quote->getCustomerEmail() === null && $this->_quote->getBillingAddress()->getEmail() !== null) {
$this->_quote->setCustomerEmail($this->_quote->getBillingAddress()->getEmail());
}
لا تنتمي إلى magento.stackexchange