Sha256: 6dddcfdcf4cdc40b777cc25214b65ad95ba7eb9cb52841670ca71da3c1e5c298
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
//= require solidus_paypal_braintree/paypal_button $(document).ready(function() { if (document.getElementById("empty-cart")) { $.when( $.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() { $('<script/>').attr({ 'data-merchant' : "braintree", 'data-id' : "paypal-button", 'data-button' : "checkout", 'data-color' : "blue", 'data-size' : "medium", 'data-shape' : "pill", 'data-button_type' : "button", 'data-button_disabled' : "true" }). load(function() { var paypalOptions = { flow: 'vault', enableShippingAddress: true } var button = new SolidusPaypalBraintree.createPaypalButton(document.querySelector("#paypal-button"), paypalOptions); return button.initialize(); }). insertAfter("#content"). attr('src', 'https://www.paypalobjects.com/api/button.js?') }); } });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_paypal_braintree-0.3.0 | app/assets/javascripts/spree/frontend/paypal_button.js |