     super
       fields                : fields
       callback              : (formData) =>
-        @emit 'PaymentInfoSubmitted', @getData()?.paymentMethodId, formData
+        @emit 'PaymentInfoSubmitted', @paymentMethodId, formData
       buttons               :
         Save                :
           title             : 'Save'

  handleCardKeyup: (event) -> @updateCardTypeDisplay()

  setPaymentInfo: (paymentMethod) ->
    @setData paymentMethod
    for own key, value of paymentMethod.billing
      switch key
        when 'state'

  getCardInputValue:->
    @inputs['cardNumber'].getValue().replace /-|\s/g, ''

  getCardType: (value = @getCardInputValue()) ->
    ###
    Visa:             start with a 4. New cards have 16 digits. Old cards have 13.
    MasterCard:       start with the numbers 51 through 55. All have 16 digits.
