This commit is contained in:
2018-07-19 12:10:22 +08:00
parent 07c2ff952e
commit 0e96d49e0e
8 changed files with 883 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
/**
* Created by PhpStorm.
* User: whwyy
* Date: 2018/4/8 0008
* Time: 9:49
*/
namespace wchat;
class Template extends Base
{
/**
* @param $openId
* @param $message
* @param $form_id
* @return Result
* @throws \Exception
*
* 奴隶交易通知
*/
public function sendTemplate(string $access,array $postBody)
{
$url = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=' . $access;
$postBody = json_encode($postBody);
return http::post($url, $postBody, NULL, ['content-type' => 'application/json'])
->append('postBody', $postBody);
}
}