     new Promise (resolve, reject) ->
       $.get laroute.route('payments.xsolla.token')
       .done (data) ->
-        console.debug('token loaded')
         resolve(data)
       .fail (xhr, error) ->
         console.error xhr

    return unless document.querySelector('#js-xsolla-pay')
    button = document.querySelector('#js-xsolla-pay')

    # load scripts
    init = Promise.all([@loadXsollaToken(), @loadXsollaScript()])
    .then (values) =>
      console.debug('resolved all')
      token = values[0]
      options = @optionsWithToken(token)
      XPayStationWidget.init(options)

      script.async = true
      script.src = "https://static.xsolla.com/embed/paystation/1.0.7/widget.min.js"
      script.addEventListener 'load', ->
        # TODO: remove after testing
        Timeout.set 5000, ->
          resolve()
