diff --git a/app/api/controller/v1/Playx.php b/app/api/controller/v1/Playx.php index 47f1563..892efc2 100644 --- a/app/api/controller/v1/Playx.php +++ b/app/api/controller/v1/Playx.php @@ -173,7 +173,7 @@ class Playx extends Api if ($sig === '' || $ts === '' || $rid === '') { return $this->error(__('Daily push signature missing or incomplete'), null, 0, ['statusCode' => 401]); } - $canonical = $ts . "\n" . $rid . "\nPOST\n/api/v1/playx/daily-push\n" . hash('sha256', json_encode($body)); + $canonical = $ts . "\n" . $rid . "\nPOST\n/api/v1/mall/dailyPush\n" . hash('sha256', json_encode($body)); $expected = hash_hmac('sha256', $canonical, $secret); if (!hash_equals($expected, $sig)) { return $this->error(__('Daily push signature verification failed'), null, 0, ['statusCode' => 401]); diff --git a/tmp_sig.php b/tmp_sig.php index 6e11e9e..4bbed4b 100644 --- a/tmp_sig.php +++ b/tmp_sig.php @@ -1,13 +1,14 @@ '1700000123', + 'report_date' => '1775525663', 'member' => [ [ - 'member_id' => '234567', + 'member_id' => '123', 'login' => 'zhenhui', 'ltv_deposit' => 1500, 'ltv_withdrawal' => 1800, @@ -18,7 +19,7 @@ $body = [ ]; $json = json_encode($body); -$canonical = $ts . "\n" . $rid . "\nPOST\n/api/v1/playx/daily-push\n" . hash('sha256', $json); +$canonical = $ts . "\n" . $rid . "\nPOST\n/api/v1/mall/dailyPush\n" . hash('sha256', $json); echo "json={$json}\n"; echo "sha256=" . hash('sha256', $json) . "\n";