添加后台代理代码
This commit is contained in:
38
codes/agent/game/api/payment/ipay/QueryContract.php
Normal file
38
codes/agent/game/api/payment/ipay/QueryContract.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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");
|
||||
/*
|
||||
* 此demo 代码 使用于 cp 通过主动查询方式 获取商品契约。
|
||||
* 请求地址见文档
|
||||
* 请求方式:post
|
||||
* 流程:cp服务端组装请求参数并对参数签名,以post方式提交请求并获得响应数据,处理得到的响应数据,调用验签函数对数据验签。
|
||||
* 请求参数及请求参数格式:transdata={"appid":"500000185","appuserid":"A100003A832D40"}&sign=VvT9gHqGjwuhj07/lbcErBo6b23tX1Z5f/aiBItCw5YlFZb6MQpg/NLc9SCA6qc+S6Pw+Jqe87QiiWpXhPf1fEIclLdu5vWmbFMvA4VMW+Il+6oTJFuJItjfIfhGhljEIrgqXO5ZrNs8mrbKBkJHjUtHv1jRFzFtCQZeMgwZr3U=&signtype=RSA
|
||||
* 以下实现 各项请求参数 处理代码:
|
||||
*
|
||||
* */
|
||||
|
||||
function ReqData() {
|
||||
global $querysubsUrl, $appkey, $platpkey;
|
||||
//数据现组装成:{"appid":"12313","logintoken":"aewrasera98seuta98e"}
|
||||
$contentdata["appid"]="3002495803";
|
||||
$contentdata["appuserid"]="55e37ac2c0dc98972475d640";
|
||||
//组装请求报文 格式:$reqData="transdata={"appid":"123","appuserid":"3213213"}&sign=xxxxxx&signtype=RSA"
|
||||
$reqData = composeReq($contentdata, $appkey);
|
||||
echo "reqData:$reqData\n";
|
||||
HttpPost($querysubsUrl,$reqData);
|
||||
|
||||
}
|
||||
|
||||
ReqData();
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user