Sha256: 9bb666dab694af32f30c3f628115f246be834371616bd03ab7d9b887da90b838

Contents?: true

Size: 1.42 KB

Versions: 1

Compression:

Stored size: 1.42 KB

Contents

- if Workarea::Affirm.enabled?
  .checkout-payment__primary-method
    - minimum = Workarea.config.affirm_minimum_order_value.to_m

    - if !current_order.affirm_available?
      .button-property
        .value= radio_button_tag nil, nil, false, disabled: true
        = label_tag nil, nil, class: 'button-property__name' do
          %span.payment-icon.payment-icon--affirm
          = t('workarea.storefront.affirm.disqualifying_items')

    - elsif current_order.total_price < minimum
      .button-property
        .value= radio_button_tag nil, nil, false, disabled: true
        = label_tag nil, nil, class: 'button-property__name' do
          %span.payment-icon.payment-icon--affirm
          = t('workarea.storefront.affirm.minimum_warning', amount: number_to_currency(minimum - current_order.total_price))

    - else
      .button-property
        .value= radio_button_tag 'payment', 'affirm', step.affirm?, data: { affirm_payment_trigger: '' }
        = label_tag 'payment[affirm]', nil, class: 'button-property__name' do
          %span.payment-icon.payment-icon--affirm
      %p.checkout-payment__primary-method-description
        %span.affirm-as-low-as.affirm-as-low-as--payment{ data: { amount: step.order.total_price.cents, affirm_type: 'text', learnmore_show: 'false'}}
      %p.checkout-payment__primary-method-edit
        %span= t('workarea.storefront.affirm.on_continue')

      = render 'workarea/storefront/checkouts/affirm_cart'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
workarea-affirm-1.0.0 app/views/workarea/storefront/checkouts/_affirm_payment.html.haml