weigang 5 years ago
parent
commit
2d8ed3c41b
  1. 4
      app/Controller/NotifyController.php
  2. 2
      app/Service/MiniprogramService.php

4
app/Controller/NotifyController.php

@ -69,7 +69,6 @@ class NotifyController extends BaseController
// 通知回调,进行业务处理
$response = $app->handlePaidNotify(function ($message, $fail) use ($app) {
var_dump('message',$message);
Db::beginTransaction();
try {
// 支付失败或者通知失败
@ -170,7 +169,7 @@ class NotifyController extends BaseController
$res = $this->deviceService->pubMsgToStoreByOrderMainId($orderMain->id);
// 公众号模板消息
// $res = $this->miniprogramService->sendTemMsgForOnlineOrder($orderMain->id);
$res = $this->miniprogramService->sendTemMsgForOnlineOrder($orderMain->id);
// 打印订单,自动打印 TODO 后续优化调用逻辑
$res = $this->feiePrintService->feiePrint($orderMain->global_order_id);
@ -190,7 +189,6 @@ class NotifyController extends BaseController
});
var_dump('reponse',$response->getContent());
return $this->response
->withHeader('Content-Type', 'text/xml')
->withStatus(200)

2
app/Service/MiniprogramService.php

@ -104,9 +104,7 @@ class MiniprogramService implements MiniprogramServiceInterface
];
// 看看有没有小程序跳转的要求
if ( is_array($applet_config)&&!empty($applet_config)&&!empty($applet_config['appid']) ) {
$template['mp_template_msg']['miniprogram'] = $applet_config;
}
// 重点来了,拼接关键数据data
if (!is_array($data)) { # 数组都不是,请回去

Loading…
Cancel
Save