Module: Payr::PayrHelpers
- Defined in:
- lib/payr/controllers/payr_helpers.rb
Instance Method Summary collapse
Instance Method Details
#paybox_form(submit_name, opts = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/payr/controllers/payr_helpers.rb', line 10 def paybox_form submit_name, opts={} raise ArgumentError if opts.blank? ("<form id='payrForm' action='#{Payr::Client.new.select_url}' method='POST'>" + paybox_hidden_fields(opts) + "<input type='submit' value='#{submit_name}'>" + "</form>").html_safe end |
#paybox_hidden_fields(opts = {}) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/payr/controllers/payr_helpers.rb', line 3 def paybox_hidden_fields opts={} raise ArgumentError if opts.blank? opts.to_a.collect do |pair| hidden_field_tag pair[0].upcase, pair[1] end.join("").html_safe end |