新增微信支付类

This commit is contained in:
2023-03-02 18:24:40 +08:00
parent 186f92c4ea
commit bdcbd26a8d
6 changed files with 60 additions and 13 deletions
+3 -2
View File
@@ -53,7 +53,7 @@ class Wechat
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function createApp(string $appId, string $appSecret)
public function createApp(string $appId, string $appSecret): void
{
$config = array(
"app_id" => $appId,
@@ -229,7 +229,8 @@ class Wechat
* @throws TransportExceptionInterface
* @throws ServerExceptionInterface
*/
public function getUnlimitedQRCode(array $options){
public function getUnlimitedQRCode(array $options): array|string
{
try {
$this->createApp($this->config['app_id'], $this->config['secret']);