= simple_form_for(@payment, :as => :credit_card, :url => @config[:url]) do |f|
  - unless @payment.errors.empty?
    .validation-error
      %p There was a problem processing your payment details. See below for more detail.
      - unless @payment.errors.messages[:base].blank?
        - @payment.errors.messages[:base].each do |message|
          %p.message-detail= message

  - @config[:hidden_fields].each do |name, value|
    = hidden_field_tag(name, value)

  = f.input(:number, input_opts(:number, :label => 'Card number'))
  = f.input(:name, input_opts(:name))
  = f.input(:cvv, input_opts(:cvv, :label => 'Security code'))
  .inline-group
    = f.input(:expiration_month, select_opts(:expiration_month, 'Month', @months, :label => 'Expiry'))
    = f.input(:expiration_year, select_opts(:expiration_year, 'Year', @years, :label => '/'))

  .button-bar
    %button(type="submit") Place order & Pay
    
= simple_form_for(@payment, :as => :credit_card, :url => @config[:url]) do |f|
  - unless @payment.errors.empty?
    .validation-error
      %p There was a problem processing your payment details. See below for more detail.
      - unless @payment.errors.messages[:base].blank?
        - @payment.errors.messages[:base].each do |message|
          %p.message-detail= message

  - @config[:hidden_fields].each do |name, value|
    = hidden_field_tag(name, value)

  = f.input(:number, input_opts(:number, :label => 'Card number', :pattern => '[0-9]*', :type => 'tel'))
  = f.input(:name, input_opts(:name))
  = f.input(:cvv, input_opts(:cvv, :label => 'Security code', :pattern => '[0-9]*', :type => 'tel'))
  .inline-group
    = f.input(:expiration_month, select_opts(:expiration_month, 'Month', @months, :label => 'Expiry'))
    = f.input(:expiration_year, select_opts(:expiration_year, 'Year', @years, :label => '/'))

  .button-bar
    %button(type="submit") Place order & Pay
    
Use more appropriate field types in the checkout and payment form
Use more appropriate field types in the checkout and payment form
