<?php

require_once __DIR__ . '/../../main.php';                                 # 导入game utils
include_once __DIR__ . '/../mo/payResp.php';                                    # 导入通用返回值结构
include_once __DIR__ . '/../mo/payRequest.php';                              # 导入通用返回值结构
require_once __DIR__ . '/../mo/OrderNotice.php';                             # 导入通知数据接收模型

require_once __DIR__ . '/lib/HttpHelper.php';
require_once __DIR__ . '/lib/SignatureHelper.php';
//require_once __DIR__ . '/lib/Configuration.php';
//require_once __DIR__ . '/../tapdb/TapDBUtil.php';                               # tapdb上传
require_once __DIR__ . '/config_mi.php';                                        # 导入小米平台配置信息
/**
 * 验证登陆信息接口
 * @param type $userId
 * @param type $session
 */

function verifySession($userId, $session) {

    $params = array('appId' => config_mi::APP_ID, 'uid' => $userId, 'session' => $session);

    $signObj = new SignatureHelper();

    $signature = $signObj->sign($params, config_mi::SECRET_KEY);

    $params['signature'] = $signature;

    $request = new HttpHelper();
    $response = $request->get(config_mi::VERIFY_SESSION_URL, $params);

    //TODO: 后续业务逻辑处理
    echo $response;
}

/**
 * Description of login
 *
 * @author gwang
 */
class login {
    //put your code here
}
