This commit is contained in:
aozhiwei 2019-08-21 20:35:03 +08:00
parent a90a911321
commit e7418ee041
2 changed files with 25 additions and 4 deletions

View File

@ -50,8 +50,8 @@ class PayController {
public function aggregatePay()
{
if (!phpcommon\isValidSessionId(
$_REQUET['account_id'],
$_REQUET['session_id']
$_REQUEST['account_id'],
$_REQUEST['session_id']
)) {
echo json_encode(array(
'errcode' => 100,
@ -59,14 +59,34 @@ class PayController {
));
die();
}
$nowtime = time();
$openid = phpcommon\extractOpenId($_REQUEST['account_id']);
{
$ipos = strpos($_REQUEST['data'], '_');
$gameid = substr($_REQUEST['data'], 0, $ipos);
$rawdata = substr($_REQUEST['data'], $ipos + 1, strlen($_REQUEST['data']) - $ipos);
$rawdata = base64_decode($rawdata);
$iv = '1dd2f605f4f8496b';
$key = 'c868a478c81ff3c168b35d703f787d3c';
$data = phpcommon\aesDecrypt($rawdata, $iv, $key);
if (empty($data)) {
die();
}
$jsonobj = json_decode($data, true);
if (!isset($jsonobj)) {
die();
}
$game_account_id = $jsonobj['account_id'];
$amount = $jsonobj['price'];
$itemid = $jsonobj['itemid'];
$itemnum = $jsonobj['itemnum'];
}
$orderid = $this->getOrderId();
if (empty($orderid)) {
die();
}
$nowtime = time();
$advice_url = '';
$amount = 0.01;
if (SERVER_ENV != _ONLINE) {
$advice_url = "https://gamepay-test.kingsome.cn/webapp/index.php?c=PayNotify&a=payNotify";
} else {

View File

@ -42,6 +42,7 @@ class PayNotifyController {
public function payNotify()
{
die();
error_log('payNotify:' . json_encode($_REQUEST));
$sign_info = $this->_reaEncode(
'MerNo=' . $_REQUEST['MerNo'] . '&' .