   generate: ->
     # Probably not on the correct page
     if @browserSupported()
-      @log("GESTPAY: iframe initialized")
+      @log("iframe initialized")
       @getToken()
     else
-      @log("GESTPAY: browser not supported")
+      @log("browser not supported")
 
   browserSupported: ->
     # This variable is set on window directly by the initialization script of

      dataType: "json"
    .done (response) =>
      token = response.token
      @log("GESTPAY: getToken success - #{token}")
      @createPaymentPage(token)
    .fail (response) =>
      json = $.parseJSON(response.responseText)
      @log("GESTPAY: getToken failure - #{json.error}")

  createPaymentPage: (token) ->
    GestPay.CreatePaymentPage(@merchant, token, @paymentPageLoaded)

    # Gestpay returns error codes as strings. Convert them to integers before
    # comparing them
    if parseInt(result.ErrorCode) == GESTPAY_NO_ERROR
      @log("iframe loaded!")
    else
      @log("error loading iframe: '#{result.ErrorDescription}'
      (#{result.ErrorCode})")

  log: (string) ->
    console.log && console.log("[gestpay][iframe]: #{string}")

$ ->
  $gestpay = $(".gestpay-data")
