Module: Rubykassa::ActionViewExtension
- Defined in:
- lib/rubykassa/action_view_extension.rb
Instance Method Summary collapse
Instance Method Details
#pay_url(phrase, invoice_id, total, options = {}, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/rubykassa/action_view_extension.rb', line 3 def pay_url(phrase, invoice_id, total, = {}, &block) total, invoice_id = total.to_s, invoice_id.to_s extra_params = .except :custom, :html custom_params = [:custom] ||= {} html_params = [:html] ||= {} url = Rubykassa.pay_url invoice_id, total, custom_params, extra_params if block_given? link_to phrase, url, html_params, &block else link_to phrase, url, html_params end end |