Sha256: bfa08cd94bf4c4d94f27907e2058c0b9a7f0c968753537e1e8eae5ed6fec1356

Contents?: true

Size: 1.79 KB

Versions: 8

Compression:

Stored size: 1.79 KB

Contents

= form_tag(EffectiveOrders.moneris[:hpp_url], :method => 'post') do
  = hidden_field_tag(:ps_store_id, EffectiveOrders.moneris[:ps_store_id])
  = hidden_field_tag(:hpp_key, EffectiveOrders.moneris[:hpp_key])
  = hidden_field_tag(:lang, 'en-ca')
  = hidden_field_tag(:rvar_authenticity_token, form_authenticity_token)

  - if purchased_redirect_url.present?
    = hidden_field_tag(:rvar_purchased_redirect_url, purchased_redirect_url)

  - if declined_redirect_url.present?
    = hidden_field_tag(:rvar_declined_redirect_url, declined_redirect_url)

  = hidden_field_tag(:email, order.user.try(:email))
  = hidden_field_tag(:cust_id, order.user.to_param)

  = hidden_field_tag(:order_id, [order.to_param, order.billing_name.try(:parameterize).presence].compact.join('-'))
  = hidden_field_tag(:gst, '%.2f' % (order.tax / 100.0))
  = hidden_field_tag(:charge_total, '%.2f' % (order.total / 100.0))

  - order.order_items.each_with_index do |item, x|
    = hidden_field_tag("id#{x}", x)
    = hidden_field_tag("description#{x}", item.title)
    = hidden_field_tag("quantity#{x}", item.quantity)
    = hidden_field_tag("price#{x}", '%.2f' % (item.price / 100.0))
    = hidden_field_tag("subtotal#{x}", '%.2f' % (item.subtotal / 100.0))

  - if order.billing_address.present?
    - address = order.billing_address
    = hidden_field_tag(:bill_first_name, address.first_name)
    = hidden_field_tag(:bill_last_name, address.last_name)
    = hidden_field_tag(:bill_address_one, address.address1)
    = hidden_field_tag(:bill_city, address.city)
    = hidden_field_tag(:bill_state_or_province, address.state)
    = hidden_field_tag(:bill_postal_code, address.postal_code)
    = hidden_field_tag(:bill_country, address.country)

  = submit_tag 'Pay with Moneris', :class => 'btn btn-primary', :data => {'disable_with' => 'Continuing...' }

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
effective_orders-1.5.1 app/views/effective/orders/moneris/_form.html.haml
effective_orders-1.5.0 app/views/effective/orders/moneris/_form.html.haml
effective_orders-1.4.8 app/views/effective/orders/moneris/_form.html.haml
effective_orders-1.4.7 app/views/effective/orders/moneris/_form.html.haml
effective_orders-1.4.6 app/views/effective/orders/moneris/_form.html.haml
effective_orders-1.4.5 app/views/effective/orders/moneris/_form.html.haml
effective_orders-1.4.4 app/views/effective/orders/moneris/_form.html.haml
effective_orders-1.4.3 app/views/effective/orders/moneris/_form.html.haml