2.3.4 PayPal issue hotfix

This article provides a fix for errors received during order placement when selecting a region in PayPal Express Checkout. The issue is caused by changes made in the Adobe Commerce v2.3.4 release and is related to how PayPal Express Checkout address fields are parsed.

Affected versions and products

  • Adobe Commerce on cloud infrastructure v2.3.4
  • Adobe Commerce on-premises v2.3.4

Issue

An error occurs when entering the country and region during order placement in PayPal Express Checkout. The issue is reproducible for any country where the region field in the address section is a text field (as opposed to a drop-down menu).

Steps to reproduce :

  1. Enable PayPal Express Checkout.
  2. Add product to cart as a guest or when you are logged in.
  3. Go to checkout.
  4. Select your shipping address. For example, the UK . Then enter an input into the State/Province field. For example, Nottinghamshire.
  5. Click on the Place Order button to place order. You get a successful order page and order confirmation email.

Expected Result:

The order is placed successfully.

Actual Result:

When the order button is clicked on, an error displays:

Error 500: NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to a member
  function getId() on null in httpdocs/vendor/magento/module-paypal/Model/Api/Nvp.php:1527

Solution

For Adobe Commerce on-premises merchants: Apply the hotfix, which is available from the Downloads section on magento.com portal in My account.

For Adobe Commerce on cloud infrastructure merchants: Adobe has included the fix in the Cloud Patches for Commerce v1.0.2. Please refer to Cloud Patches for Commerce release notes in our developer documentation to find instructions on applying the latest package.

How to Apply the Patch

For instructions, see How to apply a composer patch provided by Adobe in our support knowledge base.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a