- 将 V2EncryptMode 类从 V2LakalaApi.php 中提取出来 - 创建新的 V2EncryptMode.php 文件专门定义加密模式常量 -保持原有的四种加密模式定义不变 - 清理原文件中重复的类定义 - 提高代码模块化程度和可维护性
@@ -0,0 +1,20 @@
+<?php
+declare(strict_types=1);
+
+namespace SixShop\Lakala\OpenAPISDK\V2\Api;
+/**
+ * V2EncryptMode Class
+ * 请求或者响应加解密类型
+ */
+class V2EncryptMode
+{
+ // 普通无加解密:请求为明文,返回也是明文
+ const NONE = 'none';
+ // 只请求加密,返回为明文
+ const REQUEST = 'request';
+ // 请求明文、响应需解密
+ const RESPONSE = 'response';
+ // 请求需加密、返回需解密
+ const BOTH = 'both';
+}
@@ -11,22 +11,6 @@ use SixShop\Lakala\OpenAPISDK\V2\Util\V2LakalaSM4;
use SixShop\Lakala\OpenAPISDK\V2\Model\V2ModelRequest;
use SixShop\Lakala\OpenAPISDK\V2\Model\V2ModelResponse;
-/**
- * V2EncryptMode Class
- * 请求或者响应加解密类型
- */
-class V2EncryptMode
-{
- // 普通无加解密:请求为明文,返回也是明文
- const NONE = 'none';
- // 只请求加密,返回为明文
- const REQUEST = 'request';
- // 请求明文、响应需解密
- const RESPONSE = 'response';
- // 请求需加密、返回需解密
- const BOTH = 'both';
-}
-
/**
* LakalaApi Class
*