添加后台代理代码
This commit is contained in:
33
codes/agent/game/api/payment/ipay/CheckLogin.php
Normal file
33
codes/agent/game/api/payment/ipay/CheckLogin.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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();
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user