fix(addon): alipay 及 wechatpay 没有判断支付类型

This commit is contained in:
2025-12-04 11:19:14 +08:00
parent eef56291eb
commit 776f0ed029
3 changed files with 19 additions and 17 deletions

View File

@@ -16,16 +16,16 @@ class PayClose
*/
public function handle($params)
{
// if ($params["pay_type"] == "alipay") {
try {
$pay_model = new PayModel($params[ 'site_id' ]);
$result = $pay_model->close($params);
return $result;
} catch (\Exception $e) {
return error(-1, $e->getMessage());
} catch (\Throwable $e) {
return error(-1, $e->getMessage());
if ($params["pay_type"] == "alipay") {
try {
$pay_model = new PayModel($params[ 'site_id' ]);
$result = $pay_model->close($params);
return $result;
} catch (\Exception $e) {
return error(-1, $e->getMessage());
} catch (\Throwable $e) {
return error(-1, $e->getMessage());
}
}
// }
}
}