We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
订单付款通知 1.1、微信回调URL: ******demo.php 1.2、微信回调参数:
1.3 返回参数:(必须:微信要求必须有返回) echo ' <return_code></return_code> <return_msg></return_msg> ';
1.4 这时不能立刻发送模板消息,怎么处理?
以下代码:
include( "wechat.class.php"); $options = array( 'token'=>'**', //填写你设定的key 'encodingaeskey'=>'n0kxbvKBGd7i6COnIlXSS5**', //填写加密用的EncodingAESKey,如接口为明文模式可忽略 'appid'=>'wx13465e0d704**', //填写高级调用功能的app id 'appsecret'=>'42cf2e89643f5f**' //填写高级调用功能的密钥 ); $weObj = new Wechat($options); $type = $weObj->getRev()->getRevType(); switch($type) { case Wechat::MSGTYPE_EVENT: // 返回微信成功标记 echo echoResult("SUCCESS", "OK"); //定义模板消息(模板肯定没问题) $template11=array(******* ); //发送不成功 $ref=$weObj->sendTemplateMessage($template11)->reply(); break; case Wechat::MSGTYPE_IMAGE: break; default: $weObj->text("help info")->reply();
} //接口输出 function echoResult($returnCode = '', $returnMsg = '') { $arr = array( 'return_code' => $returnCode, 'return_msg' => $returnMsg, ); exit(json_encode($arr)); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
订单付款通知
1.1、微信回调URL: ******demo.php
1.2、微信回调参数:
1.3 返回参数:(必须:微信要求必须有返回)
echo '
<return_code></return_code>
<return_msg></return_msg>
';
1.4 这时不能立刻发送模板消息,怎么处理?
以下代码:
}
//接口输出
function echoResult($returnCode = '', $returnMsg = '')
{
$arr = array(
'return_code' => $returnCode,
'return_msg' => $returnMsg,
);
exit(json_encode($arr));
}
The text was updated successfully, but these errors were encountered: