fix(addon): alipay 及 wechatpay 没有判断支付类型
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,10 @@ class PayNotify
|
||||
/**
|
||||
* 支付方式及配置
|
||||
*/
|
||||
public function handle()
|
||||
public function handle($param)
|
||||
{
|
||||
if ($param[ "pay_type" ] != "alipay") return false;
|
||||
|
||||
if (isset($_POST[ 'out_trade_no' ])) {
|
||||
$out_trade_no = $_POST[ 'out_trade_no' ];
|
||||
$pay = new PayCommon();
|
||||
|
||||
Reference in New Issue
Block a user