Files
youlegames/codes/agent/game/api/payment/ipay/CheckLogin.php
2026-03-15 01:27:05 +08:00

34 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
header("Content-type: text/html; charset=utf-8");
/*
* Created on 2015-8-31
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/
require_once ("config.php");
require_once ("base.php");
/*
* 在客户端调用登陆接口,得到返回 logintoken 客户端把 logintoken 传给 服务端
* 服务端组装验证令牌的请求参数transdata={"appid":"123","logintoken":"3213213"}&sign=xxxxxx&signtype=RSA
* 请求地址:以文档给出的为准
*/
function ReqData() {
global $tokenCheckUrl, $appkey, $platpkey;
//数据现组装成:{"appid":"12313","logintoken":"aewrasera98seuta98e"}
$contentdata["appid"]="3003686553";
$contentdata["logintoken"]="55e37ac2c0dc98972475d640";//这个需要调登录接口时时获取。有效期10min
//组装请求报文 格式:$reqData="transdata={"appid":"123","logintoken":"3213213"}&sign=xxxxxx&signtype=RSA"
$reqData = composeReq($contentdata, $appkey);
echo "reqData:$reqData\n";
HttpPost($tokenCheckUrl,$reqData);
}
ReqData();
?>