123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- <?php
- /*
- * This file is part of the overtrue/laravel-wechat.
- *
- * (c) overtrue <i@overtrue.me>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
- return [
- /*
- * 默认配置,将会合并到各模块中
- */
- 'defaults' => [
- /*
- * 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
- */
- 'response_type' => 'array',
- /*
- * 使用 Laravel 的缓存系统
- */
- 'use_laravel_cache' => true,
- /*
- * 日志配置
- *
- * level: 日志级别,可选为:
- * debug/info/notice/warning/error/critical/alert/emergency
- * file:日志文件位置(绝对路径!!!),要求可写权限
- */
- 'log' => [
- 'level' => env('WECHAT_LOG_LEVEL', 'debug'),
- 'file' => env('WECHAT_LOG_FILE', storage_path('logs/wechat.log')),
- ],
- ],
- /*
- * 路由配置
- */
- 'route' => [
- /*
- * 开放平台第三方平台路由配置
- */
- // 'open_platform' => [
- // 'uri' => 'serve',
- // 'action' => Overtrue\LaravelWeChat\Controllers\OpenPlatformController::class,
- // 'attributes' => [
- // 'prefix' => 'open-platform',
- // 'middleware' => null,
- // ],
- // ],
- ],
- /*
- * 公众号
- */
- 'official_account' => [
- 'ximengnaikang' => [//西蒙耐抗
- 'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', 'wx22dc4d8cbc0a192d'), // 测试AppID
- 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', 'c79e6d7f3ba6ca9b5e42421923f17824'), // AppSecret
- 'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', ''), // Token
- 'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', 'vCHY5IdYC8fGzs4Hc7jDx4dO1xhzfkXxmwuRiw9cBwx'),
- ],
- 'jiuweiyun' => [
- //测试
- 'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', 'wxd684a5cf4af0a810'), // AppID
- 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', '60d4420ae0bd70597621808b09934ff2'), // AppSecret
- 'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', 'daweiboshi'), // Token
- 'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', 'vCHY5IdYC8fGzs4Hc7jDx4dO1xhzfkXxmwuRiw9cBwx'),
- ],
- 'daweiboshi' => [
- 'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', 'wx5224793b7dc7f7b7'), // 线上AppID
- 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', '400c15dfd1338b941341993afa651ca6'), // AppSecret
- 'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', 'DavidWechat'), // Token
- 'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', 'MmRfn5oyd3IjtJbVbTzfil232AERUSnc0z4nqIiZC57'),
- ],
- 'default' => [
- 'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', 'wx2d43c63789323978'), // AppID
- 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', 'd7a3fe5f5a8f41c5a534ca1da9fc7cf0'), // AppSecret
- 'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', ''), // Token // EncodingAESKey
- 'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', ''), // EncodingAESKey
- 'response_type' => 'array',
- /**
- * 日志配置
- *
- * level: 日志级别, 可选为:
- * debug/info/notice/warning/error/critical/alert/emergency
- * path:日志文件位置(绝对路径!!!),要求可写权限
- */
- 'log' => [
- 'default' => 'dev', // 默认使用的 channel,生产环境可以改为下面的 prod
- 'channels' => [
- // 测试环境
- 'dev' => [
- 'driver' => 'single',
- 'path' => '/tmp/easywechat.log',
- 'level' => 'debug',
- ],
- // 生产环境
- 'prod' => [
- 'driver' => 'daily',
- 'path' => '/tmp/easywechat.log',
- 'level' => 'debug',
- ],
- ],
- ],
- /**
- * 接口请求相关配置,超时时间等,具体可用参数请参考:
- * http://docs.guzzlephp.org/en/stable/request-config.html
- *
- * - retries: 重试次数,默认 1,指定当 http 请求失败时重试的次数。
- * - retry_delay: 重试延迟间隔(单位:ms),默认 500
- * - log_template: 指定 HTTP 日志模板,请参考:https://github.com/guzzle/guzzle/blob/master/src/MessageFormatter.php
- */
- 'http' => [
- 'max_retries' => 10,
- 'retry_delay' => 50,
- 'timeout' => 5.0,
- // 'base_uri' => 'https://api.weixin.qq.com/', // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri
- ],
- /*
- * OAuth 配置
- *
- * scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
- * callback:OAuth授权完成后的回调页地址(如果使用中间件,则随便填写。。。)
- */
- // 'oauth' => [
- // 'scopes' => array_map('trim', explode(',', env('WECHAT_OFFICIAL_ACCOUNT_OAUTH_SCOPES', 'snsapi_userinfo'))),
- // 'callback' => env('WECHAT_OFFICIAL_ACCOUNT_OAUTH_CALLBACK', '/examples/oauth_callback.php'),
- // ],
- ],
- ],
- /*
- * 开放平台第三方平台
- */
- 'open_platform' => [
- 'default' => [
- 'app_id' => env('WECHAT_OPEN_PLATFORM_APPID', ''),
- 'secret' => env('WECHAT_OPEN_PLATFORM_SECRET', ''),
- 'token' => env('WECHAT_OPEN_PLATFORM_TOKEN', ''),
- 'aes_key' => env('WECHAT_OPEN_PLATFORM_AES_KEY', ''),
- ],
- ],
- /*
- * 小程序
- */
- 'mini_program' => [
- 'default' => [
- 'app_id' => env('WECHAT_MINI_PROGRAM_APPID', 'wxf536016d4923e584'),
- 'secret' => env('WECHAT_MINI_PROGRAM_SECRET', '553f627cbb015f51b49edc153ed5f493'),
- 'token' => env('WECHAT_MINI_PROGRAM_TOKEN', ''),
- 'aes_key' => env('WECHAT_MINI_PROGRAM_AES_KEY', ''),
- ],
- ],
- /*
- * 微信支付
- */
- 'payment' => [
- // 'default' => [
- // 'sandbox'=> env('WECHAT_PAYMENT_SANDBOX', false),
- // 'app_id'=> env('WECHAT_PAYMENT_APPID', 'wx22dc4d8cbc0a192d'),
- // //设置Api密钥
- // 'key'=> env('WECHAT_PAYMENT_KEY', 'i5fcaqSNELvVdf2wHqoSvJcBPUEzEQCZ'),
- // //商户平台API安全证书中下载,保存到服务器// XXX: 绝对路径!!!!
- // 'cert_path'=> env('WECHAT_PAYMENT_CERT_PATH', '/www/wwwroot/ceshi.api.woaidakele.cn/test-h5/xmnk_api_cert/apiclient_cert.pem'),
- // 'key_path'=> env('WECHAT_PAYMENT_KEY_PATH', '/www/wwwroot/ceshi.api.woaidakele.cn/test-h5/xmnk_api_cert/apiclient_key.pem'),
- // //服务商的商户号
- // 'mch_id'=> env('WECHAT_PAYMENT_MCH_ID', '1604585534'),
- // //APIv3密钥,商户平台API安全中获取
- // 'api_v3'=> env('WECHAT_PAYMENT_API_V3', 'plHeJH0LoCrHXMxxgtJD2rlGzkL7Xmpv'),
- // //商户证书的序列号,可在微信商户平台API安全 中获取
- // 'serial_no'=> env('WECHAT_PAYMENT_SERIAL_NO', '73024BD5FA3E83F39DC1EE36D53FF206F6B82289'),
- // //获取的文件临时保存到服务器
- // 'cert_pem'=> env('WECHAT_PAYMENT_CERT_PEM','/www/wwwroot/ceshi.api.woaidakele.cn/test-h5/cert/cert.pem'),
- // 'notify_url'=> 'http://ceshi.api.woaidakele.cn/payments/wechat-notify', // 默认支付结果通知地址
- // ],
- 'default' => [
- 'sandbox' => env('WECHAT_PAYMENT_SANDBOX', false),
- 'app_id' => env('WECHAT_PAYMENT_APPID', 'wx5224793b7dc7f7b7'),
- 'mch_id' => env('WECHAT_PAYMENT_MCH_ID', '1603992271'),
- 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', '400c15dfd1338b941341993afa651ca6'),
- 'key' => env('WECHAT_PAYMENT_KEY', 'GiB0bJNdF2QPpMZEL1qG2dMbv5V095nF'),
- 'api_v3' => env('WECHAT_PAYMENT_API_V3', 'plHeJH0LoCrHXMxxgtJD2rlGzkL7Xmpv'),
- 'serial_no' => env('WECHAT_PAYMENT_SERIAL_NO', '696B623841134292AAB48D4EC5907FB376504E98'),
- 'cert_path' => env('WECHAT_PAYMENT_CERT_PATH', '/www/wwwroot/api.app.jiuweiyun.cn/app-api/jwy_api_cert/apiclient_cert.pem'), // XXX: 绝对路径!!!!
- 'key_path' => env('WECHAT_PAYMENT_KEY_PATH', '/www/wwwroot/api.app.jiuweiyun.cn/app-api/jwy_api_cert/apiclient_key.pem'), // XXX: 绝对路径!!!!
- 'cert_pem' => env('WECHAT_PAYMENT_CERT_PEM','/www/wwwroot/api.app.jiuweiyun.cn/app-api/cert/cert.pem'),
- 'notify_url' => 'http://api.app.jiuweiyun.cn/payments/wechat-notify', // 默认支付结果通知地址
- ],
- ],
- /*
- * 企业微信
- */
- // 'work' => [
- // 'default' => [
- // 'corp_id' => 'xxxxxxxxxxxxxxxxx',
- // 'agent_id' => 100020,
- // 'secret' => env('WECHAT_WORK_AGENT_CONTACTS_SECRET', ''),
- // //...
- // ],
- // ],
- ];
|