mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-26 20:52:44 +08:00
38 lines
975 B
PHP
38 lines
975 B
PHP
<?php
|
|
|
|
namespace App\Services\Wechat\Notice;
|
|
|
|
use App\Models\WechatSubscribe as WechatSubscribeModel;
|
|
use App\Services\WechatNotice;
|
|
|
|
class OrderFinish extends WechatNotice
|
|
{
|
|
|
|
protected $templateCode = 'order_finish';
|
|
|
|
/**
|
|
* @param WechatSubscribeModel $subscribe
|
|
* @param array $params
|
|
* @return bool
|
|
*/
|
|
public function handle(WechatSubscribeModel $subscribe, $params)
|
|
{
|
|
|
|
$first = '订单已处理完成!';
|
|
$remark = '感谢您的支持,有疑问请联系客服哦!';
|
|
|
|
$params = [
|
|
'first' => $first,
|
|
'remark' => $remark,
|
|
'keyword1' => sprintf('%s元', $params['order']['amount']),
|
|
'keyword2' => $params['order']['subject'],
|
|
'keyword3' => date('Y-m-d H:i', $params['order']['update_time']),
|
|
];
|
|
|
|
$templateId = $this->getTemplateId($this->templateCode);
|
|
|
|
return $this->send($subscribe->open_id, $templateId, $params);
|
|
}
|
|
|
|
}
|