|
|
@@ -16,13 +16,13 @@ if ($connection->connect_error) {
|
|
|
$now = time();
|
|
|
|
|
|
// 半小时之前的时间戳
|
|
|
-$halfHourAgo = strtotime("-60 minutes", $now);
|
|
|
+$halfHourAgo = strtotime("-120 minutes", $now);
|
|
|
|
|
|
// 格式化时间戳为日期时间字符串
|
|
|
$halfHourAgoFormatted = date("Y-m-d H:i:s", $halfHourAgo);
|
|
|
|
|
|
// 查询数据库
|
|
|
-$query = "SELECT * FROM game_order where status= 1 and token != '' and platform = 'google' and create_time >= '{$halfHourAgoFormatted}' order by id desc";
|
|
|
+$query = "SELECT * FROM game_order where status= 1 and token != '' and create_time >= '{$halfHourAgoFormatted}' ";
|
|
|
$result = $connection->query($query);
|
|
|
|
|
|
$data = [];
|
|
|
@@ -44,10 +44,12 @@ if(empty($data)){
|
|
|
foreach ($data as $val) {
|
|
|
$apiParams = [
|
|
|
'orderId' => $val['order_id'],
|
|
|
- 'platform' => 'google',
|
|
|
+ 'platform' => $val['platform'],
|
|
|
'purchaseToken' => $val['token']
|
|
|
];
|
|
|
|
|
|
+ var_dump($apiParams['orderId']);
|
|
|
+
|
|
|
// 发送POST请求
|
|
|
$url = 'http://sso.skystoryorigin.com:3000/callback';
|
|
|
$jsonStr = json_encode($apiParams);
|