1
This commit is contained in:
parent
a90a911321
commit
e7418ee041
@ -50,8 +50,8 @@ class PayController {
|
|||||||
public function aggregatePay()
|
public function aggregatePay()
|
||||||
{
|
{
|
||||||
if (!phpcommon\isValidSessionId(
|
if (!phpcommon\isValidSessionId(
|
||||||
$_REQUET['account_id'],
|
$_REQUEST['account_id'],
|
||||||
$_REQUET['session_id']
|
$_REQUEST['session_id']
|
||||||
)) {
|
)) {
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 100,
|
'errcode' => 100,
|
||||||
@ -59,14 +59,34 @@ class PayController {
|
|||||||
));
|
));
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
$nowtime = time();
|
||||||
$openid = phpcommon\extractOpenId($_REQUEST['account_id']);
|
$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();
|
$orderid = $this->getOrderId();
|
||||||
if (empty($orderid)) {
|
if (empty($orderid)) {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
$nowtime = time();
|
|
||||||
$advice_url = '';
|
$advice_url = '';
|
||||||
$amount = 0.01;
|
|
||||||
if (SERVER_ENV != _ONLINE) {
|
if (SERVER_ENV != _ONLINE) {
|
||||||
$advice_url = "https://gamepay-test.kingsome.cn/webapp/index.php?c=PayNotify&a=payNotify";
|
$advice_url = "https://gamepay-test.kingsome.cn/webapp/index.php?c=PayNotify&a=payNotify";
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,6 +42,7 @@ class PayNotifyController {
|
|||||||
|
|
||||||
public function payNotify()
|
public function payNotify()
|
||||||
{
|
{
|
||||||
|
die();
|
||||||
error_log('payNotify:' . json_encode($_REQUEST));
|
error_log('payNotify:' . json_encode($_REQUEST));
|
||||||
$sign_info = $this->_reaEncode(
|
$sign_info = $this->_reaEncode(
|
||||||
'MerNo=' . $_REQUEST['MerNo'] . '&' .
|
'MerNo=' . $_REQUEST['MerNo'] . '&' .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user