Sha256: b0ac6968a69e9216b88f4ea277e75b4fb7c22700851c982fbe045ba77a0ece85
Contents?: true
Size: 1.78 KB
Versions: 4
Compression:
Stored size: 1.78 KB
Contents
<div id="paypal-button"></div> <div data-pp-message data-pp-placement="payment" data-pp-amount="<%= @order.total %>"></div> <script> var address = <%= sanitize SolidusBraintree::Address.new(current_order.ship_address).to_json %> var paypalOptions = { flow: '<%= SolidusBraintree::Gateway.first.preferred_paypal_flow %>', amount: '<%= current_order.total %>', currency: '<%= current_order.currency %>', enableShippingAddress: true, venmoFunding: <%= SolidusBraintree::Gateway.first.preferred_enable_venmo_funding %>, buyerCountry: '<%= SolidusBraintree::Gateway.first.preferred_force_buyer_country %>', shippingAddressOverride: address, shippingAddressEditable: false, environment: '<%= Rails.env.production? ? "production" : "sandbox" %>', locale: '<%= paypal_button_preference(:paypal_button_locale, store: current_store) %>', useDataCollector: <%= SolidusBraintree::Gateway.first.preferred_use_data_collector %>, style: { color: '<%= paypal_button_preference(:paypal_button_color, store: current_store) %>', shape: '<%= paypal_button_preference(:paypal_button_shape, store: current_store) %>', label: '<%= paypal_button_preference(:paypal_button_label, store: current_store) %>', layout: '<%= paypal_button_preference(:paypal_button_layout, store: current_store) %>', <% if paypal_button_preference(:paypal_button_layout, store: current_store) == "horizontal" %> tagline: '<%= paypal_button_preference(:paypal_button_tagline, store: current_store) %>', <% end %> messaging: '<%= paypal_button_preference(:paypal_button_messaging, store: current_store) %>' } } var button = new SolidusBraintree.createPaypalButton(document.querySelector("#paypal-button"), paypalOptions); button.initialize(); </script>
Version data entries
4 entries across 4 versions & 1 rubygems