mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-10-26 01:52:07 +08:00
[更新]增加扫码模式一支付
This commit is contained in:
parent
13624d222c
commit
dbca3a1514
@ -26,6 +26,25 @@ use WeChat\Pay;
|
|||||||
class Demo
|
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
|
* @return \think\Response
|
||||||
@ -119,7 +138,7 @@ class Demo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付通过接收处理
|
* 支付通知接收处理
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \WeChat\Exceptions\InvalidResponseException
|
* @throws \WeChat\Exceptions\InvalidResponseException
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user