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.47k stars 9.28k forks source link

Braintree Error Logs with Braintree Payment Disabled. #33501

Closed victortodoran closed 2 days ago

victortodoran commented 3 years ago

Preconditions (*)

  1. Magento 2.4.2 (probably for older versions as well

Steps to reproduce (*)

  1. Fresh install
  2. Ensure Braintree payment method is disabled
  3. Place an order

Expected result (*)

  1. Order is placed. No Error Logs.

Actual result (*)

MagentoRoot Folder/var/log/system.log -> Below Error message is gettting printed in system.log after placing orders using other payment modes : main.ERROR: Braintree\Configuration::merchantId needs to be set (or accessToken needs to be passed to Braintree\Gateway)

Please check this comment for more details about the configuration.

Additional info (*)

I don't want to disable the modules, the merchant might want to configure and use Braintree in the future and should not need me to re-enable the modules to do so. The cart and checkout pages try to load the config for a disabled payment method, it makes little sense, if it's disabled I certainly don't have a token configured for it.


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 3 years ago

Hi @victortodoran. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 3 years ago

Hi @engcom-November. 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-November commented 3 years ago

Verified the issue on Magento 2.4-develop branch and the issue is reproducible: Steps performed: Installed Brain-tree module on 2.4-develop branch Admin -> Stores -> Configuration -> Sales -> Payment methods -> Configure Brain-tree payment. Note: Set Debug mode to Yes Front-end -> Add a product to cart -> Checkout -> Make Brain-tree Payment - No Issue. User is able to place Order Now disable Brain-tree payment option from Admin (Remove brain-tree configuration from Admin - Stores - Configuration - Sales - Payment Methods) Cache flush and clear cache Navigate to Front-end - Add a product to Cart - Checkout - Make Payment using PayPal Express Checkout - User is able to place Order. Issue: MagentoRoot Folder/var/log/system.log -> Below Error message is gettting printed in system.log after placing orders using other payment modes : main.ERROR: Braintree\Configuration::merchantId needs to be set (or accessToken needs to be passed to Braintree\Gateway). [] []

magento-engcom-team commented 3 years ago

:white_check_mark: Confirmed by @engcom-November Thank you for verifying the issue. Based on the provided information internal tickets MC-42923 were created

Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

engcom-Delta commented 2 days ago

Hi @victortodoran ,

Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop and the issue is not reproducible. Kindly refer the screenshots.

Steps to reproduce -

  1. Installed Brain-tree module on 2.4-develop branch
  2. Admin -> Stores -> Configuration -> Sales -> Payment methods -> Configure Brain-tree payment. Note: Set Debug mode to Yes
  3. Front-end -> Add a product to cart -> Checkout -> Make Brain-tree Payment - No Issue. User is able to place Order Now disable Brain-tree payment option from Admin (Remove brain-tree configuration from Admin - Stores - Configuration - Sales - Payment Methods)
  4. Cache flush and clear cache
  5. Navigate to Front-end - Add a product to Cart - Checkout - Make Payment using Check/Money order - User is able to place Order.
  6. MagentoRoot Folder/var/log/system.log -> Observe no log related to braintree image

Kindly recheck the issue on latest Magento 2.4-develop instance and Please let us know if you are still facing any issue. Thanks.