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
Comments
Hi @nick-ose. Thank you for your report.
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:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 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 |
Hi @engcom-November. Thank you for working on this issue.
|
✅ Jira issue https://jira.corp.magento.com/browse/AC-5914 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
@magento I am working on this |
This duplicates - #35961 |
Preconditions and environment
Steps to reproduce
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
The text was updated successfully, but these errors were encountered: