Пример #1
0
def purchase_aiyingyong_done(request):
    try:
        char_id = int(request.POST["char_id"])
        goods_id = int(request.POST["goods_id"])
    except:
        return {"ret": 1}

    p = PurchaseActioinAiyingyong(char_id)
    p.send_reward(goods_id)

    return {"ret": 0}
Пример #2
0
def purchase_aiyingyong_done(request):
    try:
        char_id = int(request.POST['char_id'])
        goods_id = int(request.POST['goods_id'])
    except:
        return {'ret': 1}

    p = PurchaseActioinAiyingyong(char_id)
    p.send_reward(goods_id)

    return {'ret': 0}
Пример #3
0
def purchase_aiyingyong_done(request):
    try:
        char_id = int(request.POST['char_id'])
        goods_id = int(request.POST['goods_id'])
    except:
        return {'ret': 1}

    p = PurchaseActioinAiyingyong(char_id)
    p.send_reward(goods_id)

    return {'ret': 0}
Пример #4
0
def purchase_confirm(request):
    req = request._proto
    char_id = request._char_id

    platform = req.platform

    if platform == '91':
        p = PurchaseAction91(char_id)
        response = p.check_confirm()
    elif platform == 'aiyingyong':
        p = PurchaseActioinAiyingyong(char_id)
        response = p.check_confirm()
    elif platform == 'jodo' or platform == 'jodoplay':
        p = PurchaseActionJodoplay(char_id)
        response = p.check_confirm()
    else:
        raise SanguoException(
            errormsg.BAD_MESSAGE,
            char_id,
            "Purchase Confirm",
            "Unknown platform: {0}".format(platform)
        )

    return pack_msg(response)