get('wechat_trade_enable', '1') === '1'; } public static function shouldHandleOrder($order) { if (!self::isEnabled()) { return false; } if (!$order) { return false; } if (($order['platform'] ?? '') !== 'wxMiniProgram') { return false; } $payType = $order['pay_type'] ?? ''; if (!in_array($payType, ['wechat', 'huifu_wechat'], true)) { return false; } if (intval($order['status'] ?? 0) <= 0) { return false; } return WxOrderContext::resolveTransactionId($order) !== ''; } }