0
新的咖啡腳本,我不知道是什麼原因造成的。錯誤:解析第28行的錯誤:意外的'TERMINATOR'
$ ->
$('.subscription').hover (event) ->
$(this).toggleClass("hover")
jQuery ->
Stripe.setPublishableKey($('meta[name="stripe-key"]').attr('content'))
payment.setupForm()
payment =
setupForm: ->
$('#new_subscription').submit ->
$('input[type=submit]').attr('disabled', true)
payment.processCard()
false
processCard: ->
card =
number: $('#card_number').val()
cvc: $('#card_code').val()
expMonth: $('#card_month').val()
expYear: $('#card_year').val()
Stripe.createToken(card, payment.handleStripeResponse)
handleStripeResponse: (status, response) ->
if status == 200
alert(response.id)
else
alert(response.error.message)