diff --git a/src/Open/Config/HttpConfig.php b/src/Open/Config/HttpConfig.php index ad4e08e..78777a5 100644 --- a/src/Open/Config/HttpConfig.php +++ b/src/Open/Config/HttpConfig.php @@ -7,7 +7,7 @@ class HttpConfig const FORMAT_USER_AGENT = 'YZY-Open-Client %s-PHP'; - const SDK_VERSION = '2.0.19'; + const SDK_VERSION = '2.0.20'; const REQUEST_BASE_URL = 'https://open.youzanyun.com'; diff --git a/src/Open/Helper/EcommerceHelper.php b/src/Open/Helper/EcommerceHelper.php index 0655fe6..8726c6a 100644 --- a/src/Open/Helper/EcommerceHelper.php +++ b/src/Open/Helper/EcommerceHelper.php @@ -67,6 +67,14 @@ private static function isUseProxy() private static function getEnvValue($key) { - return getenv($key); + if (empty($key)) { + return null; + } + + if (isset($_SERVER[$key])) { + return $_SERVER[$key]; + } + + return null; } } \ No newline at end of file