Question

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]

enter image description here

I checked in this file vendor/magento/module-sales/Model/Order/Address/Validator.php and $address->getEmail() is coming NULL/empty.

Was it helpful?

Solution

Issue resolved with this patch https://nimb.ws/gFA06i

enter image description here

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());
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top