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
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 :
- Enable PayPal Express Checkout.
- Add product to cart as a guest or when you are logged in.
- Go to checkout.
- Select your shipping address. For example, the UK . Then enter an input into the State/Province field. For example, Nottinghamshire.
- Click on the Place Order button to place order. You get a successful order page and order confirmation email.
The order is placed successfully.
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
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.