【类 型】:test
【原 因】:mqtt测试 【过 程】: 【影 响】:
This commit is contained in:
parent
4cf7eecf07
commit
aeaaa2eed8
@ -4,10 +4,6 @@ namespace MpApi\Controller;
|
||||
|
||||
use Yansongda\Pay\Pay;
|
||||
|
||||
use PhpMqtt\Client\MqttClient;
|
||||
use PhpMqtt\Client\Exceptions\MqttClientException;
|
||||
use PhpMqtt\Client\ConnectionSettings;
|
||||
|
||||
class PayController extends PublicController
|
||||
{
|
||||
/**
|
||||
@ -103,13 +99,14 @@ class PayController extends PublicController
|
||||
];
|
||||
|
||||
try {
|
||||
$topicPrefix = makeTopicPrefix($order['openid']); //小程序端用户订阅主题的前缀 ps:订单对应的用户的openid算出来的
|
||||
// 提醒小程序端 刷新订单列表(mqtt)
|
||||
$this->publish('refreshOrderList/' . $topicPrefix, 1);
|
||||
$this->publish('demo', 1);
|
||||
// 调用退款接口
|
||||
$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()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user