0) { // 获取第一行数据 $row = mysqli_fetch_assoc($result); $userid = $row['userid']; $token = $row['token']; } else { // 处理查询结果为空的情况 } // 验证签名 $api_token = $token; $signature = md5("outer_id=$outer_id&plan_mobile_produced=$plan_mobile_produced&status=$status$api_token"); if ($sign !== $signature) { echo 'Invalid signature'; exit; } if ($is_activated === '1') { // 更新数据oder表 $query = "UPDATE oder SET status = '3', card_sta = '1' WHERE oderid = '$outer_id'"; $querys = "UPDATE revenue SET oder_sta = '3' WHERE oderid = '$outer_id'"; $result = mysqli_query($con, $query); $result2 = mysqli_query($con, $querys); if ($result && $result2) { echo 'SUCCESS'; } else { echo 'err'; } } elseif ($status === '550') { // 更新数据oder表 $beizhu = $tracking_company . ' ' . $tracking_number; $query = "UPDATE oder SET status = '2', beizhu = '$beizhu', thirdphone = '$plan_mobile_produced' WHERE oderid = '$outer_id'"; $querys = "UPDATE revenue SET oder_sta = '2' WHERE oderid = '$outer_id'"; $result = mysqli_query($con, $query); $result2 = mysqli_query($con, $querys); if ($result && $result2) { echo 'SUCCESS'; } else { echo 'err'; } } elseif ($status === '-460' || $status === '-120') { // 更新数据oder表 $query = "UPDATE oder SET status = '4', beizhu = '$reason' WHERE oderid = '$outer_id'"; $querys = "UPDATE revenue SET oder_sta = '4' WHERE oderid = '$outer_id'"; $result = mysqli_query($con, $query); $result2 = mysqli_query($con, $querys); if ($result && $result2) { echo 'SUCCESS'; } else { echo 'err'; } } else { echo 'SUCCESS'; // 其他情况默认返回成功 } } else { // 未知平台类型,可以进行相应的处理 } // 返回小写的'SUCCESS'表示成功接收回调请求 // echo 'SUCCESS'; ?>