module WebpayInterswitch::ViewHelper

Public Instance Methods

form_for_webpay(txn_ref, amount, cust_name, cust_id, html_options={}, optional_parameters={}) click to toggle source
# File lib/webpay_interswitch/view_helper.rb, line 4
def form_for_webpay(txn_ref, amount, cust_name, cust_id, html_options={}, optional_parameters={})
  form_builder = WebpayInterswitch::FormBuilder.new(txn_ref, amount, cust_name, cust_id, html_options, optional_parameters)
  WebpayInterswitch::Gateway.new.validate!
  form_builder.generate_webpay_form.html_safe if form_builder.valid?
end