From 71834d739d514c75bc3f2d566694b8dcd9d4df3b Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 17 Aug 2017 13:10:27 +0200 Subject: [PATCH] Update braintree client libs to v3.22.1 We use rather outdated (and even inconsistent) versions of Braintree JS libs. --- README.md | 2 +- .../spree/backend/solidus_paypal_braintree.js | 4 ++-- app/assets/javascripts/spree/frontend/paypal_button.js | 6 +++--- .../spree/checkout/payment/_paypal_braintree.html.erb | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1251d1f4..eb6af504 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ The following is a relatively bare-bones implementation to enable Apple Pay on t ```html <% if current_store.braintree_configuration.apple_pay? %> - + diff --git a/app/assets/javascripts/spree/backend/solidus_paypal_braintree.js b/app/assets/javascripts/spree/backend/solidus_paypal_braintree.js index 1854b3aa..12f4c99d 100644 --- a/app/assets/javascripts/spree/backend/solidus_paypal_braintree.js +++ b/app/assets/javascripts/spree/backend/solidus_paypal_braintree.js @@ -68,8 +68,8 @@ $(function() { if (!$paymentForm.length || !$hostedFields.length) { return; } $.when( - $.getScript("https://js.braintreegateway.com/web/3.9.0/js/client.min.js"), - $.getScript("https://js.braintreegateway.com/web/3.9.0/js/hosted-fields.min.js") + $.getScript("https://js.braintreegateway.com/web/3.22.1/js/client.min.js"), + $.getScript("https://js.braintreegateway.com/web/3.22.1/js/hosted-fields.min.js") ).done(function() { $hostedFields.each(function() { var $this = $(this), diff --git a/app/assets/javascripts/spree/frontend/paypal_button.js b/app/assets/javascripts/spree/frontend/paypal_button.js index 9605db93..3644b42e 100644 --- a/app/assets/javascripts/spree/frontend/paypal_button.js +++ b/app/assets/javascripts/spree/frontend/paypal_button.js @@ -3,9 +3,9 @@ $(document).ready(function() { if (document.getElementById("empty-cart")) { $.when( - $.getScript("https://js.braintreegateway.com/web/3.14.0/js/client.min.js"), - $.getScript("https://js.braintreegateway.com/web/3.14.0/js/paypal.min.js"), - $.getScript("https://js.braintreegateway.com/web/3.14.0/js/data-collector.min.js") + $.getScript("https://js.braintreegateway.com/web/3.22.1/js/client.min.js"), + $.getScript("https://js.braintreegateway.com/web/3.22.1/js/paypal.min.js"), + $.getScript("https://js.braintreegateway.com/web/3.22.1/js/data-collector.min.js") ).done(function() { $(' - + + <% if current_store.braintree_configuration.paypal? %> - + <% end %> <% if current_store.braintree_configuration.credit_card? %> - + <% end %> <% if current_store.braintree_configuration.apple_pay? %> - + <% end %> <%= javascript_include_tag "solidus_paypal_braintree/checkout" %>