   @initialize: =>
     traps = @allTraps()
     # load scripts
-    init = StoreXsolla.promiseInit()
-    centili = StoreCentili.promiseInit()
+    init = {
+      xsolla: StoreXsolla.promiseInit()
+      centili: StoreCentili.promiseInit()
+    }
+
     checkout = DeferrablePromise()
 
     $(StoreCheckout::CHECKOUT_SELECTOR).on 'click.checkout', ->


  @allTraps: ->
    traps = {}
    buttons = document.querySelectorAll('.js-store-checkout-button')
    for button in buttons
      traps[button.dataset.provider] = DeferrablePromise()

    $(buttons).on 'click.trap', (event) ->
      LoadingOverlay.showImmediate()

        checkout.reject(xhr: xhr)

    $(document.querySelectorAll('.js-store-checkout-button')).on 'click.xsolla', (event) ->
      promiseAll = (provider) ->
                     Promise.all([init[provider], traps[provider], checkout])

      provider = event.target.dataset.provider
      promise = switch provider
                when 'xsolla'
                  promiseAll(provider).then (values) ->
                    # FIXME: flickering when transitioning to widget
                    XPayStationWidget.open()
                    LoadingOverlay.hide()
                when 'centili'
                  promiseAll(provider).then (values) ->
                    LoadingOverlay.hide()
                    # fake a click for Centili
                    $('#c-mobile-payment-widget').click()
                else
                  Promise.resolve()

      promise.catch (error) ->
        LoadingOverlay.hide()
