                     currency: "RUB"
                 description:
                     value: "algoprog.ru"
-        console.log data
         try
             result = await download(url, undefined, {
                 json: data

            userId = data.user.id
            user = await User.findById(userId)
            if user
                res.status(204).send('')
            else
                res.status(400).json
                    error:
                        code: "INVALID_USER",
                        message: "Invalid user"
            return
        if data.notification_type == "refund"
            res.status(204).send('')
            return
        if data.notification_type != "payment"
            res.status(400).json
                error:
                    code: "INVALID_PARAMETER",
                    message: "Unsupported notification type"
            return
        success = true
        orderId = data.transaction.external_id
        amount = data.purchase.checkout.amount

            })
        catch e
            throw "Can't download xsolla api"
        res.json({token: result.token})

    app.post '/xsollaHook', bodyParser.raw({type: "*/*"}), wrap (req, res) ->
        hash = sha1(req.body.toString() + XSOLLA_SECRET_KEY)
        signature = req.get("Authorization")
        if signature != "Signature " + hash
            logger.error("xsollaHook: wrong hash")
            res.status(400).json
                error:
                    code: "INVALID_SIGNATURE",
