Ejemplo n.º 1
0
 def doUserBind(cls, mo, rpath):
     if not AccountVerify.sing_verify(rpath) and False:
         mo.setResult('info', '验签失败')
         mo.setResult('code', -1)
         return
     rparams = TyContext.RunHttp.convertArgsToDict()
     snsId = rparams.get('snsId')
     snsId = AccountVerify.decode_item(snsId)
     prefix = snsId.split(':')[0]
     isOk = None
     try:
         method = snsv4_login_map.get(prefix)
         if not method:
             isOk = True
         else:
             isOk = method(rparams, snsId)
     except:
         isOk = False
     if not isOk:
         mo.setResult('info', '账号验证失败')
         mo.setResult('code', 1)
         return
     uid = AccountModel.get_uid_by_snsid(snsId)
     if uid and int(uid) > 0:
         mo.setResult('info', '用户已经绑定过其他途游账号了')
         mo.setResult('code', 3)
         return
     uid = rparams.get('userId')
     snsId = rparams.get('snsId')
     AccountModel.set_snsid_for_userid(uid, snsId)
     AccountModel.add_snsid_to_userbind_set(uid, snsId)
     AccountModel.set_user_info(uid, snsId=snsId)
     mo.setResult('info', '绑定成功')
     mo.setResult('code', 0)
Ejemplo n.º 2
0
 def check_param_mail(cls, rpath):
     mail = TyContext.RunHttp.getRequestParam('mail', '')
     mail = AccountVerify.decode_item(mail)
     mail = mail.strip().lower()
     if len(mail.split('@')) != 2:
         return True, cls.error_param_mail
     return False, mail
Ejemplo n.º 3
0
 def check_param_mobile(cls, rpath):
     mobile = TyContext.RunHttp.getRequestParam('mobile', '')
     mobile = AccountVerify.decode_item(mobile)
     try:
         mobile = int(mobile)
     except:
         pass
     if len(str(mobile)) != 11:
         return True, cls.error_param_mobile
     return False, mobile
Ejemplo n.º 4
0
 def check_param_password(cls, rpath, key='passwd', isSet=False):
     password = TyContext.RunHttp.getRequestParam(key, '')
     if password == '':  # hack - 没有创建密码问题 liubo
         return False, password
     password = AccountVerify.decode_item(password)
     if len(password) < 6:
         return True, cls.error_param_password
     if isSet and not re.match(r'^[A-Za-z0-9@#$%^&+=]{6,20}$', password):
         return True, cls.error_param_setpassword
     return False, password
Ejemplo n.º 5
0
    def doReportContacts(cls, rpath):
        isReturn, params = AccountCheck.normal_check(rpath)
        if isReturn:
            return params
        mo = TyContext.Cls_MsgPack()
        contacts = TyContext.RunHttp.getRequestParam('contacts', '')
        if contacts != '':
            contacts = AccountVerify.decode_item(contacts)

        TyContext.ftlog.info('doReportContacts appId=', params['appId'], 'userId=', params['userId'], 'contacts=',
                             contacts)
        mo.setResult('code', 0)
        mo.setResult('info', 'success')
        return mo
Ejemplo n.º 6
0
 def doSnsLogin(cls, rpath):
     # todo 验签
     mo = TyContext.Cls_MsgPack()
     rparams = TyContext.RunHttp.convertArgsToDict()
     rparams['snsId'] = AccountVerify.decode_item(rparams['snsId'])
     snsId = rparams.get('snsId')
     prefix = snsId.split(':')[0]
     isOk = None
     try:
         method = snsv4_login_map.get(prefix)
         if not method:
             isOk = True
         else:
             isOk = method(rparams, snsId)
     except:
         isOk = False
     if not isOk:
         mo.setResult('info', '三方登陆失败')
         mo.setResult('code', 1)
         return mo
     userId = AccountLogin.__find_userid_by_snsid__(snsId)
     is_create = False
     if userId <= 0:
         # 效验该deviceId是否存在第三方sns刷号嫌疑
         isFlag, retMsg = AccountLogin._check_deviceid_sns_forbidden(
             rparams)
         if isFlag:
             mo.setResult('code', AccountConst.CODE_USER_SNS_REG_FAILE)
             mo.setResult('info', retMsg)
             return mo
         rparams['passwd'] = 'ty' + str(random.randint(100000, 999999))
         if snsId.startswith('360'):
             rparams['lang'] = "zh_hans"
         is_create = True
         userId = AccountInfo.createNewUser(rparams,
                                            AccountConst.USER_TYPE_SNS,
                                            False)
         if userId <= 0:
             mo.setResult('code', AccountConst.CODE_USER_GUEST_REG_FAILE)
             mo.setResult('info', '用户账号建立失败')
             return mo
         appId = rparams['appId']
     else:
         rparams['userId'] = userId
         try:
             del rparams['name']
         except:
             pass
         AccountInfo.doSetUserInfo(rparams, mo, False)
     AccountLogin._do_check_login(rparams, userId, mo,
                                  AccountConst.USER_TYPE_SNS, is_create)
     # add to userBindSet
     snsId = rparams.get('snsId')
     AccountModel.add_snsid_to_userbind_set(userId, snsId)
     retMsg = TyContext.Cls_MsgPack()
     if mo.getErrorInfo():
         retMsg.setResult('info', mo.getErrorInfo())
         retMsg.setResult('code', mo.getErrorCode())
         return retMsg
     token = AccountModel.reset_user_token(userId, 'sns')
     retMsg.setResult('token', token)
     retMsg.setResult('code', 0)
     return retMsg
Ejemplo n.º 7
0
    def doBuyStraight(self, userId, params, mo, cardType=0):
        from tysdk import is_test_sdk_server
        if not is_test_sdk_server():
            yee_config = TyContext.Configure.get_global_item_json(
                'yee2_config', {})
            yee_channel = params['yeeChannel']
            yee_account = yee_config.get(str(yee_channel))[0]
            yee_calltag = yee_config.get(str(yee_channel))[1]
            if yee_channel == 'shediao':
                cardType = 3
            if yee_account:
                self.YEE_ACCOUNT = yee_account
                self.CALLBACK_TAG = yee_calltag
            else:
                raise Exception(
                    'can not find yee2 account info define of yee_channel=' +
                    str(yee_channel))
        from tysdk.entity.user_common.verify import AccountVerify

        self.requestSqh += 1
        error = ''
        orderPrice = int(params['orderPrice']) * 100
        platformOrderId = params['orderPlatformId'] + '-' + str(
            self.requestSqh)
        imei = TyContext.RunHttp.getRequestParam('imei', '').strip()
        if len(imei) > 0:
            imei = 'IMEI:' + AccountVerify.decode_item(imei)

        mac = TyContext.RunHttp.getRequestParam('mac', '')
        if len(mac) > 0:
            mac = 'MAC:' + AccountVerify.decode_item(mac)

        if len(imei) > 0:
            other = imei
        elif len(mac) > 0:
            other = mac
        else:
            error = 'params of MAC or IMEI is missing'

        userip = TyContext.RunHttp.getRequestParam('ip', '').strip()
        if len(userip) == 0:
            error = 'params of IP Address is missing'

        userua = TyContext.RunHttp.getRequestParam('user_agent', '').strip()
        if len(userua) == 0:
            error = 'params of User Agent is missing'
        userua = AccountVerify.decode_item(userua)
        if len(userua) == 0:
            error = 'params of User Agent decode error '

        if len(error) > 0:
            mo.setError('code', 1)
            mo.setError('info', error)
            return
        domain = PayHelper.getSdkDomain()
        pname = u'途游-' + unicode(params['orderName'])
        mesdata = {
            'merchantaccount':
            self.YEE_ACCOUNT,  # 商户账户编号  √  string
            'orderid':
            platformOrderId,  # 客户订单号  √  string  商户生成的唯一订单号,最长50位
            'transtime':
            int(time.time()),  # 交易时间  √  int  时间戳,例如:1361324896,精确到秒
            'currency':
            156,  # 交易币种   int  默认156人民币(当前仅支持人民币)
            'amount':
            orderPrice,  # 交易金额  √  int  以"分"为单位的整型,必须大于零
            'productcatalog':
            '1',  # 商品类别码  √  string  详见商品类别码表   1  虚拟产品
            'productname':
            pname,  # 商品名称  √  string  最长50位,出于风控考虑,请按下面的格式传递值:应用-商品名称
            'productdesc':
            '',
            'identityid':
            str(userId),  # 用户标识  √  string  最长50位,商户生成的用户账号唯一标识
            'identitytype':
            2,  # 用户标识类型  √  int 2  用户ID  用户编号
            'other':
            other,  # 终端硬件标识  √  string  最长50位,手机传IMEI(格式为IMEI:447769804451095),
            'userip':
            userip,  # 用户IP  √  string  用户支付时使用的网络终端IP
            'userua':
            userua,  # 终端UA  √  string  用户使用的移动终端的UA信息
            'callbackurl':
            domain + '/v1/pay/yee2/callback' + str(self.CALLBACK_TAG),
            'fcallbackurl':
            domain + '/v1/pay/yee2/callback' + str(self.CALLBACK_TAG + 1),
        }
        TyContext.ftlog.debug('TuYouPayYee2.doBuyStraight ', imei, mac,
                              'mesdata=', mesdata)
        yeeurl = self.__make_request_url__(cardType, mesdata)
        payData = {'openurl': yeeurl}
        params['payData'] = payData
        mo.setResult('payData', payData)
        pass
Ejemplo n.º 8
0
    def check_userv4(cls, rpath):
        # cls.__init_checker__()

        if not AccountVerify.sing_verify(rpath):
            return True, cls.error_sing

        params = TyContext.RunHttp.convertArgsToDict()
        # 检查登录参数
        appId = TyContext.RunHttp.getRequestParamInt('appId', 0)
        if appId <= 0:
            return True, cls.error_param_appid
        params['appId'] = appId

        userId = TyContext.RunHttp.getRequestParamInt('userId', 0)
        params['userId'] = userId

        # bindOrderId = TyContext.RunHttp.getRequestParam('bindOrderId')
        # if bindOrderId is not None:
        #    params['bindOrderId'] = bindOrderId

        params['loginFlag'] = TyContext.RunHttp.getRequestParamInt(
            'loginFlag', 0)
        clientId = TyContext.RunHttp.getRequestParam('clientId', '')
        try:
            datas = clientId.split('_')
            clientSystem = datas[0]
            clientVersion = TyContext.ClientUtils.getVersionFromClientId(
                clientId)
            clientChannel = datas[2]
        except:
            return True, cls.error_param_clientid

        params['clientId'] = clientId
        params['clientSystem'] = clientSystem
        params['clientVersion'] = clientVersion
        params['clientChannel'] = clientChannel

        imei = TyContext.RunHttp.getRequestParam('imei', '')
        #         TyContext.ftlog.debug('imei=', imei)
        imei = AccountVerify.decode_item(imei)
        #         TyContext.ftlog.debug('imei=', imei)
        if len(imei) < 12 or len(imei) > 32:
            imei = ''
        # TyContext.ftlog.debug('imei=', imei)

        imsi = TyContext.RunHttp.getRequestParam('imsi', '')
        #         TyContext.ftlog.debug('imsi=', imsi)
        imsi = AccountVerify.decode_item(imsi)
        #         TyContext.ftlog.debug('imsi=', imei)
        if len(imsi) == 0 or len(imsi) > 15:
            imsi = ''
        # TyContext.ftlog.debug('imsi=', imsi)

        androidId = TyContext.RunHttp.getRequestParam('androidId', '')
        #         TyContext.ftlog.debug('androidId=', androidId)
        androidId = AccountVerify.decode_item(androidId)
        #         TyContext.ftlog.debug('androidId=', androidId)
        if len(androidId) < 12 or len(androidId) > 32:
            androidId = ''
        # TyContext.ftlog.debug('androidId=', androidId)
        idfa = AccountVerify.decode_item(
            TyContext.RunHttp.getRequestParam('idfa', ''))
        params['idfa'] = idfa
        mac = TyContext.RunHttp.getRequestParam('mac', '')
        #         TyContext.ftlog.debug('mac=', mac)
        mac = AccountVerify.decode_item(mac)
        #         TyContext.ftlog.debug('mac=', mac)

        # 获取不到时,mac可能为00:00:00:00:00:00或02:00:00:00:00:00
        # 下面的判断似有问题,但不能改,否则用户下次登录会生成不同的deviceId
        # 而丢失老账户
        mac = mac.replace(':', '')
        badmacs_an = TyContext.Configure.get_global_item_json(
            'badmacs_android', ['000000000000'])
        badmacs_ios = TyContext.Configure.get_global_item_json(
            'badmacs_ios', ['020000000000'])
        if mac in badmacs_ios:  # 如果IOS的mac取不到或者变化020000000000,那么需要加到badmacs_ios集合中
            params['macmd5'] = ''
        else:
            if mac != "" and mac not in badmacs_an:  # 如果安卓的mac取值出现问题,那么需要将错误值加入badmacs_an
                mac = mac.replace(':', '')
                if len(mac) != 12:
                    TyContext.ftlog.info('the mac is error ! [', mac, ']')
                    mac = ''
            else:
                TyContext.ftlog.info('the mac is error ! [', mac, ']')
                mac = ''
                #         TyContext.ftlog.debug('mac=', mac)

        uuid = TyContext.RunHttp.getRequestParam('uuid', '')
        #         TyContext.ftlog.debug('uuid=', uuid)
        if len(uuid) != 32:
            uuid = ''

        if mac in badmacs_ios:
            uuid = uuid.lower()

        id_str = mac + '|' + imei + '|' + androidId + '|' + uuid
        TyContext.ftlog.info('deviceId str=', id_str)
        _devid = AccountVerify.md5(id_str)
        params['deviceId'] = _devid
        TyContext.ftlog.debug('after check user params-->', params)
        return False, params
Ejemplo n.º 9
0
    def login_check(cls, rpath, loginType):

        # cls.__init_checker__()

        # 输入参数校验
        if AccountVerify.sing_verify(rpath) != True:
            return True, cls.error_sing

        # 检查是否可以登录
        loginForbid = TyContext.ServerControl.checkLoginForbid(rpath)
        if loginForbid != False:
            return True, loginForbid

        params = TyContext.RunHttp.convertArgsToDict()
        # params = {}
        # 检查登录参数
        appId = TyContext.RunHttp.getRequestParamInt('appId', 0)
        if appId <= 0:
            return True, cls.error_param_appid
        params['appId'] = appId

        clientId = TyContext.RunHttp.getRequestParam('clientId', '')
        try:
            datas = clientId.split('_')
            clientSystem = datas[0]
            clientVersion = TyContext.ClientUtils.getVersionFromClientId(
                clientId)
            clientChannel = datas[2]
        except:
            return True, cls.error_param_clientid

        check_clientid_number = TyContext.Configure.get_global_item_int(
            'check_clientid_num_before_login', 0)
        if appId < 10000 and check_clientid_number:
            if not TyContext.BiUtils.clientIdToNumber(appId, clientId):
                return True, cls.error_param_clientid

        params['clientId'] = clientId
        params['clientSystem'] = clientSystem
        params['clientVersion'] = clientVersion
        params['clientChannel'] = clientChannel

        imei = TyContext.RunHttp.getRequestParam('imei', '')
        #         TyContext.ftlog.debug('imei=', imei)
        imei = AccountVerify.decode_item(imei)
        #         TyContext.ftlog.debug('imei=', imei)
        if len(imei) < 12 or len(imei) > 32:
            imei = ''
        #         TyContext.ftlog.debug('imei=', imei)

        imsi = TyContext.RunHttp.getRequestParam('imsi', '')
        #         TyContext.ftlog.debug('imsi=', imsi)
        imsi = AccountVerify.decode_item(imsi)
        #         TyContext.ftlog.debug('imsi=', imei)
        if len(imsi) == 0 or len(imsi) > 15:
            imsi = ''
        #        TyContext.ftlog.debug('imsi=', imsi)

        androidId = TyContext.RunHttp.getRequestParam('androidId', '')
        #         TyContext.ftlog.debug('androidId=', androidId)
        androidId = AccountVerify.decode_item(androidId)
        #         TyContext.ftlog.debug('androidId=', androidId)
        if len(androidId) < 12 or len(androidId) > 32:
            androidId = ''
        #         TyContext.ftlog.debug('androidId=', androidId)

        idfa = AccountVerify.decode_item(
            TyContext.RunHttp.getRequestParam('idfa', ''))
        params['idfa'] = idfa
        TyContext.ftlog.debug('idfa=', idfa)

        mac = TyContext.RunHttp.getRequestParam('mac', '')
        #         TyContext.ftlog.debug('mac=', mac)
        mac = AccountVerify.decode_item(mac)
        #         TyContext.ftlog.debug('mac=', mac)

        params['macmd5'] = AccountVerify.md5(mac)

        # 获取不到时,mac可能为00:00:00:00:00:00或02:00:00:00:00:00
        # 下面的判断似有问题,但不能改,否则用户下次登录会生成不同的deviceId
        # 而丢失老账户
        mac = mac.replace(':', '')
        badmacs_an = TyContext.Configure.get_global_item_json(
            'badmacs_android', ['000000000000'])
        badmacs_ios = TyContext.Configure.get_global_item_json(
            'badmacs_ios', ['020000000000'])
        if mac in badmacs_ios:  # 如果IOS的mac取不到或者变化020000000000,那么需要加到badmacs_ios集合中
            params['macmd5'] = ''
        else:
            if mac != "" and mac not in badmacs_an:  # 如果安卓的mac取值出现问题,那么需要将错误值加入badmacs_an
                mac = mac.replace(':', '')
                if len(mac) != 12:
                    TyContext.ftlog.info('the mac is error ! [', mac, ']')
                    mac = ''
            else:
                TyContext.ftlog.info('the mac is error ! [', mac, ']')
                mac = ''
            #         TyContext.ftlog.debug('mac=', mac)

        uuid = TyContext.RunHttp.getRequestParam('uuid', '')
        #         TyContext.ftlog.debug('uuid=', uuid)
        if len(uuid) != 32:
            uuid = ''

        if mac in badmacs_ios:
            uuid = uuid.lower()

        svninfo = TyContext.RunHttp.getRequestParam('svninfo', '')
        if svninfo:
            params['svninfo'] = svninfo

        iccid = TyContext.RunHttp.getRequestParam('iccid', '')
        TyContext.ftlog.debug('paramiccid=', iccid)
        iccid = AccountVerify.decode_item(iccid)
        TyContext.ftlog.debug('iccid=', iccid)

        params['mac'] = mac
        if is_valid_iccid(iccid):
            params['iccid'] = iccid
        else:
            try:
                del params['iccid']
            except:
                pass
        # params['macmd5'] = AccountVerify.md5(mac)
        params['imei'] = imei
        params['imsi'] = imsi
        params['androidId'] = androidId
        params['uuid'] = uuid
        id_str = mac + '|' + imei + '|' + androidId + '|' + uuid
        TyContext.ftlog.info('deviceId str=', id_str)
        _devid = AccountVerify.md5(id_str)
        params['deviceId'] = _devid
        TyContext.ftlog.debug('login_check mac', mac, 'imei', imei,
                              'androidId', androidId, 'uuid', uuid,
                              'calculated deviceId', _devid)
        params['phoneType'] = TyContext.RunHttp.getRequestParam(
            'phoneType', '')
        params['detect_phonenumber'] = TyContext.RunHttp.getRequestParam(
            'detect_phonenumber', '')
        params['lang'] = TyContext.RunHttp.getRequestParam('lang', '')
        password = None

        if loginType == 1:
            '''
            游客登录
            '''
            password = None
            if len(mac) + len(imei) + len(androidId) + len(uuid) == 0:
                return True, cls.error_param_device
            params['deviceName'] = TyContext.RunHttp.getRequestParam(
                'deviceName', '')

        elif loginType == 2:
            '''
            手机号登录
            '''
            isReturn, mobile = cls.check_param_mobile(rpath)
            if isReturn:
                return True, mobile
            params['mobile'] = mobile

            password = 1
        elif loginType == 3:
            '''
            tuyooid登录
            '''
            tuyooId = TyContext.RunHttp.getRequestParam('tuyooId', '')
            tuyooId = AccountVerify.decode_item(tuyooId)
            try:
                tuyooId = int(tuyooId)
            except:
                pass
            if tuyooId <= 10000:
                return True, cls.error_param_tuyooid
            params['tuyooId'] = tuyooId

            password = 1
        elif loginType == 4:
            '''
            邮箱登录
            '''
            isReturn, mail = cls.check_param_mail(rpath)
            if isReturn:
                return True, mail
            params['mail'] = mail

            password = 1
        elif loginType == 5:
            '''
            snsid登录
            '''
            isReturn, snsId = cls.check_param_snsid(rpath)
            if isReturn:
                return True, snsId
            params['snsId'] = snsId
            params['snsToken'] = TyContext.RunHttp.getRequestParam('snsToken')
            params['snsAppId'] = TyContext.RunHttp.getRequestParam('snsAppId')

            password = None
        elif loginType == 6:
            '''
            Account登录
            '''
            isReturn, account = cls.check_param_account(rpath)
            if isReturn:
                return True, account
            params['account'] = account

            password = 1
        elif loginType == 7:
            '''
            新建账户
            '''
            pass

        if password != None:
            isReturn, passwd = cls.check_param_password(rpath)
            if isReturn:
                return True, passwd
            params['passwd'] = passwd

        return False, params
Ejemplo n.º 10
0
 def check_param_account(cls, rpath):
     account = TyContext.RunHttp.getRequestParam('account', '')
     account = AccountVerify.decode_item(account)
     if len(account) <= 0 or len(account) > 32:
         return True, cls.error_param_account
     return False, account
Ejemplo n.º 11
0
 def check_param_snsid(cls, rpath):
     snsId = TyContext.RunHttp.getRequestParam('snsId', '')
     snsId = AccountVerify.decode_item(snsId)
     if len(snsId.split(':')) != 2:
         return True, cls.error_param_snsid
     return False, snsId
Ejemplo n.º 12
0
    def __do_request(self, chargeInfo, mo, cardType=0):
        from tysdk.entity.user_common.verify import AccountVerify
        userId = chargeInfo['uid']
        self.requestSqh += 1
        error = ''
        orderPrice = chargeInfo['chargeTotal'] * 100
        platformOrderId = chargeInfo['platformOrderId'] + '-' + str(
            self.requestSqh)
        imei = TyContext.RunHttp.getRequestParam('imei', '').strip()
        if len(imei) > 0:
            imei = 'IMEI:' + AccountVerify.decode_item(imei)

        mac = TyContext.RunHttp.getRequestParam('mac', '')
        if len(mac) > 0:
            mac = 'MAC:' + AccountVerify.decode_item(mac)

        if len(imei) > 0:
            other = imei
        elif len(mac) > 0:
            other = mac
        else:
            error = 'params of MAC or IMEI is missing'

        userip = TyContext.RunHttp.getRequestParam('ip', '').strip()
        if len(userip) == 0:
            error = 'params of IP Address is missing'

        userua = TyContext.RunHttp.getRequestParam('user_agent', '').strip()
        if len(userua) == 0:
            error = 'params of User Agent is missing'
        userua = AccountVerify.decode_item(userua)
        if len(userua) == 0:
            error = 'params of User Agent decode error '

        if len(error) > 0:
            mo.setError('code', 1)
            mo.setError('info', error)
            return PayConst.CHARGE_STATE_ERROR_REQUEST
        domain = PayHelper.getSdkDomain()
        pname = u'途游-' + unicode(chargeInfo['diamondName'])
        mesdata = {
            'merchantaccount':
            self.YEE_ACCOUNT,  # 商户账户编号  √  string
            'orderid':
            platformOrderId,  # 客户订单号  √  string  商户生成的唯一订单号,最长50位
            'transtime':
            int(time.time()),  # 交易时间  √  int  时间戳,例如:1361324896,精确到秒
            'currency':
            156,  # 交易币种   int  默认156人民币(当前仅支持人民币)
            'amount':
            int(orderPrice),  # 交易金额  √  int  以"分"为单位的整型,必须大于零
            'productcatalog':
            '1',  # 商品类别码  √  string  详见商品类别码表   1  虚拟产品
            'productname':
            pname,  # 商品名称  √  string  最长50位,出于风控考虑,请按下面的格式传递值:应用-商品名称
            'productdesc':
            '',
            'identityid':
            str(userId),  # 用户标识  √  string  最长50位,商户生成的用户账号唯一标识
            'identitytype':
            2,  # 用户标识类型  √  int 2  用户ID  用户编号
            'other':
            other,  # 终端硬件标识  √  string  最长50位,手机传IMEI(格式为IMEI:447769804451095),
            'userip':
            userip,  # 用户IP  √  string  用户支付时使用的网络终端IP
            'userua':
            userua,  # 终端UA  √  string  用户使用的移动终端的UA信息
            'callbackurl':
            domain + '/v1/pay/yee2/callback' + str(self.CALLBACK_TAG),
            'fcallbackurl':
            domain + '/v1/pay/yee2/callback' + str(self.CALLBACK_TAG + 1),
        }
        TyContext.ftlog.debug('TuYouPayYee2.__do_request', imei, mac,
                              'mesdata=', mesdata)
        yeeurl = self.__make_request_url__(cardType, mesdata)
        payData = {'openurl': yeeurl}
        mo.setResult('payData', payData)
        return PayConst.CHARGE_STATE_REQUEST