瀏覽代碼

[更新]ComposerUpdate

邹景立 7 年之前
父節點
當前提交
dcd228d28d
共有 25 個文件被更改,包括 611 次插入566 次删除
  1. 1 1
      vendor/autoload.php
  2. 2 2
      vendor/composer/autoload_classmap.php
  3. 1 1
      vendor/composer/autoload_psr4.php
  4. 7 7
      vendor/composer/autoload_real.php
  5. 7 6
      vendor/composer/autoload_static.php
  6. 19 18
      vendor/composer/installed.json
  7. 2 8
      vendor/symfony/options-resolver/CHANGELOG.md
  8. 0 102
      vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php
  9. 0 26
      vendor/symfony/options-resolver/Exception/NoConfigurationException.php
  10. 1 1
      vendor/symfony/options-resolver/LICENSE
  11. 33 75
      vendor/symfony/options-resolver/OptionsResolver.php
  12. 0 203
      vendor/symfony/options-resolver/Tests/Debug/OptionsResolverIntrospectorTest.php
  13. 6 100
      vendor/symfony/options-resolver/Tests/OptionsResolverTest.php
  14. 2 2
      vendor/symfony/options-resolver/composer.json
  15. 1 0
      vendor/zoujingli/wechat-developer/.gitignore
  16. 3 3
      vendor/zoujingli/wechat-developer/Test/config.php
  17. 44 0
      vendor/zoujingli/wechat-developer/Test/pay-transfers-create.php
  18. 44 0
      vendor/zoujingli/wechat-developer/Test/pay-transfersbank-create.php
  19. 0 3
      vendor/zoujingli/wechat-developer/WeChat/Menu.php
  20. 102 6
      vendor/zoujingli/wechat-developer/WeChat/Pay.php
  21. 87 0
      vendor/zoujingli/weopen-developer/WeChat/Mini.php
  22. 198 0
      vendor/zoujingli/weopen-developer/WeMini/Account.php
  23. 29 0
      vendor/zoujingli/weopen-developer/WeOpen/MiniApp.php
  24. 21 2
      vendor/zoujingli/weopen-developer/WeOpen/Service.php
  25. 1 0
      vendor/zoujingli/weopen-developer/composer.json

+ 1 - 1
vendor/autoload.php

@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInit560f5131ba35ccbe0906be0aed9ee6bd::getLoader();
+return ComposerAutoloaderInit27146d5859a40193f6e6a960dc07477e::getLoader();

+ 2 - 2
vendor/composer/autoload_classmap.php

@@ -102,13 +102,11 @@ return array(
     'Qiniu\\Storage\\ResumeUploader' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/Storage/ResumeUploader.php',
     'Qiniu\\Storage\\UploadManager' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/Storage/UploadManager.php',
     'Qiniu\\Zone' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/Zone.php',
-    'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => $vendorDir . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
     'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => $vendorDir . '/symfony/options-resolver/Exception/AccessException.php',
     'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/options-resolver/Exception/ExceptionInterface.php',
     'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidArgumentException.php',
     'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/InvalidOptionsException.php',
     'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/MissingOptionsException.php',
-    'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/options-resolver/Exception/NoConfigurationException.php',
     'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => $vendorDir . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
     'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => $vendorDir . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
     'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => $vendorDir . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
@@ -128,6 +126,7 @@ return array(
     'WeChat\\Limit' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Limit.php',
     'WeChat\\Media' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Media.php',
     'WeChat\\Menu' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Menu.php',
+    'WeChat\\Mini' => $vendorDir . '/zoujingli/weopen-developer/WeChat/Mini.php',
     'WeChat\\Oauth' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Oauth.php',
     'WeChat\\Pay' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Pay.php',
     'WeChat\\Product' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Product.php',
@@ -140,6 +139,7 @@ return array(
     'WeChat\\Template' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Template.php',
     'WeChat\\User' => $vendorDir . '/zoujingli/wechat-developer/WeChat/User.php',
     'WeChat\\Wifi' => $vendorDir . '/zoujingli/wechat-developer/WeChat/Wifi.php',
+    'WeMini\\Account' => $vendorDir . '/zoujingli/weopen-developer/WeMini/Account.php',
     'WeMini\\Basic' => $vendorDir . '/zoujingli/weopen-developer/WeMini/Basic.php',
     'WeMini\\Code' => $vendorDir . '/zoujingli/weopen-developer/WeMini/Code.php',
     'WeMini\\Crypt' => $vendorDir . '/zoujingli/wechat-developer/WeMini/Crypt.php',

+ 1 - 1
vendor/composer/autoload_psr4.php

@@ -11,7 +11,7 @@ return array(
     'app\\' => array($baseDir . '/application'),
     'WeOpen\\' => array($vendorDir . '/zoujingli/weopen-developer/WeOpen'),
     'WeMini\\' => array($vendorDir . '/zoujingli/wechat-developer/WeMini', $vendorDir . '/zoujingli/weopen-developer/WeMini'),
-    'WeChat\\' => array($vendorDir . '/zoujingli/wechat-developer/WeChat'),
+    'WeChat\\' => array($vendorDir . '/zoujingli/wechat-developer/WeChat', $vendorDir . '/zoujingli/weopen-developer/WeChat'),
     'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
     'Qiniu\\' => array($vendorDir . '/qiniu/php-sdk/src/Qiniu'),
     'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),

+ 7 - 7
vendor/composer/autoload_real.php

@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit560f5131ba35ccbe0906be0aed9ee6bd
+class ComposerAutoloaderInit27146d5859a40193f6e6a960dc07477e
 {
     private static $loader;
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit560f5131ba35ccbe0906be0aed9ee6bd
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInit560f5131ba35ccbe0906be0aed9ee6bd', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInit27146d5859a40193f6e6a960dc07477e', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInit560f5131ba35ccbe0906be0aed9ee6bd', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInit27146d5859a40193f6e6a960dc07477e', 'loadClassLoader'));
 
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if ($useStaticLoader) {
             require_once __DIR__ . '/autoload_static.php';
 
-            call_user_func(\Composer\Autoload\ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd::getInitializer($loader));
+            call_user_func(\Composer\Autoload\ComposerStaticInit27146d5859a40193f6e6a960dc07477e::getInitializer($loader));
         } else {
             $map = require __DIR__ . '/autoload_namespaces.php';
             foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit560f5131ba35ccbe0906be0aed9ee6bd
         $loader->register(true);
 
         if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd::$files;
+            $includeFiles = Composer\Autoload\ComposerStaticInit27146d5859a40193f6e6a960dc07477e::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequire560f5131ba35ccbe0906be0aed9ee6bd($fileIdentifier, $file);
+            composerRequire27146d5859a40193f6e6a960dc07477e($fileIdentifier, $file);
         }
 
         return $loader;
     }
 }
 
-function composerRequire560f5131ba35ccbe0906be0aed9ee6bd($fileIdentifier, $file)
+function composerRequire27146d5859a40193f6e6a960dc07477e($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         require $file;

+ 7 - 6
vendor/composer/autoload_static.php

@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd
+class ComposerStaticInit27146d5859a40193f6e6a960dc07477e
 {
     public static $files = array (
         '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
@@ -70,6 +70,7 @@ class ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd
         'WeChat\\' => 
         array (
             0 => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat',
+            1 => __DIR__ . '/..' . '/zoujingli/weopen-developer/WeChat',
         ),
         'Symfony\\Component\\OptionsResolver\\' => 
         array (
@@ -186,13 +187,11 @@ class ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd
         'Qiniu\\Storage\\ResumeUploader' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/Storage/ResumeUploader.php',
         'Qiniu\\Storage\\UploadManager' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/Storage/UploadManager.php',
         'Qiniu\\Zone' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/Zone.php',
-        'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => __DIR__ . '/..' . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php',
         'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/AccessException.php',
         'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/ExceptionInterface.php',
         'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidArgumentException.php',
         'Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/InvalidOptionsException.php',
         'Symfony\\Component\\OptionsResolver\\Exception\\MissingOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/MissingOptionsException.php',
-        'Symfony\\Component\\OptionsResolver\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoConfigurationException.php',
         'Symfony\\Component\\OptionsResolver\\Exception\\NoSuchOptionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/NoSuchOptionException.php',
         'Symfony\\Component\\OptionsResolver\\Exception\\OptionDefinitionException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/OptionDefinitionException.php',
         'Symfony\\Component\\OptionsResolver\\Exception\\UndefinedOptionsException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/UndefinedOptionsException.php',
@@ -212,6 +211,7 @@ class ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd
         'WeChat\\Limit' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Limit.php',
         'WeChat\\Media' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Media.php',
         'WeChat\\Menu' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Menu.php',
+        'WeChat\\Mini' => __DIR__ . '/..' . '/zoujingli/weopen-developer/WeChat/Mini.php',
         'WeChat\\Oauth' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Oauth.php',
         'WeChat\\Pay' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Pay.php',
         'WeChat\\Product' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Product.php',
@@ -224,6 +224,7 @@ class ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd
         'WeChat\\Template' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Template.php',
         'WeChat\\User' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/User.php',
         'WeChat\\Wifi' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeChat/Wifi.php',
+        'WeMini\\Account' => __DIR__ . '/..' . '/zoujingli/weopen-developer/WeMini/Account.php',
         'WeMini\\Basic' => __DIR__ . '/..' . '/zoujingli/weopen-developer/WeMini/Basic.php',
         'WeMini\\Code' => __DIR__ . '/..' . '/zoujingli/weopen-developer/WeMini/Code.php',
         'WeMini\\Crypt' => __DIR__ . '/..' . '/zoujingli/wechat-developer/WeMini/Crypt.php',
@@ -284,9 +285,9 @@ class ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd::$prefixDirsPsr4;
-            $loader->classMap = ComposerStaticInit560f5131ba35ccbe0906be0aed9ee6bd::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInit27146d5859a40193f6e6a960dc07477e::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInit27146d5859a40193f6e6a960dc07477e::$prefixDirsPsr4;
+            $loader->classMap = ComposerStaticInit27146d5859a40193f6e6a960dc07477e::$classMap;
 
         }, null, ClassLoader::class);
     }

+ 19 - 18
vendor/composer/installed.json

@@ -80,17 +80,17 @@
     },
     {
         "name": "zoujingli/wechat-developer",
-        "version": "v1.1.5",
-        "version_normalized": "1.1.5.0",
+        "version": "v1.1.6",
+        "version_normalized": "1.1.6.0",
         "source": {
             "type": "git",
             "url": "https://github.com/zoujingli/WeChatDeveloper.git",
-            "reference": "4598856a9e19c81f76f7f7076c80acff8dc67644"
+            "reference": "095471bdc61e3389135f69b1849069c19d439f22"
         },
         "dist": {
             "type": "zip",
-            "url": "https://files.phpcomposer.com/files/zoujingli/WeChatDeveloper/4598856a9e19c81f76f7f7076c80acff8dc67644.zip",
-            "reference": "4598856a9e19c81f76f7f7076c80acff8dc67644",
+            "url": "https://files.phpcomposer.com/files/zoujingli/WeChatDeveloper/095471bdc61e3389135f69b1849069c19d439f22.zip",
+            "reference": "095471bdc61e3389135f69b1849069c19d439f22",
             "shasum": ""
         },
         "require": {
@@ -98,7 +98,7 @@
             "ext-openssl": "*",
             "php": ">=5.4"
         },
-        "time": "2018-05-10T10:34:26+00:00",
+        "time": "2018-05-11T09:54:48+00:00",
         "type": "library",
         "installation-source": "dist",
         "autoload": {
@@ -133,12 +133,12 @@
         "source": {
             "type": "git",
             "url": "https://github.com/zoujingli/WeOpenDeveloper.git",
-            "reference": "602ef0a4742744dd19f52e610e3aa873942a188f"
+            "reference": "fac7e7596edecd2abb7aad2168db3f253566cbf8"
         },
         "dist": {
             "type": "zip",
-            "url": "https://files.phpcomposer.com/files/zoujingli/WeOpenDeveloper/602ef0a4742744dd19f52e610e3aa873942a188f.zip",
-            "reference": "602ef0a4742744dd19f52e610e3aa873942a188f",
+            "url": "https://files.phpcomposer.com/files/zoujingli/WeOpenDeveloper/fac7e7596edecd2abb7aad2168db3f253566cbf8.zip",
+            "reference": "fac7e7596edecd2abb7aad2168db3f253566cbf8",
             "shasum": ""
         },
         "require": {
@@ -147,12 +147,13 @@
             "php": ">=5.4",
             "zoujingli/wechat-developer": "^1.0"
         },
-        "time": "2018-05-11T03:49:36+00:00",
+        "time": "2018-05-12T07:54:53+00:00",
         "type": "library",
         "installation-source": "dist",
         "autoload": {
             "psr-4": {
                 "WeOpen\\": "WeOpen",
+                "WeChat\\": "WeChat",
                 "WeMini\\": "WeMini"
             }
         },
@@ -271,27 +272,27 @@
     },
     {
         "name": "symfony/options-resolver",
-        "version": "v3.4.9",
-        "version_normalized": "3.4.9.0",
+        "version": "v3.3.6",
+        "version_normalized": "3.3.6.0",
         "source": {
             "type": "git",
             "url": "https://github.com/symfony/options-resolver.git",
-            "reference": "f3109a6aedd20e35c3a33190e932c2b063b7b50e"
+            "reference": "ff48982d295bcac1fd861f934f041ebc73ae40f0"
         },
         "dist": {
             "type": "zip",
-            "url": "https://files.phpcomposer.com/files/symfony/options-resolver/f3109a6aedd20e35c3a33190e932c2b063b7b50e.zip",
-            "reference": "f3109a6aedd20e35c3a33190e932c2b063b7b50e",
+            "url": "https://files.phpcomposer.com/files/symfony/options-resolver/ff48982d295bcac1fd861f934f041ebc73ae40f0.zip",
+            "reference": "ff48982d295bcac1fd861f934f041ebc73ae40f0",
             "shasum": ""
         },
         "require": {
-            "php": "^5.5.9|>=7.0.8"
+            "php": ">=5.5.9"
         },
-        "time": "2018-01-11T07:56:07+00:00",
+        "time": "2017-04-12T14:14:56+00:00",
         "type": "library",
         "extra": {
             "branch-alias": {
-                "dev-master": "3.4-dev"
+                "dev-master": "3.3-dev"
             }
         },
         "installation-source": "dist",

+ 2 - 8
vendor/symfony/options-resolver/CHANGELOG.md

@@ -1,12 +1,6 @@
 CHANGELOG
 =========
 
-3.4.0
------
-
- * added `OptionsResolverIntrospector` to inspect options definitions inside an `OptionsResolver` instance
- * added array of types support in allowed types (e.g int[])
-
 2.6.0
 -----
 
@@ -31,7 +25,7 @@ CHANGELOG
  * deprecated OptionsResolver::isKnown() in favor of isDefined()
  * [BC BREAK] OptionsResolver::isRequired() returns true now if a required
    option has a default value set
- * [BC BREAK] merged Options into OptionsResolver and turned Options into an
+ * [BC BREAK] merged Options into OptionsResolver and turned Options into an 
    interface
  * deprecated Options::overload() (now in OptionsResolver)
  * deprecated Options::set() (now in OptionsResolver)
@@ -42,7 +36,7 @@ CHANGELOG
    lazy option/normalizer closures now
  * [BC BREAK] removed Traversable interface from Options since using within
    lazy option/normalizer closures resulted in exceptions
- * [BC BREAK] removed Options::all() since using within lazy option/normalizer
+ * [BC BREAK] removed Options::all() since using within lazy option/normalizer 
    closures resulted in exceptions
  * [BC BREAK] OptionDefinitionException now extends LogicException instead of
    RuntimeException

+ 0 - 102
vendor/symfony/options-resolver/Debug/OptionsResolverIntrospector.php

@@ -1,102 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\OptionsResolver\Debug;
-
-use Symfony\Component\OptionsResolver\Exception\NoConfigurationException;
-use Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException;
-use Symfony\Component\OptionsResolver\OptionsResolver;
-
-/**
- * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
- *
- * @final
- */
-class OptionsResolverIntrospector
-{
-    private $get;
-
-    public function __construct(OptionsResolver $optionsResolver)
-    {
-        $this->get = \Closure::bind(function ($property, $option, $message) {
-            /** @var OptionsResolver $this */
-            if (!$this->isDefined($option)) {
-                throw new UndefinedOptionsException(sprintf('The option "%s" does not exist.', $option));
-            }
-
-            if (!array_key_exists($option, $this->{$property})) {
-                throw new NoConfigurationException($message);
-            }
-
-            return $this->{$property}[$option];
-        }, $optionsResolver, $optionsResolver);
-    }
-
-    /**
-     * @param string $option
-     *
-     * @return mixed
-     *
-     * @throws NoConfigurationException on no configured value
-     */
-    public function getDefault($option)
-    {
-        return call_user_func($this->get, 'defaults', $option, sprintf('No default value was set for the "%s" option.', $option));
-    }
-
-    /**
-     * @param string $option
-     *
-     * @return \Closure[]
-     *
-     * @throws NoConfigurationException on no configured closures
-     */
-    public function getLazyClosures($option)
-    {
-        return call_user_func($this->get, 'lazy', $option, sprintf('No lazy closures were set for the "%s" option.', $option));
-    }
-
-    /**
-     * @param string $option
-     *
-     * @return string[]
-     *
-     * @throws NoConfigurationException on no configured types
-     */
-    public function getAllowedTypes($option)
-    {
-        return call_user_func($this->get, 'allowedTypes', $option, sprintf('No allowed types were set for the "%s" option.', $option));
-    }
-
-    /**
-     * @param string $option
-     *
-     * @return mixed[]
-     *
-     * @throws NoConfigurationException on no configured values
-     */
-    public function getAllowedValues($option)
-    {
-        return call_user_func($this->get, 'allowedValues', $option, sprintf('No allowed values were set for the "%s" option.', $option));
-    }
-
-    /**
-     * @param string $option
-     *
-     * @return \Closure
-     *
-     * @throws NoConfigurationException on no configured normalizer
-     */
-    public function getNormalizer($option)
-    {
-        return call_user_func($this->get, 'normalizers', $option, sprintf('No normalizer was set for the "%s" option.', $option));
-    }
-}

+ 0 - 26
vendor/symfony/options-resolver/Exception/NoConfigurationException.php

@@ -1,26 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\OptionsResolver\Exception;
-
-use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector;
-
-/**
- * Thrown when trying to introspect an option definition property
- * for which no value was configured inside the OptionsResolver instance.
- *
- * @see OptionsResolverIntrospector
- *
- * @author Maxime Steinhausser <maxime.steinhausser@gmail.com>
- */
-class NoConfigurationException extends \RuntimeException implements ExceptionInterface
-{
-}

+ 1 - 1
vendor/symfony/options-resolver/LICENSE

@@ -1,4 +1,4 @@
-Copyright (c) 2004-2018 Fabien Potencier
+Copyright (c) 2004-2017 Fabien Potencier
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 33 - 75
vendor/symfony/options-resolver/OptionsResolver.php

@@ -28,21 +28,29 @@ class OptionsResolver implements Options
 {
     /**
      * The names of all defined options.
+     *
+     * @var array
      */
     private $defined = array();
 
     /**
      * The default option values.
+     *
+     * @var array
      */
     private $defaults = array();
 
     /**
      * The names of required options.
+     *
+     * @var array
      */
     private $required = array();
 
     /**
      * The resolved option values.
+     *
+     * @var array
      */
     private $resolved = array();
 
@@ -55,16 +63,22 @@ class OptionsResolver implements Options
 
     /**
      * A list of accepted values for each option.
+     *
+     * @var array
      */
     private $allowedValues = array();
 
     /**
      * A list of accepted types for each option.
+     *
+     * @var array
      */
     private $allowedTypes = array();
 
     /**
      * A list of closures for evaluating lazy options.
+     *
+     * @var array
      */
     private $lazy = array();
 
@@ -72,6 +86,8 @@ class OptionsResolver implements Options
      * A list of lazy options whose closure is currently being called.
      *
      * This list helps detecting circular dependencies between lazy options.
+     *
+     * @var array
      */
     private $calling = array();
 
@@ -82,6 +98,8 @@ class OptionsResolver implements Options
      * necessary in order to avoid inconsistencies during the resolving
      * process. If any option is changed after being read, all evaluated
      * lazy options that depend on this option would become invalid.
+     *
+     * @var bool
      */
     private $locked = false;
 
@@ -774,12 +792,21 @@ class OptionsResolver implements Options
         // Validate the type of the resolved option
         if (isset($this->allowedTypes[$option])) {
             $valid = false;
-            $invalidTypes = array();
 
             foreach ($this->allowedTypes[$option] as $type) {
                 $type = isset(self::$typeAliases[$type]) ? self::$typeAliases[$type] : $type;
 
-                if ($valid = $this->verifyTypes($type, $value, $invalidTypes)) {
+                if (function_exists($isFunction = 'is_'.$type)) {
+                    if ($isFunction($value)) {
+                        $valid = true;
+                        break;
+                    }
+
+                    continue;
+                }
+
+                if ($value instanceof $type) {
+                    $valid = true;
                     break;
                 }
             }
@@ -791,7 +818,7 @@ class OptionsResolver implements Options
                     $option,
                     $this->formatValue($value),
                     implode('" or "', $this->allowedTypes[$option]),
-                    implode('|', array_keys($invalidTypes))
+                    $this->formatTypeOf($value)
                 ));
             }
         }
@@ -869,45 +896,6 @@ class OptionsResolver implements Options
     }
 
     /**
-     * @param string $type
-     * @param mixed  $value
-     * @param array  &$invalidTypes
-     *
-     * @return bool
-     */
-    private function verifyTypes($type, $value, array &$invalidTypes)
-    {
-        if ('[]' === substr($type, -2) && is_array($value)) {
-            $originalType = $type;
-            $type = substr($type, 0, -2);
-            $invalidValues = array_filter( // Filter out valid values, keeping invalid values in the resulting array
-                $value,
-                function ($value) use ($type) {
-                    return !self::isValueValidType($type, $value);
-                }
-            );
-
-            if (!$invalidValues) {
-                return true;
-            }
-
-            $invalidTypes[$this->formatTypeOf($value, $originalType)] = true;
-
-            return false;
-        }
-
-        if (self::isValueValidType($type, $value)) {
-            return true;
-        }
-
-        if (!$invalidTypes) {
-            $invalidTypes[$this->formatTypeOf($value, null)] = true;
-        }
-
-        return false;
-    }
-
-    /**
      * Returns whether a resolved option with the given name exists.
      *
      * @param string $option The option name
@@ -975,38 +963,13 @@ class OptionsResolver implements Options
      * parameters should usually not be included in messages aimed at
      * non-technical people.
      *
-     * @param mixed  $value The value to return the type of
-     * @param string $type
+     * @param mixed $value The value to return the type of
      *
      * @return string The type of the value
      */
-    private function formatTypeOf($value, $type)
+    private function formatTypeOf($value)
     {
-        $suffix = '';
-
-        if ('[]' === substr($type, -2)) {
-            $suffix = '[]';
-            $type = substr($type, 0, -2);
-            while ('[]' === substr($type, -2)) {
-                $type = substr($type, 0, -2);
-                $value = array_shift($value);
-                if (!is_array($value)) {
-                    break;
-                }
-                $suffix .= '[]';
-            }
-
-            if (is_array($value)) {
-                $subTypes = array();
-                foreach ($value as $val) {
-                    $subTypes[$this->formatTypeOf($val, null)] = true;
-                }
-
-                return implode('|', array_keys($subTypes)).$suffix;
-            }
-        }
-
-        return (is_object($value) ? get_class($value) : gettype($value)).$suffix;
+        return is_object($value) ? get_class($value) : gettype($value);
     }
 
     /**
@@ -1073,9 +1036,4 @@ class OptionsResolver implements Options
 
         return implode(', ', $values);
     }
-
-    private static function isValueValidType($type, $value)
-    {
-        return (function_exists($isFunction = 'is_'.$type) && $isFunction($value)) || $value instanceof $type;
-    }
 }

+ 0 - 203
vendor/symfony/options-resolver/Tests/Debug/OptionsResolverIntrospectorTest.php

@@ -1,203 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\OptionsResolver\Tests\Debug;
-
-use PHPUnit\Framework\TestCase;
-use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector;
-use Symfony\Component\OptionsResolver\Options;
-use Symfony\Component\OptionsResolver\OptionsResolver;
-
-class OptionsResolverIntrospectorTest extends TestCase
-{
-    public function testGetDefault()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefault($option = 'foo', 'bar');
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getDefault($option));
-    }
-
-    public function testGetDefaultNull()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefault($option = 'foo', null);
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertNull($debug->getDefault($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\NoConfigurationException
-     * @expectedExceptionMessage No default value was set for the "foo" option.
-     */
-    public function testGetDefaultThrowsOnNoConfiguredValue()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefined($option = 'foo');
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getDefault($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
-     * @expectedExceptionMessage The option "foo" does not exist.
-     */
-    public function testGetDefaultThrowsOnNotDefinedOption()
-    {
-        $resolver = new OptionsResolver();
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getDefault('foo'));
-    }
-
-    public function testGetLazyClosures()
-    {
-        $resolver = new OptionsResolver();
-        $closures = array();
-        $resolver->setDefault($option = 'foo', $closures[] = function (Options $options) {});
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame($closures, $debug->getLazyClosures($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\NoConfigurationException
-     * @expectedExceptionMessage No lazy closures were set for the "foo" option.
-     */
-    public function testGetLazyClosuresThrowsOnNoConfiguredValue()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefined($option = 'foo');
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getLazyClosures($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
-     * @expectedExceptionMessage The option "foo" does not exist.
-     */
-    public function testGetLazyClosuresThrowsOnNotDefinedOption()
-    {
-        $resolver = new OptionsResolver();
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getLazyClosures('foo'));
-    }
-
-    public function testGetAllowedTypes()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefined($option = 'foo');
-        $resolver->setAllowedTypes($option = 'foo', $allowedTypes = array('string', 'bool'));
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame($allowedTypes, $debug->getAllowedTypes($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\NoConfigurationException
-     * @expectedExceptionMessage No allowed types were set for the "foo" option.
-     */
-    public function testGetAllowedTypesThrowsOnNoConfiguredValue()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefined($option = 'foo');
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getAllowedTypes($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
-     * @expectedExceptionMessage The option "foo" does not exist.
-     */
-    public function testGetAllowedTypesThrowsOnNotDefinedOption()
-    {
-        $resolver = new OptionsResolver();
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getAllowedTypes('foo'));
-    }
-
-    public function testGetAllowedValues()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefined($option = 'foo');
-        $resolver->setAllowedValues($option = 'foo', $allowedValues = array('bar', 'baz'));
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame($allowedValues, $debug->getAllowedValues($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\NoConfigurationException
-     * @expectedExceptionMessage No allowed values were set for the "foo" option.
-     */
-    public function testGetAllowedValuesThrowsOnNoConfiguredValue()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefined($option = 'foo');
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getAllowedValues($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
-     * @expectedExceptionMessage The option "foo" does not exist.
-     */
-    public function testGetAllowedValuesThrowsOnNotDefinedOption()
-    {
-        $resolver = new OptionsResolver();
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getAllowedValues('foo'));
-    }
-
-    public function testGetNormalizer()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefined($option = 'foo');
-        $resolver->setNormalizer($option = 'foo', $normalizer = function () {});
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame($normalizer, $debug->getNormalizer($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\NoConfigurationException
-     * @expectedExceptionMessage No normalizer was set for the "foo" option.
-     */
-    public function testGetNormalizerThrowsOnNoConfiguredValue()
-    {
-        $resolver = new OptionsResolver();
-        $resolver->setDefined($option = 'foo');
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getNormalizer($option));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
-     * @expectedExceptionMessage The option "foo" does not exist.
-     */
-    public function testGetNormalizerThrowsOnNotDefinedOption()
-    {
-        $resolver = new OptionsResolver();
-
-        $debug = new OptionsResolverIntrospector($resolver);
-        $this->assertSame('bar', $debug->getNormalizer('foo'));
-    }
-}

+ 6 - 100
vendor/symfony/options-resolver/Tests/OptionsResolverTest.php

@@ -486,15 +486,6 @@ class OptionsResolverTest extends TestCase
         $this->resolver->setAllowedTypes('foo', 'string');
     }
 
-    public function testResolveTypedArray()
-    {
-        $this->resolver->setDefined('foo');
-        $this->resolver->setAllowedTypes('foo', 'string[]');
-        $options = $this->resolver->resolve(array('foo' => array('bar', 'baz')));
-
-        $this->assertSame(array('foo' => array('bar', 'baz')), $options);
-    }
-
     /**
      * @expectedException \Symfony\Component\OptionsResolver\Exception\AccessException
      */
@@ -510,65 +501,6 @@ class OptionsResolverTest extends TestCase
     }
 
     /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
-     * @expectedExceptionMessage The option "foo" with value array is expected to be of type "int[]", but is of type "DateTime[]".
-     */
-    public function testResolveFailsIfInvalidTypedArray()
-    {
-        $this->resolver->setDefined('foo');
-        $this->resolver->setAllowedTypes('foo', 'int[]');
-
-        $this->resolver->resolve(array('foo' => array(new \DateTime())));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
-     * @expectedExceptionMessage The option "foo" with value "bar" is expected to be of type "int[]", but is of type "string".
-     */
-    public function testResolveFailsWithNonArray()
-    {
-        $this->resolver->setDefined('foo');
-        $this->resolver->setAllowedTypes('foo', 'int[]');
-
-        $this->resolver->resolve(array('foo' => 'bar'));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
-     * @expectedExceptionMessage The option "foo" with value array is expected to be of type "int[]", but is of type "integer|stdClass|array|DateTime[]".
-     */
-    public function testResolveFailsIfTypedArrayContainsInvalidTypes()
-    {
-        $this->resolver->setDefined('foo');
-        $this->resolver->setAllowedTypes('foo', 'int[]');
-        $values = range(1, 5);
-        $values[] = new \stdClass();
-        $values[] = array();
-        $values[] = new \DateTime();
-        $values[] = 123;
-
-        $this->resolver->resolve(array('foo' => $values));
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
-     * @expectedExceptionMessage The option "foo" with value array is expected to be of type "int[][]", but is of type "double[][]".
-     */
-    public function testResolveFailsWithCorrectLevelsButWrongScalar()
-    {
-        $this->resolver->setDefined('foo');
-        $this->resolver->setAllowedTypes('foo', 'int[][]');
-
-        $this->resolver->resolve(
-            array(
-                'foo' => array(
-                    array(1.2),
-                ),
-            )
-        );
-    }
-
-    /**
      * @dataProvider provideInvalidTypes
      */
     public function testResolveFailsIfInvalidType($actualType, $allowedType, $exceptionMessage)
@@ -636,32 +568,6 @@ class OptionsResolverTest extends TestCase
         $this->assertNotEmpty($this->resolver->resolve());
     }
 
-    public function testResolveSucceedsIfTypedArray()
-    {
-        $this->resolver->setDefault('foo', null);
-        $this->resolver->setAllowedTypes('foo', array('null', 'DateTime[]'));
-
-        $data = array(
-            'foo' => array(
-                new \DateTime(),
-                new \DateTime(),
-            ),
-        );
-        $result = $this->resolver->resolve($data);
-        $this->assertEquals($data, $result);
-    }
-
-    /**
-     * @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
-     */
-    public function testResolveFailsIfNotInstanceOfClass()
-    {
-        $this->resolver->setDefault('foo', 'bar');
-        $this->resolver->setAllowedTypes('foo', '\stdClass');
-
-        $this->resolver->resolve();
-    }
-
     ////////////////////////////////////////////////////////////////////////////
     // addAllowedTypes()
     ////////////////////////////////////////////////////////////////////////////
@@ -1513,12 +1419,12 @@ class OptionsResolverTest extends TestCase
         });
 
         $this->resolver->setDefault('lazy2', function (Options $options) {
-            Assert::assertArrayHasKey('default1', $options);
-            Assert::assertArrayHasKey('default2', $options);
-            Assert::assertArrayHasKey('required', $options);
-            Assert::assertArrayHasKey('lazy1', $options);
-            Assert::assertArrayHasKey('lazy2', $options);
-            Assert::assertArrayNotHasKey('defined', $options);
+            Assert::assertTrue(isset($options['default1']));
+            Assert::assertTrue(isset($options['default2']));
+            Assert::assertTrue(isset($options['required']));
+            Assert::assertTrue(isset($options['lazy1']));
+            Assert::assertTrue(isset($options['lazy2']));
+            Assert::assertFalse(isset($options['defined']));
 
             Assert::assertSame(0, $options['default1']);
             Assert::assertSame(42, $options['default2']);

+ 2 - 2
vendor/symfony/options-resolver/composer.json

@@ -16,7 +16,7 @@
         }
     ],
     "require": {
-        "php": "^5.5.9|>=7.0.8"
+        "php": ">=5.5.9"
     },
     "autoload": {
         "psr-4": { "Symfony\\Component\\OptionsResolver\\": "" },
@@ -27,7 +27,7 @@
     "minimum-stability": "dev",
     "extra": {
         "branch-alias": {
-            "dev-master": "3.4-dev"
+            "dev-master": "3.3-dev"
         }
     }
 }

+ 1 - 0
vendor/zoujingli/wechat-developer/.gitignore

@@ -3,3 +3,4 @@
 /.DS_Store
 /vendor
 /Cache
+/Test/cert

+ 3 - 3
vendor/zoujingli/wechat-developer/Test/config.php

@@ -19,10 +19,10 @@ return [
     'encodingaeskey' => 'BJIUzE0gqlWy0GxfPp4J1oPTBmOrNDIGPNav1YFH5Z5',
     // 配置商户支付参数
     'mch_id'         => "1332187001",
-    'mch_key'        => '11bd3d66d85f322a1e803cb587d18c3f',
+    'mch_key'        => 'A82DC5BD1F3359081049C568D8502BC5',
     // 配置商户支付双向证书目录
-    'ssl_key'        => '',
-    'ssl_cer'        => '',
+    'ssl_key'        => __DIR__ . DIRECTORY_SEPARATOR . 'cert' . DIRECTORY_SEPARATOR . 'apiclient_key.pem',
+    'ssl_cer'        => __DIR__ . DIRECTORY_SEPARATOR . 'cert' . DIRECTORY_SEPARATOR . 'apiclient_cert.pem',
     // 配置缓存目录,需要拥有写权限
     'cache_path'     => '',
 ];

+ 44 - 0
vendor/zoujingli/wechat-developer/Test/pay-transfers-create.php

@@ -0,0 +1,44 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | WeChatDeveloper
+// +----------------------------------------------------------------------
+// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
+// +----------------------------------------------------------------------
+// | 官方网站: http://think.ctolog.com
+// +----------------------------------------------------------------------
+// | 开源协议 ( https://mit-license.org )
+// +----------------------------------------------------------------------
+// | github开源项目:https://github.com/zoujingli/WeChatDeveloper
+// +----------------------------------------------------------------------
+
+try {
+
+    // 1. 手动加载入口文件
+    include "../include.php";
+
+    // 2. 准备公众号配置参数
+    $config = include "./config.php";
+
+    // 3. 创建接口实例
+    $wechat = new \WeChat\Pay($config);
+
+    // 4. 组装参数,可以参考官方商户文档
+    $options = [
+        'partner_trade_no' => time(),
+        'openid'           => 'o38gps3vNdCqaggFfrBRCRikwlWY',
+        'check_name'       => 'NO_CHECK',
+        'amount'           => '100',
+        'desc'             => '企业付款操作说明信息',
+        'spbill_create_ip' => '127.0.0.1',
+    ];
+    $result = $wechat->createTransfers($options);
+    echo '<pre>';
+    var_export($result);
+
+} catch (Exception $e) {
+
+    // 出错啦,处理下吧
+    echo $e->getMessage() . PHP_EOL;
+
+}

+ 44 - 0
vendor/zoujingli/wechat-developer/Test/pay-transfersbank-create.php

@@ -0,0 +1,44 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | WeChatDeveloper
+// +----------------------------------------------------------------------
+// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
+// +----------------------------------------------------------------------
+// | 官方网站: http://think.ctolog.com
+// +----------------------------------------------------------------------
+// | 开源协议 ( https://mit-license.org )
+// +----------------------------------------------------------------------
+// | github开源项目:https://github.com/zoujingli/WeChatDeveloper
+// +----------------------------------------------------------------------
+
+try {
+
+    // 1. 手动加载入口文件
+    include "../include.php";
+
+    // 2. 准备公众号配置参数
+    $config = include "./config.php";
+
+    // 3. 创建接口实例
+    $wechat = new \WeChat\Pay($config);
+
+    // 4. 组装参数,可以参考官方商户文档
+    $options = [
+        'partner_trade_no' => time(),
+        'enc_bank_no'      => '6212263602037318102',
+        'enc_true_name'    => '邹景立',
+        'bank_code'        => '1002',
+        'amount'           => '100',
+        'desc'             => '打款测试',
+    ];
+    echo '<pre>';
+    $result = $wechat->createTransfersBank($options);
+    var_export($result);
+
+} catch (Exception $e) {
+
+    // 出错啦,处理下吧
+    echo $e->getMessage() . PHP_EOL;
+
+}

+ 0 - 3
vendor/zoujingli/wechat-developer/WeChat/Menu.php

@@ -59,9 +59,6 @@ class Menu extends BasicWeChat
      */
     public function create(array $data)
     {
-        try {
-        } catch (\Exception $e) {
-        }
         $url = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN";
         $this->registerApi($url, __FUNCTION__, func_get_args());
         return $this->httpPostForJson($url, $data);

+ 102 - 6
vendor/zoujingli/wechat-developer/WeChat/Pay.php

@@ -17,6 +17,7 @@ namespace WeChat;
 use WeChat\Contracts\DataArray;
 use WeChat\Contracts\Tools;
 use WeChat\Exceptions\InvalidArgumentException;
+use WeChat\Exceptions\InvalidDecryptException;
 use WeChat\Exceptions\InvalidResponseException;
 
 /**
@@ -228,10 +229,14 @@ class Pay
      * 企业付款到零钱
      * @param array $options
      * @return array
-     * @throws InvalidResponseException
+     * @throws Exceptions\InvalidResponseException
      */
     public function createTransfers(array $options)
     {
+        $this->params->set('mchid', $this->config->get('mch_id'));
+        $this->params->set('mch_appid', $this->config->get('appid'));
+        $this->params->offsetUnset('appid');
+        $this->params->offsetUnset('mch_id');
         $url = 'https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers';
         return $this->callPostApi($url, $options, true, 'MD5', false);
     }
@@ -249,6 +254,98 @@ class Pay
     }
 
     /**
+     * 企业付款到银行卡
+     * @param array $options
+     * @return array
+     * @throws Exceptions\LocalCacheException
+     * @throws Exceptions\InvalidDecryptException
+     * @throws Exceptions\InvalidResponseException
+     */
+    public function createTransfersBank(array $options)
+    {
+        if (!isset($options['partner_trade_no'])) {
+            throw new InvalidArgumentException('Missing Options -- [partner_trade_no]');
+        }
+        if (!isset($options['enc_bank_no'])) {
+            throw new InvalidArgumentException('Missing Options -- [enc_bank_no]');
+        }
+        if (!isset($options['enc_true_name'])) {
+            throw new InvalidArgumentException('Missing Options -- [enc_true_name]');
+        }
+        if (!isset($options['bank_code'])) {
+            throw new InvalidArgumentException('Missing Options -- [bank_code]');
+        }
+        if (!isset($options['amount'])) {
+            throw new InvalidArgumentException('Missing Options -- [amount]');
+        }
+        isset($options['desc']) && $this->config['desc'] = $options['desc'];
+        $this->params->offsetUnset('appid');
+        return $this->callPostApi('https://api.mch.weixin.qq.com/mmpaysptrans/pay_bank', [
+            'amount'           => $options['amount'],
+            'bank_code'        => $options['bank_code'],
+            'partner_trade_no' => $options['partner_trade_no'],
+            'enc_bank_no'      => $this->rsaEncode($options['enc_bank_no']),
+            'enc_true_name'    => $this->rsaEncode($options['enc_true_name']),
+        ], true, 'MD5', false);
+    }
+
+    /**
+     * 商户企业付款到银行卡操作进行结果查询
+     * @param string $partner_trade_no 商户订单号,需保持唯一
+     * @return array
+     * @throws InvalidResponseException
+     */
+    public function queryTransFresBank($partner_trade_no)
+    {
+        $url = 'https://api.mch.weixin.qq.com/mmpaysptrans/query_bank';
+        return $this->callPostApi($url, ['partner_trade_no' => $partner_trade_no], true, 'MD5', false);
+    }
+
+    /**
+     * RSA加密处理
+     * @param string $string
+     * @param string $encrypted
+     * @return string
+     * @throws Exceptions\LocalCacheException
+     * @throws Exceptions\InvalidDecryptException
+     * @throws Exceptions\InvalidResponseException
+     */
+    private function rsaEncode($string, $encrypted = '')
+    {
+        $search = ['-----BEGIN RSA PUBLIC KEY-----', '-----END RSA PUBLIC KEY-----', "\n", "\r"];
+        $pkc1 = str_replace($search, '', $this->getRsaContent());
+        $publicKey = '-----BEGIN PUBLIC KEY-----' . PHP_EOL .
+            wordwrap('MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A' . $pkc1, 64, PHP_EOL, true) . PHP_EOL .
+            '-----END PUBLIC KEY-----';
+        if (!openssl_public_encrypt("{$string}", $encrypted, $publicKey, OPENSSL_PKCS1_OAEP_PADDING)) {
+            throw new InvalidDecryptException('Rsa Encrypt Error.');
+        }
+        return base64_encode($encrypted);
+    }
+
+    /**
+     * 获取签名文件内容
+     * @return string
+     * @throws Exceptions\LocalCacheException
+     * @throws Exceptions\InvalidResponseException
+     */
+    private function getRsaContent()
+    {
+        $cacheKey = "pub_ras_key_" . $this->config->get('mch_id');
+        if (($pub_key = Tools::getCache($cacheKey))) {
+            return $pub_key;
+        }
+        $data = $this->callPostApi('https://fraud.mch.weixin.qq.com/risk/getpublickey', [], true, 'MD5');
+        if (!isset($data['return_code']) || $data['return_code'] !== 'SUCCESS' || $data['result_code'] !== 'SUCCESS') {
+            $error = 'ResultError:' . $data['return_msg'];
+            $error .= isset($data['err_code_des']) ? ' - ' . $data['err_code_des'] : '';
+            throw new InvalidResponseException($error, 20000, $data);
+        }
+        Tools::setCache($cacheKey, $data['pub_key'], 600);
+        return $data['pub_key'];
+    }
+
+    /**
      * 获取微信支付通知
      * @return array
      * @throws InvalidResponseException
@@ -301,11 +398,10 @@ class Pay
         if ($isCert) {
             $option['ssl_cer'] = $this->config->get('ssl_cer');
             $option['ssl_key'] = $this->config->get('ssl_key');
-            foreach (['ssl_cer', 'ssl_key'] as $key) {
-                if (empty($option[$key]) || !file_exists($option[$key])) {
-                    throw new InvalidArgumentException("Missing Config -- [{$key}]", '0');
-                }
-            }
+            if (empty($option['ssl_cer']) || !file_exists($option['ssl_cer']))
+                throw new InvalidArgumentException("Missing Config -- ssl_cer", '0');
+            if (empty($option['ssl_key']) || !file_exists($option['ssl_key']))
+                throw new InvalidArgumentException("Missing Config -- ssl_key", '0');
         }
         $params = $this->params->merge($data);
         $needSignType && ($params['sign_type'] = strtoupper($signType));

+ 87 - 0
vendor/zoujingli/weopen-developer/WeChat/Mini.php

@@ -0,0 +1,87 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | WeChatDeveloper
+// +----------------------------------------------------------------------
+// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
+// +----------------------------------------------------------------------
+// | 官方网站: http://think.ctolog.com
+// +----------------------------------------------------------------------
+// | 开源协议 ( https://mit-license.org )
+// +----------------------------------------------------------------------
+// | github开源项目:https://github.com/zoujingli/WeChatDeveloper
+// +----------------------------------------------------------------------
+
+namespace WeChat;
+
+use WeChat\Contracts\BasicWeChat;
+
+/**
+ * 小程序管理权限集
+ * Class Mini
+ * @package WeChat
+ */
+class Mini extends BasicWeChat
+{
+    /**
+     * 1. 获取公众号关联的小程序
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function getLinkWxamp()
+    {
+        $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/wxamplinkget?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, [], true);
+    }
+
+    /**
+     * 2. 关联小程序
+     * @param string $miniAppid 小程序appid
+     * @param integer $notifyUsers 是否发送模板消息通知公众号粉丝
+     * @param integer $showProfile 是否展示公众号主页中
+     * @return array
+     * @throws Exceptions\InvalidResponseException
+     * @throws Exceptions\LocalCacheException
+     */
+    public function linkWxamp($miniAppid, $notifyUsers = 1, $showProfile = 1)
+    {
+        $url = "https://api.weixin.qq.com/cgi-bin/wxopen/wxamplink?access_token=ACCESS_TOKEN";
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, [
+            'appid'        => $miniAppid,
+            'notify_users' => $notifyUsers,
+            'show_profile' => $showProfile,
+        ]);
+    }
+
+    /**
+     * 3.解除已关联的小程序
+     * @param string $miniAppid 小程序appid
+     * @return array
+     * @throws Exceptions\InvalidResponseException
+     * @throws Exceptions\LocalCacheException
+     */
+    public function unlinkWxamp($miniAppid)
+    {
+        $url = "https://api.weixin.qq.com/cgi-bin/wxopen/wxampunlink?access_token=ACCESS_TOKEN";
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['appid' => $miniAppid]);
+    }
+
+    /**
+     * 第三方平台调用快速注册API完成注册
+     * @param string $ticket 公众号扫码授权的凭证(公众平台扫码页面回跳到第三方平台时携带)
+     * @return array
+     * @throws Exceptions\InvalidResponseException
+     * @throws Exceptions\LocalCacheException
+     */
+    public function fastRegister($ticket)
+    {
+        $url = 'https://api.weixin.qq.com/cgi-bin/account/fastregister?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['ticket' => $ticket]);
+    }
+
+}

+ 198 - 0
vendor/zoujingli/weopen-developer/WeMini/Account.php

@@ -0,0 +1,198 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | WeChatDeveloper
+// +----------------------------------------------------------------------
+// | 版权所有 2014~2018 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
+// +----------------------------------------------------------------------
+// | 官方网站: http://think.ctolog.com
+// +----------------------------------------------------------------------
+// | 开源协议 ( https://mit-license.org )
+// +----------------------------------------------------------------------
+// | github开源项目:https://github.com/zoujingli/WeChatDeveloper
+// +----------------------------------------------------------------------
+
+namespace WeMini;
+
+use WeChat\Contracts\BasicWeChat;
+
+/**
+ * 微信小程序账号管理
+ * Class Account
+ * @package WeMini
+ */
+class Account extends BasicWeChat
+{
+    /**
+     * 2.1 获取帐号基本信息
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function getAccountBasicinfo()
+    {
+        $url = 'https://api.weixin.qq.com/cgi-bin/account/getaccountbasicinfo?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpGetForJson($url);
+    }
+
+    /**
+     * 2.2 小程序名称设置及改名
+     * @param array $data
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function setNickname(array $data)
+    {
+        $url = 'https://api.weixin.qq.com/wxa/setnickname?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, $data);
+    }
+
+    /**
+     * 2.3 小程序改名审核状态查询
+     * @param integer $audit_id 审核单id
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function queryChangeNicknameAuditStatus($audit_id)
+    {
+        $url = "https://api.weixin.qq.com/wxa/api_wxa_querynickname?access_token=ACCESS_TOKEN";
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['audit_id' => $audit_id]);
+    }
+
+    /**
+     *
+     * 2.4 微信认证名称检测
+     * @param string $nickname 微信认证名称
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function checkWxVerifyNickname($nickname)
+    {
+        $url = "https://api.weixin.qq.com/wxa/api_wxa_querynickname?access_token=ACCESS_TOKEN";
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['nick_name' => $nickname]);
+    }
+
+    /**
+     * 2.5 修改头像
+     * @param string $headImgMediaId 头像素材media_id
+     * @param integer $x1 裁剪框左上角x坐标(取值范围:[0, 1])
+     * @param integer $y1 裁剪框左上角y坐标(取值范围:[0, 1])
+     * @param integer $x2 裁剪框右下角x坐标(取值范围:[0, 1])
+     * @param integer $y2 裁剪框右下角y坐标(取值范围:[0, 1])
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function modifyHeadImage($headImgMediaId, $x1 = 0, $y1 = 0, $x2 = 1, $y2 = 1)
+    {
+        $url = "https://api.weixin.qq.com/cgi-bin/account/modifyheadimage?access_token=ACCESS_TOKEN";
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['head_img_media_id' => $headImgMediaId]);
+    }
+
+    /**
+     * 2.6 修改功能介绍
+     * @param string $signature 功能介绍(简介)
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException]
+     */
+    public function modifySignature($signature)
+    {
+        $url = "https://api.weixin.qq.com/cgi-bin/account/modifysignature?access_token=ACCESS_TOKEN";
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['signature' => $signature]);
+    }
+
+    /**
+     * 2.7.3跳转至第三方平台,第三方平台调用快速注册API完成管理员换绑。
+     * @param string $taskid 换绑管理员任务序列号(公众平台最终点击提交回跳到第三方平台时携带)
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function componentreBindAdmin($taskid)
+    {
+        $url = 'https://api.weixin.qq.com/cgi- bin/account/componentrebindadmin?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['taskid' => $taskid]);
+    }
+
+    /**
+     * 3.1 获取账号可以设置的所有类目
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function getAllCategories()
+    {
+        $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/getallcategories?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpGetForJson($url);
+    }
+
+    /**
+     * 3.2 添加类目
+     * @param array $categories
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function addCategory($categories)
+    {
+        $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/addcategory?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['categories' => $categories]);
+    }
+
+    /**
+     * 3.3 删除类目
+     * @param string $first 一级类目ID
+     * @param string $second 二级类目ID
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function delCategroy($first, $second)
+    {
+        $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/deletecategory?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['first' => $first, 'second' => $second]);
+    }
+
+    /**
+     * 3.4 获取账号已经设置的所有类目
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function getCategory()
+    {
+        $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/getcategory?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpGetForJson($url);
+    }
+
+    /**
+     * 3.5 修改类目
+     * @param string $first 一级类目ID
+     * @param string $second 二级类目ID
+     * @param array $certicates
+     * @return array
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function modifyCategory($first, $second, $certicates)
+    {
+        $url = 'https://api.weixin.qq.com/cgi-bin/wxopen/modifycategory?access_token=ACCESS_TOKEN';
+        $this->registerApi($url, __FUNCTION__, func_get_args());
+        return $this->httpPostForJson($url, ['first' => $first, 'second' => $second, 'categories' => $categories]);
+    }
+}

+ 29 - 0
vendor/zoujingli/weopen-developer/WeOpen/MiniApp.php

@@ -40,4 +40,33 @@ class MiniApp extends Service
         return json_decode(Tools::get($url), true);
     }
 
+    /**
+     * 1.注册流程及接口说明
+     * @param string $authorizerAppid 公众号的appid
+     * @param integer $copyWxVerify 是否复用公众号的资质进行微信认证(1:申请复用资质进行微信 认证 0:不申请)
+     * @param string $redirectUri 用户扫码授权后,MP 扫码页面将跳转到该地址(注:1.链接需 urlencode 2.Host 需和第三方平台在微信开放平台上面填写的登 录授权的发起页域名一致)
+     * @return string
+     */
+    public function getCopyRegisterMiniUrl($authorizerAppid, $copyWxVerify, $redirectUri)
+    {
+        $redirectUri = urlencode($redirectUri);
+        $componentAppid = $this->config->get('component_appid');
+        return "https://mp.weixin.qq.com/cgi-bin/fastregisterauth?appid={$authorizerAppid}&component_appid={$componentAppid}&copy_wx_verify={$copyWxVerify}&redirect_uri={$redirectUri}";
+    }
+
+
+    /**
+     * 2.7.1 从第三方平台跳转至微信公众平台授权注册页面
+     * @param string $authorizerAppid 公众号的 appid
+     * @param string $redirectUri 新管理员信息填写完成点击提交后,将跳转到该地址
+     * @return string
+     */
+    public function getComponentreBindAdmin($authorizerAppid, $redirectUri)
+    {
+        $redirectUri = urlencode($redirectUri);
+        $componentAppid = $this->config->get('component_appid');
+        return "https://mp.weixin.qq.com/wxopen/componentrebindadmin?appid={$authorizerAppid}&component_appid={$componentAppid}&redirect_uri={$redirectUri}";
+    }
+
+
 }

+ 21 - 2
vendor/zoujingli/weopen-developer/WeOpen/Service.php

@@ -269,8 +269,27 @@ class Service
         $component_appid = $this->config->get('component_appid');
         $component_access_token = $this->getComponentAccessToken();
         $url = "https://api.weixin.qq.com/sns/oauth2/component/access_token?appid={$authorizer_appid}&code={$_GET['code']}&grant_type=authorization_code&component_appid={$component_appid}&component_access_token={$component_access_token}";
-        $result = $this->httpGetForJson($url);
-        return $result !== false ? $result : false;
+        return $this->httpGetForJson($url);
+    }
+
+    /**
+     * 取当前所有已授权的帐号基本信息
+     * @param integer $count 拉取数量,最大为500
+     * @param integer $offset 偏移位置/起始位置
+     * @return array|bool
+     * @throws \WeChat\Exceptions\InvalidResponseException
+     * @throws \WeChat\Exceptions\LocalCacheException
+     */
+    public function getAuthorizerList($count = 500, $offset = 0)
+    {
+        $component_appid = $this->config->get('component_appid');
+        $component_access_token = $this->getComponentAccessToken();
+        $url = "https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_list?component_access_token={$component_access_token}";
+        return $this->httpPostForJson($url, [
+            'count'           => $count,
+            'offset'          => $offset,
+            'component_appid' => $component_appid,
+        ]);
     }
 
     /**

+ 1 - 0
vendor/zoujingli/weopen-developer/composer.json

@@ -25,6 +25,7 @@
   "autoload": {
     "psr-4": {
       "WeOpen\\": "WeOpen",
+	  "WeChat\\": "WeChat",
       "WeMini\\": "WeMini"
     }
   }