Skip to content

Commit 07763cf

Browse files
Merge pull request #65 from lienze741/1.2.x
修改发送模板消息的小程序appid非微信appid和修正微信推送事件msgid有大写和小写不一致问题
2 parents 879e719 + f84778c commit 07763cf

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/Bean/OfficialAccount/RequestMsg.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class RequestMsg extends SplBean
2222
protected $MsgType;
2323
protected $Content;
2424
protected $MsgId;
25+
protected $MsgID;
2526
protected $Event;
2627
protected $EventKey;
2728
protected $Ticket;
@@ -125,7 +126,15 @@ public function setContent($Content): void
125126
*/
126127
public function getMsgId()
127128
{
128-
return $this->MsgId;
129+
if (!empty($this->MsgId)) {
130+
return $this->MsgId;
131+
}
132+
133+
if (!empty($this->MsgID)) {
134+
return $this->MsgID;
135+
}
136+
137+
return null;
129138
}
130139

131140
/**

src/OfficialAccount/TemplateMsg.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public function send(MsgBean $templateMsg) : bool
2626
'ACCESS_TOKEN'=> $this->getOfficialAccount()->accessToken()->getToken()
2727
]);
2828

29-
$templateMsg->setAppid($this->getOfficialAccount()->getConfig()->getAppId());
3029
$response = NetWork::postJsonForJson($url, $templateMsg->getSendMessage());
3130
$this->hasException($response);
3231
return true;

0 commit comments

Comments
 (0)