Admin can’t create order/reorder when Braintree payment enabled
This article provides a patch for the ÃÛ¶¹ÊÓÆµ Commerce 2.4.5 issue where an Admin user can’t create orders nor reorders for customers when the Braintree payment method is enabled.
Description description
Environments
- ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure 2.4.5
- ÃÛ¶¹ÊÓÆµ Commerce on-premises 2.4.5
- Magento Open Source 2.4.5
Issue/Symptoms
Steps to reproduce:
- The core Braintree integration is used (Stores
>
Configurations>
Sales>
Payment Method>
Braintree). - Using Luma Storefront, place an order.
- Go to Admin UI
>
Sales. - Either try to create a new order for a customer, or go to a previously placed order and click on Reorder.
Expected result:
Admin users can successfully create orders and reorders for customers when the Braintree payment method is enabled.
Actual result:
Admin users can’t create orders nor reorders for customers when the Braintree payment method is enabled, and returns the following error:
report.CRITICAL: Error: Call to a member function getMethodInstance() on null in /app/vendor/paypal/module-braintree-core/Block/Form.php:174
Cause
Incorrect class dependencies (vendor/paypal/module-braintree-core/Block/Form.php
)
Resolution resolution
Solution
Apply the patch provided in this article.
Patch
The patch is attached to this article. To download it, click the following link:
Note:
Additionally for ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure merchants: ÃÛ¶¹ÊÓÆµ has included the fix in the Cloud Patches for Commerce version 1.0.18. Please refer to How to apply a composer patch provided by ÃÛ¶¹ÊÓÆµ in our support knowledge base for instructions.