magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.48k stars 9.29k forks source link

PayPal Express Checkout error "Failed address validation: %1" on Guest checkout #39107

Closed kamzata closed 3 weeks ago

kamzata commented 4 weeks ago

Still present for me in Magento 2.4.7-p1 no matter if:

This seems to solve the issue.

        ...

        public function place($token, $shippingMethodCode = null)
        {
            if ($shippingMethodCode) {
                $this->updateShippingMethod($shippingMethodCode);
            }

            if ($this->getCheckoutMethod() == \Magento\Checkout\Model\Type\Onepage::METHOD_GUEST) {
                $this->prepareGuestQuote();
            }

            $this->ignoreAddressValidation();
            $this->_quote->collectTotals();

            // (BUG) SET CUSTOMER EMAIL IF EMAIL IS FOUND EMPTY
            if ($this->_quote->getCustomerEmail() === null && $this->_quote->getBillingAddress()->getEmail() !== null) {
            $this->_quote->setCustomerEmail($this->_quote->getBillingAddress()->getEmail());
            // (BUG) END

            $order = $this->quoteManagement->submit($this->_quote);

            if (!$order) {
                return;
            }

            // commence redirecting to finish payment, if paypal requires it
            if ($order->getPayment()->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_REDIRECT)) {
                $this->_redirectUrl = $this->_config->getExpressCheckoutCompleteUrl($token);
            }
            ....

Correlated to:

29473

25399

Originally posted by @kamzata in https://github.com/magento/magento2/issues/25399#issuecomment-2308482597

m2-assistant[bot] commented 4 weeks ago

Hi @kamzata. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 3 weeks ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 3 weeks ago

Hi @kamzata,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the attached video.

https://github.com/user-attachments/assets/d57575d7-98e7-4f0c-9c32-155711e1aa6c

We are able to place the order with Paypal Express checkout using checkout.

Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible.

Thanks.

kamzata commented 3 weeks ago

Hi @kamzata,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the attached video.

Screen.Recording.2024-08-29.at.11.34.48.mov We are able to place the order with Paypal Express checkout using checkout.

Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible.

Thanks.

I don't know why but now it seems to work for me too. However, I'm not able to see the block for creating an account:

image

engcom-Bravo commented 3 weeks ago

Hi @kamzata,

Thanks for your update.

As per this comment https://github.com/magento/magento2/issues/39107#issuecomment-2317190047 since the issue is no more reproducible and we are able to see the customer block as well.Hence we are closing this issue.

Thanks.