【类 型】:feat

【原  因】:退款订单提交成功 mqtt提示小程序端 更新订单列表
【过  程】:
【影  响】:
This commit is contained in:
air 2025-01-15 19:27:22 +08:00
parent b8e09c486f
commit e8a82cbb2d

View File

@ -103,6 +103,9 @@ class PayController extends PublicController
$result = Pay::wechat($this->config)->refund($refundParameter);
// 处理退款结果
echo json_encode(array('status' => 1, 'msg' => $result));
$topicPrefix = makeTopicPrefix($order['openid']); //小程序端用户订阅主题的前缀 ps:订单对应的用户的openid算出来的
// 提醒小程序端 刷新订单列表(mqtt)
$this->publish('refreshOrderList/' . $topicPrefix, 1);
} catch (\Exception $e) {
echo json_encode(array('status' => 0, 'msg' => $e->getMessage()));
}