RailsCasts Pro episodes are now free!

Learn more or hide this

railsfanatic's Profile

GitHub User: railsfanatic

Comments by

Avatar

This is an awesome tutorial!

Firefox does not seem to clear the credit card number fields before submitting (even though name: nil on each one) as I discovered CC #'s in my logfiles!

So I modified my orders.js.coffee as follows:

  handleStripeResponse: (status, response) ->
    if status == 200
      $('#order_stripe_card_token').val(response.id)
      # clear CC fields before submitting to Rails:
      $('#card_number,#card_code,#card_month,#card_year').val('')
      $('#new_order')[0].submit()