Method: Paygate::Rails::FormHelper.paygate_open_pay_api_form
- Defined in:
- lib/paygate/rails/form_helper.rb
.paygate_open_pay_api_form(options = {}) ⇒ Object
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/paygate/rails/form_helper.rb', line 137 def paygate_open_pay_api_form( = {}) form_tag({}, name: 'PGIOForm') do fields = [] PAYGATE_FORM_TEXT_FIELDS.each do |key, opts| arg_opts = [key] || {} fields << text_field_tag( key, arg_opts[:value] || opts[:default], name: opts[:name] || key.to_s, placeholder: arg_opts[:placeholder] || opts[:placeholder] ).html_safe end fields.join.html_safe end.html_safe end |