From dbca3a15146cf7340f4542ae635792f35eaa5cdf Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 4 May 2018 17:59:34 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=A2=9E=E5=8A=A0=E6=89=AB?= =?UTF-8?q?=E7=A0=81=E6=A8=A1=E5=BC=8F=E4=B8=80=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/store/controller/wechat/Demo.php | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/application/store/controller/wechat/Demo.php b/application/store/controller/wechat/Demo.php index d28de3a75..323ad45cb 100644 --- a/application/store/controller/wechat/Demo.php +++ b/application/store/controller/wechat/Demo.php @@ -26,6 +26,25 @@ use WeChat\Pay; class Demo { + /** + * 微信扫码支付模式一 + * @return \think\Response + * @throws \Endroid\QrCode\Exceptions\ImageFunctionFailedException + * @throws \Endroid\QrCode\Exceptions\ImageFunctionUnknownException + * @throws \Endroid\QrCode\Exceptions\ImageTypeInvalidException + */ + public function scanOneQrc() + { + $wechat = new Pay(config('wechat.')); + $result = $wechat->createParamsForRuleQrc('8888888'); + return $this->createQrc($result); + } + + public function scanOneNotify() + { + p(file_get_contents('php://input')); + } + /** * 扫码支付测试 * @return \think\Response @@ -119,7 +138,7 @@ class Demo } /** - * 支付通过接收处理 + * 支付通知接收处理 * @return string * @throws \WeChat\Exceptions\InvalidResponseException */