Module: TrustPayRails::ViewHelpers

Defined in:
lib/trust_pay_rails/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#trust_pay_card_form(attributes = {}) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/trust_pay_rails/view_helpers.rb', line 13

def trust_pay_card_form(attributes={})
  form_tag TrustPayRails.card_transfer_url do
    form_elements = trust_pay_form_elements(attributes)
    form_elements << submit_tag('Pay with card')

    form_elements.join.html_safe
  end
end

#trust_pay_form(attributes = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/trust_pay_rails/view_helpers.rb', line 4

def trust_pay_form(attributes={})
  form_tag TrustPayRails.bank_transfer_url do
    form_elements = trust_pay_form_elements(attributes)
    form_elements << submit_tag('Pay with bank transfer')

    form_elements.join.html_safe
  end
end