添加数数日志
This commit is contained in:
parent
e53ed3d431
commit
b3ec14b825
2
third_party/phpcommon
vendored
2
third_party/phpcommon
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 1e3bb4df855f6d11df75545d10b0c2aacea34a06
|
Subproject commit e04c7c832abfe671ac35ba2ea43f24071ff06582
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require 'phpcommon/tglog.php';
|
||||||
|
|
||||||
class PayController {
|
class PayController {
|
||||||
|
|
||||||
const SCAN_PAY_API_URL = 'https://gwapi.yemadai.com/pay/aggregatePay';
|
const SCAN_PAY_API_URL = 'https://gwapi.yemadai.com/pay/aggregatePay';
|
||||||
@ -160,6 +162,29 @@ class PayController {
|
|||||||
':minigame_appid' => $minigame_appid,
|
':minigame_appid' => $minigame_appid,
|
||||||
':minigame_accountid' => $minigame_accountid,
|
':minigame_accountid' => $minigame_accountid,
|
||||||
));
|
));
|
||||||
|
{
|
||||||
|
$log_params = array(
|
||||||
|
'#account_id' => $game_account_id,
|
||||||
|
'#distinct_id' => '',
|
||||||
|
'#type' => 'track',
|
||||||
|
'#time' => date("Y-m-d H:i:s"),
|
||||||
|
'#ip' => phpcommon\getIPv4(),
|
||||||
|
'#event_name' => 'event_' . 11 . '_' . 40,
|
||||||
|
|
||||||
|
'properties' => array(
|
||||||
|
'channel' => $game_channel,
|
||||||
|
'gameid' => $gameid,
|
||||||
|
'orderid' => $orderid,
|
||||||
|
'itemid' => $itemid,
|
||||||
|
'itemnum' => 1,
|
||||||
|
'amount' => $real_amount,
|
||||||
|
'sp_orderid' => (string)$xmlobj->OrderNo,
|
||||||
|
'minigame_appid' => $minigame_appid,
|
||||||
|
'minigame_account_id' => $minigame_accountid,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
phpcommon\TGLog::writeToLog('gamepay', $gameid, $log_params);
|
||||||
|
}
|
||||||
if (!$ret) {
|
if (!$ret) {
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 2,
|
'errcode' => 2,
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require 'phpcommon/tglog.php';
|
||||||
|
|
||||||
class PayNotifyController {
|
class PayNotifyController {
|
||||||
|
|
||||||
const PUB_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2g2T98rLysZAS1pVv2gE/2DOf9+LkHI9oEFVeKvVZKLHMNzEpZkXK+IXJMHpxlMNLStiwuLxLpnvCQQptGbFohqDsHACademc6/t+YVF2FX4F6GIgBuaPDdJwSGAljtU5P3vsCbJpGPXh6QNyKveBAJKILbXem6pPl+J01CMXyQIDAQAB';
|
const PUB_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2g2T98rLysZAS1pVv2gE/2DOf9+LkHI9oEFVeKvVZKLHMNzEpZkXK+IXJMHpxlMNLStiwuLxLpnvCQQptGbFohqDsHACademc6/t+YVF2FX4F6GIgBuaPDdJwSGAljtU5P3vsCbJpGPXh6QNyKveBAJKILbXem6pPl+J01CMXyQIDAQAB';
|
||||||
@ -47,13 +49,37 @@ class PayNotifyController {
|
|||||||
':createtime' => time()
|
':createtime' => time()
|
||||||
));
|
));
|
||||||
if ($_REQUEST['Succeed'] == '88') {
|
if ($_REQUEST['Succeed'] == '88') {
|
||||||
$row = $conn->execQueryOne('SELECT orderid, accountid, sp_pay_result, status FROM orderinfo ' .
|
$row = $conn->execQueryOne('SELECT orderid, accountid, sp_pay_result, status, channel, '.
|
||||||
|
' gameid, itemid, price '.
|
||||||
|
'FROM orderinfo ' .
|
||||||
'WHERE orderid=:orderid;',
|
'WHERE orderid=:orderid;',
|
||||||
array(
|
array(
|
||||||
'orderid' => $_REQUEST['BillNo']
|
'orderid' => $_REQUEST['BillNo']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if ($row) {
|
if ($row) {
|
||||||
|
{
|
||||||
|
$log_params = array(
|
||||||
|
'#account_id' => $row['accountid'],
|
||||||
|
'#distinct_id' => '',
|
||||||
|
'#type' => 'track',
|
||||||
|
'#time' => date("Y-m-d H:i:s"),
|
||||||
|
'#ip' => phpcommon\getIPv4(),
|
||||||
|
'#event_name' => 'event_' . 11 . '_' . 41,
|
||||||
|
|
||||||
|
'properties' => array(
|
||||||
|
'channel' => $row['channel'],
|
||||||
|
'gameid' => $row['gameid'],
|
||||||
|
'orderid' => $row['orderid'],
|
||||||
|
'itemid' => $row['itemid'],
|
||||||
|
'itemnum' => 1,
|
||||||
|
'amount' => $row['price'],
|
||||||
|
'sp_orderid' => $_REQUEST['OrderNo'],
|
||||||
|
'sp_amount' => $_REQUEST['Amount'],
|
||||||
|
)
|
||||||
|
);
|
||||||
|
phpcommon\TGLog::writeToLog('gamepay', $row['gameid'], $log_params);
|
||||||
|
}
|
||||||
if ($row['status'] == 0 && $row['sp_pay_result'] == 0) {
|
if ($row['status'] == 0 && $row['sp_pay_result'] == 0) {
|
||||||
$ret = $conn->execScript('INSERT INTO confirmed_order(orderid, status, createtime)' .
|
$ret = $conn->execScript('INSERT INTO confirmed_order(orderid, status, createtime)' .
|
||||||
'VALUES(:orderid, :status, :createtime);',
|
'VALUES(:orderid, :status, :createtime);',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user