Closed sergey-ctrl closed 3 years ago
Hi @sergey-ctrl. 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
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
: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
A month has passed, is there any information?
Do you have any updates on this, please?
@namluu @sergey-ctrl Like you I have been waiting for an update on this important problem, so I thought you might appreciate what I found.
We have encountered this problem in our live web store where we wish to use Braintree to process credit cards, and PayPal Express Checkout as another payment option, and specifically NOT using Braintree for PayPal.
I found that when PayPal Express and Braintree Card Payments are both enabled, the window.paypal
version conflict / already defined error occurs.
I found that /vendor/paypal/module-braintree-core/view/frontend/web/js/view/payment/adapter.js
specifies https://www.paypalobjects.com/api/checkout.js
as a RequireJS dependency, therefore this remote file is fetched and executed regardless of whether or not "Enable PayPal through Braintree" is set to "YES" in Braintree system configuration (therefore, it is needless overhead as Braintree CC processing does not require PayPal SDK). As you will see by viewing that file, it is responsible for assigning window.paypal
and specifies version 4.0.318
.
Continuing on with my investigation and findings, when PayPal Express Checkout is enabled as a Payment Method, vendor/magento/module-paypal/view/frontend/web/js/in-context/paypal-sdk.js
is loaded and retrieves the PayPal JS SDK from paypal.com/sdk/js?client-id=.....params
which loads the PayPal JS SDK at version 5.0.186
(at least at the time of writing)
As a means of proving my theory, I simply removed the https://www.paypalobjects.com/api/checkout.js
from /vendor/paypal/module-braintree-core/view/frontend/web/js/view/payment/adapter.js
, enabled PayPal Express Checkout, and proceeded to checkout. As I expected, version 5.0.186
of the PayPal JS SDK is successfully loaded and the Braintree Credit Card Form functions perfectly alongside the PayPal Express Checkout method.
There are various ways in which you can address this problem for your own store, so I'll defer that decision to you. I hope this information helps you make that decision!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!
AFAIK this issue has yet to be resolved and therefore should not be marked as stale.
https://drops.meetanshi.com/suokfl
I am Facing Same issue while using paypal braintree and paypal Express Checkout
Preconditions (*)
1.Magento ver. 2.4.0-beta2 2.Configure PayPal Express Checkout payment method https://i.imgur.com/PDenw9M.png 3.Configure Braintree Payments (by GENE Commerce), Enable PayPal through Braintree https://i.imgur.com/9qBDM3i.png
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.