diff --git a/application/service/PaymentService.php b/application/service/PaymentService.php index 812695fcc89c84ddb3044fdc001bcf6c16fb3333..557e011cd4275ebb63f90baa458fdb8655553001 100755 --- a/application/service/PaymentService.php +++ b/application/service/PaymentService.php @@ -541,9 +541,9 @@ class PaymentService if($success > 0) { - return DataReturn('上传成功[成功'.$success.'个, 失败'.$error.'个]', 0); + return DataReturn('上传成功[成功'.$success.'个支付插件, 失败'.$error.'个无效文件]', 0); } - return DataReturn('上传失败'.$error.'个', -10); + return DataReturn('上传失败,'.$error.'个无效文件、如功能插件请到[ 应用中心->应用管理 ]模块里面去上传安装', -10); } /** diff --git a/application/service/PluginsAdminService.php b/application/service/PluginsAdminService.php index d4c41c0150ac19fbcbccb384aa5e119eafaea181..f6c0c0cdff00821ca4e7b72e840f679c075d4736 100755 --- a/application/service/PluginsAdminService.php +++ b/application/service/PluginsAdminService.php @@ -1061,6 +1061,15 @@ php; $plugins_name = substr($file, 0, strpos($file, '/')); if(empty($plugins_name)) { + // 应用名称为空、则校验是否为支付插件 + $file_size = zip_entry_filesize($temp_resource); + $file_content = zip_entry_read($temp_resource, $file_size); + if(stripos($file_content, 'namespace payment') !== false) + { + return DataReturn('支付插件请到[ 网站管理->支付方式 ]模块里面去上传安装', -1); + } + + // 不是支付插件则提示插件包错误 return DataReturn('插件包有误', -30); }