Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion community-patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,18 @@
}
}
}
},
"magento/magento2/40622": {
"categories": [
"Payments"
],
"title": "PayPal Braintree: avoid INSTANTIATION_OPTION_REQUIRED when clientToken is missing (cart PayPal button JS). Author: @Genaker. See magento/magento2#40622.",
"packages": {
"magento/magento2-base": {
"2.4.8": {
"file": "community/magento_magento2_40622_braintree_paypal_button.patch"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/vendor/paypal/module-braintree-core/view/frontend/web/js/paypal/button.js 2026-03-24 00:04:41.716453736 -0700
+++ b/vendor/paypal/module-braintree-core/view/frontend/web/js/paypal/button.js 2026-03-24 00:04:41.736453720 -0700
@@ -180,6 +180,9 @@
* @param buttonConfig
*/
loadSDK: function (buttonConfig) {
+ if (!buttonConfig || !buttonConfig.clientToken) {
+ return;
+ }
// Load SDK
braintree.create({
authorization: buttonConfig.clientToken