Пример #1
0
    def confirm_order(self, userid, device_id, amount):
        data = {"userid": userid, "device_id": device_id}
        url = "http://" + ACCOUNT_BACKEND + "/user_info?" + urllib.urlencode(data)
        r = http_request(url)
        if r["rtn"] != 0:
            logger.error("get user_info failed! rtn:%d" % r["rtn"])
            return

        phone_num = r["phone_num"]
        if phone_num == "":
            return

        SMSCenter.instance().confirm_order_alipay(phone_num, amount)
    def confirm_order(self, userid, device_id, amount):
        data = {'userid': userid, 'device_id': device_id}
        url = 'http://' + ACCOUNT_BACKEND + '/user_info?' + urllib.urlencode(data)
        r = http_request(url)
        if r['rtn'] != 0:
            logger.error('get user_info failed! rtn:%d' %r['rtn'])
            return

        phone_num = r['phone_num']
        if phone_num == '':
            return

        SMSCenter.instance().confirm_order_phone_charge(phone_num, amount)
Пример #3
0
    def confirm_order(self, userid, device_id, amount):
        data = {'userid': userid, 'device_id': device_id}
        url = 'http://' + ACCOUNT_BACKEND + '/user_info?' + urllib.urlencode(
            data)
        r = http_request(url)
        if r['rtn'] != 0:
            logger.error('get user_info failed! rtn:%d' % r['rtn'])
            return

        phone_num = r['phone_num']
        if phone_num == '':
            return

        SMSCenter.instance().confirm_order_alipay(phone_num, amount)
    def notify_exchange_code(self, userid, device_id, exchange_type, exchange_code):
        data = {'userid': userid, 'device_id': device_id}
        url = 'http://' + ACCOUNT_BACKEND + '/user_info?' + urllib.urlencode(data)
        r = http_request(url)
        if r['rtn'] != 0:
            logger.error('get user_info failed! rtn:%d' %r['rtn'])
            return

        phone_num = r['phone_num']
        if phone_num == '':
            return

        if exchange_type == 1:
            exchange_desc = '50元京东礼品卡'
        else:
            exchange_desc = '迅雷白金月卡'
            
        SMSCenter.instance().notify_exchange_code(phone_num, exchange_desc, exchange_code)
Пример #5
0
    def notify_exchange_code(self, userid, device_id, exchange_type,
                             exchange_code):
        data = {'userid': userid, 'device_id': device_id}
        url = 'http://' + ACCOUNT_BACKEND + '/user_info?' + urllib.urlencode(
            data)
        r = http_request(url)
        if r['rtn'] != 0:
            logger.error('get user_info failed! rtn:%d' % r['rtn'])
            return

        phone_num = r['phone_num']
        if phone_num == '':
            return

        if exchange_type == 1:
            exchange_desc = '50元京东礼品卡'
        else:
            exchange_desc = '迅雷白金月卡'

        SMSCenter.instance().notify_exchange_code(phone_num, exchange_desc,
                                                  exchange_code)