Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use Braintree Paypal without enabling Braintree Credit Card #35698

Open
1 of 5 tasks
nick-ose opened this issue Jun 29, 2022 · 7 comments
Open
1 of 5 tasks

Can't use Braintree Paypal without enabling Braintree Credit Card #35698

nick-ose opened this issue Jun 29, 2022 · 7 comments
Labels
Area: Payments Component: Braintree Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: dev in progress Reported on 2.4.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@nick-ose
Copy link

nick-ose commented Jun 29, 2022

Preconditions and environment

  • Magento version 2.4.4
  • Braintree PayPal enabled
  • Braintree Card Payments Disabled

Steps to reproduce

  1. Enable Braintree in Admin
  2. Set 'Enable Card Payments' to 'No'.
  3. Set 'Enable PayPal through Braintree' to 'Yes'
  4. Navigate to frontend
  5. Add product to cart
  6. Go to Checkout
  7. Select the BrainTree Paypal method

Expected result

PayPal method is selected and PayPal button appears

Actual result

Method is not selected, page loader is stuck and an error appears in the console.

adapter.js:66 Uncaught TypeError: Cannot read properties of undefined (reading 'clientToken')
at Object.getClientToken (adapter.js:66:66)
at Object.setup (adapter.js:181:23)
at UiClass.reInitPayPal (paypal.js:290:27)
at UiClass.onActiveChange (paypal.js:195:18)
at setNested (objects.js:44:25)
at Object.nested (objects.js:118:20)
....

Additional information

After some investigation it seems this is happening due to a change in the following class:

PayPal\Braintree\Model\Ui\ConfigProvider

public function getConfig(): array
{
if (!$this->config->isActive()) {
return [];
}

There is now a check that will return an empty array if the braintree credit card method is not active. This was not in older versions. This data maps to the frontend javascript settings of 'window.checkoutConfig.payment["braintree"]'

In the paypal method renderer it calls for the web/js/view/payment/adapter.js which expects there to be settings under the above 'payment["braintree"]' section. When it cannot find these settings it errors and cannot load.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Jun 29, 2022

Hi @nick-ose. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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:

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

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

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

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

@m2-assistant
Copy link

m2-assistant bot commented Jun 29, 2022

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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November
Copy link

Verified the issue on both 2.4.4 project-community-edition and Magento 2.4-develop branch and the issue is reproducible. Hence confirming this issue.
image

Thank you.

@engcom-November engcom-November added Component: Braintree Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Payments Reported on 2.4.4 Indicates original Magento version for the Issue report. Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jul 11, 2022
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Jul 11, 2022
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-5914 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Jul 11, 2022

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
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-November engcom-November added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jul 11, 2022
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Jul 11, 2022
@github-jira-sync-bot github-jira-sync-bot added Priority: P0 This generally occurs in cases when the entire functionality is blocked. Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. and removed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Priority: P0 This generally occurs in cases when the entire functionality is blocked. labels Feb 27, 2023
@yogesh-valiya
Copy link
Member

@magento I am working on this

@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog Mar 4, 2023
@yogesh-valiya
Copy link
Member

yogesh-valiya commented Mar 16, 2023

This duplicates - #35961
@engcom-Dash

@github-jira-sync-bot github-jira-sync-bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: ready for grooming labels Oct 10, 2023
@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog Oct 19, 2023
@m2-community-project m2-community-project bot removed the Progress: PR Created Indicates that Pull Request has been created to fix issue label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Payments Component: Braintree Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: dev in progress Reported on 2.4.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
High Priority Backlog
  
Dev In Progress
Development

No branches or pull requests

4 participants