Sha256: 732b11728c97c7158e3d986fd19d7a830e3bdbcae7165c08e9943c6e553287da

Contents?: true

Size: 1.11 KB

Versions: 5

Compression:

Stored size: 1.11 KB

Contents

= javascript_include_tag 'https://js.stripe.com/v3/'

- stripe = stripe_payment_intent(order)

.card
  .card-body
    %h3= order_checkout_label(:stripe)
    %p
      %em This checkout is powered by stripe.

    .my-4.text-center
      = link_to(image_tag('effective_orders/stripe.png'), 'https://www.stripe.com', target: '_blank')

    = effective_form_with(scope: :stripe, url: effective_orders.stripe_order_path(order), data: { 'stripe-form': stripe.to_json }) do |f|
      = f.hidden_field :purchased_url, value: purchased_url
      = f.hidden_field :declined_url, value: declined_url

      -# This is set by the stripe.js javascript
      = f.hidden_field :payment_intent_id

      - if stripe[:token_required]
        %p Please enter your credit card information.
        = render('effective/orders/stripe/element')
      - else
        %p Your existing card <strong>#{stripe[:active_card]}</strong> will be charged.

        = collapse('Use this card instead...', class: 'update-stripe-payment-method') do
          = render('effective/orders/stripe/element')

      .mt-4
        = f.submit 'Pay Now', center: true, border: false

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
effective_orders-4.4.1 app/views/effective/orders/stripe/_form.html.haml
effective_orders-4.4.0 app/views/effective/orders/stripe/_form.html.haml
effective_orders-4.3.2 app/views/effective/orders/stripe/_form.html.haml
effective_orders-4.3.1 app/views/effective/orders/stripe/_form.html.haml
effective_orders-4.3.0 app/views/effective/orders/stripe/_form.html.haml