-
Notifications
You must be signed in to change notification settings - Fork 715
转账Transfer
HanSon edited this page Mar 30, 2017
·
2 revisions
属性 | 类型 | 含义 |
---|---|---|
msg | array | 消息的原始数组 |
fee | string | 转账金额(单位:元) |
transcationId | string | 转账ID |
Array
(
[MsgId] => 2288485940160834928
[FromUserName] => @28a357bdc0706af4d783a9a84133b4c9
[ToUserName] => @58e3a0dcb48480fdc9b8c7b526dbec6b9e8fc7e4b331513273adb6a49d7fddb1
[MsgType] => 49
[Content] => <msg>
<appmsg appid="" sdkver="">
<title><![CDATA[微信转账]]></title>
<des><![CDATA[HanSon向你转账0.01元。如需收钱,请点此升级至最新版本]]></des>
<action></action>
<type>2000</type>
<content><![CDATA[]]></content>
<url><![CDATA[https://support.weixin.qq.com/cgi-bin/mmsupport-bin/readtemplate?t=page/common_page__upgrade&text=text001&btn_text=btn_text_0]]></url>
<thumburl><![CDATA[https://support.weixin.qq.com/cgi-bin/mmsupport-bin/readtemplate?t=page/common_page__upgrade&text=text001&btn_text=btn_text_0]]></thumburl>
<lowurl></lowurl>
<extinfo>
</extinfo>
<wcpayinfo>
<paysubtype>1</paysubtype>
<feedesc><![CDATA[¥0.01]]></feedesc>
<transcationid><![CDATA[1000050201711701181132937580]]></transcationid>
<transferid><![CDATA[1000050201201701180097272079]]></transferid>
<invalidtime><![CDATA[1484797137]]></invalidtime>
<begintransfertime><![CDATA[1484705337]]></begintransfertime>
<effectivedate><![CDATA[1]]></effectivedate>
<pay_memo><![CDATA[]]></pay_memo>
</wcpayinfo>
</appmsg>
</msg>
[Status] => 3
[ImgStatus] => 1
[CreateTime] => 1484705338
[VoiceLength] => 0
[PlayLength] => 0
[FileName] => 微信转账
[FileSize] =>
[MediaId] =>
[Url] => https://support.weixin.qq.com/cgi-bin/mmsupport-bin/readtemplate?t=page/common_page__upgrade&text=text001&btn_text=btn_text_0
[AppMsgType] => 2000
[StatusNotifyCode] => 0
[StatusNotifyUserName] =>
[RecommendInfo] => Array
(
[UserName] =>
[NickName] =>
[QQNum] => 0
[Province] =>
[City] =>
[Content] =>
[Signature] =>
[Alias] =>
[Scene] => 0
[VerifyFlag] => 0
[AttrStatus] => 0
[Sex] => 0
[Ticket] =>
[OpCode] => 0
)
[ForwardFlag] => 0
[AppInfo] => Array
(
[AppID] =>
[Type] => 0
)
[HasProductId] => 0
[Ticket] =>
[ImgHeight] => 0
[ImgWidth] => 0
[SubMsgType] => 0
[NewMsgId] => 2288485940160834928
[OriContent] =>
)
$robot->server->setMessageHandler(function ($message){
// 转账信息
if($message instanceof Transfer){
/** @var $message Transfer */
return $message->content . ' 收到金额 ' . $message->fee;
}
});