     { JVM } = KD.remote.api
 
     { plan, pack } = productData
-      
+
+    payment = KD.getSingleton 'paymentController'
+
     if paymentMethod and not subscription
 
-      return plan.subscribe paymentMethod.paymentMethodId, (err, subscription) =>
+      plan.subscribe paymentMethod.paymentMethodId, (err, subscription) =>
         return  if KD.showError err
 
         @provisionVm { subscription, productData }
 
-    subscription.debit pack, (err, nonce) =>
+      return
+
+    payment.debitSubscription subscription, pack, (err, nonce) =>
       return  if KD.showError err
 
       JVM.createVmByNonce nonce, (err, vm) =>

    # fix this one on radios value cannot have some chars and that's why i keep index as the value
    descriptions = plans.map (plan) -> plan.description
    hostTypes    = plans.map (plan, i)->
      title       : plan.description.title
      value       : i
      feeAmount  : (plan.feeAmount / 100).toFixed 0

    { descriptions, hostTypes }

  reinitialize:(vm, callback)->
    @_runWrapper 'vm.reinitialize', vm, callback

  fetchVmInfo: (vm, callback) ->
    { JVM } = KD.remote.api

    JVM.fetchVmInfo vm, callback

  confirmVmDeletion: (vmInfo, callback = (->)) ->
    { hostnameAlias } = vmInfo
    
    vmPrefix = (@parseAlias hostnameAlias)?.prefix or hostnameAlias

    modal = new VmDangerModalView
      name     : vmInfo.hostnameAlias
      title    : "Destroy '#{hostnameAlias}'"
      action   : "Destroy my VM"
      callback : =>
        @deleteVmByHostname hostnameAlias, callback
        new KDNotificationView title:'Successfully destroyed!'
        modal.destroy()
    , vmPrefix

  deleteVmByHostname: (hostnameAlias, callback) ->
    { JVM } = KD.remote.api

    JVM.removeByHostname hostnameAlias, (err)->
      return callback err  if err

      KD.getSingleton("finderController").unmountVm hostnameAlias
      KD.getSingleton("vmController").emit 'VMListChanged'
      callback null

  remove: (vm, callback=noop)->
    @fetchVmInfo vm, (err, vmInfo)=>
      return  if KD.showError err

      if vmInfo

        if vmInfo.underMaintenance is yes
          message = "Your VM is under maintenance, not allowed to delete."
          new KDNotificationView title: message
          callback { message }

        else if vmInfo.planCode is 'free'
          @confirmVmDeletion vmInfo

        else
          @confirmVmDeletion vmInfo, -> debugger

      else
        new KDNotificationView title: 'Failed to remove!'
        callback { message: "No such VM!" }

  info:(vm, callback)->
    [callback, vm] = [vm, callback]  if 'function' is typeof vm
