wechat.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <?php
  2. /*
  3. * This file is part of the overtrue/laravel-wechat.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. return [
  11. /*
  12. * 默认配置,将会合并到各模块中
  13. */
  14. 'defaults' => [
  15. /*
  16. * 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
  17. */
  18. 'response_type' => 'array',
  19. /*
  20. * 使用 Laravel 的缓存系统
  21. */
  22. 'use_laravel_cache' => true,
  23. /*
  24. * 日志配置
  25. *
  26. * level: 日志级别,可选为:
  27. * debug/info/notice/warning/error/critical/alert/emergency
  28. * file:日志文件位置(绝对路径!!!),要求可写权限
  29. */
  30. 'log' => [
  31. 'level' => env('WECHAT_LOG_LEVEL', 'debug'),
  32. 'file' => env('WECHAT_LOG_FILE', storage_path('logs/wechat.log')),
  33. ],
  34. ],
  35. /*
  36. * 路由配置
  37. */
  38. 'route' => [
  39. /*
  40. * 开放平台第三方平台路由配置
  41. */
  42. // 'open_platform' => [
  43. // 'uri' => 'serve',
  44. // 'action' => Overtrue\LaravelWeChat\Controllers\OpenPlatformController::class,
  45. // 'attributes' => [
  46. // 'prefix' => 'open-platform',
  47. // 'middleware' => null,
  48. // ],
  49. // ],
  50. ],
  51. /*
  52. * 公众号
  53. */
  54. 'official_account' => [
  55. 'ximengnaikang' => [//西蒙耐抗
  56. 'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', 'wx22dc4d8cbc0a192d'), // 测试AppID
  57. 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', 'c79e6d7f3ba6ca9b5e42421923f17824'), // AppSecret
  58. 'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', ''), // Token
  59. 'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', 'vCHY5IdYC8fGzs4Hc7jDx4dO1xhzfkXxmwuRiw9cBwx'),
  60. ],
  61. 'jiuweiyun' => [
  62. //测试
  63. 'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', 'wxd684a5cf4af0a810'), // AppID
  64. 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', '60d4420ae0bd70597621808b09934ff2'), // AppSecret
  65. 'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', 'daweiboshi'), // Token
  66. 'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', 'vCHY5IdYC8fGzs4Hc7jDx4dO1xhzfkXxmwuRiw9cBwx'),
  67. ],
  68. 'daweiboshi' => [
  69. 'app_id' => env('WECHAT_OFFICIAL_ACCOUNT_APPID', 'wx5224793b7dc7f7b7'), // 线上AppID
  70. 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', '400c15dfd1338b941341993afa651ca6'), // AppSecret
  71. 'token' => env('WECHAT_OFFICIAL_ACCOUNT_TOKEN', 'DavidWechat'), // Token
  72. 'aes_key' => env('WECHAT_OFFICIAL_ACCOUNT_AES_KEY', 'MmRfn5oyd3IjtJbVbTzfil232AERUSnc0z4nqIiZC57'),
  73. ],
  74. ''
  75. ],
  76. /*
  77. * 开放平台第三方平台
  78. */
  79. // 'open_platform' => [
  80. // 'default' => [
  81. // 'app_id' => env('WECHAT_OPEN_PLATFORM_APPID', ''),
  82. // 'secret' => env('WECHAT_OPEN_PLATFORM_SECRET', ''),
  83. // 'token' => env('WECHAT_OPEN_PLATFORM_TOKEN', ''),
  84. // 'aes_key' => env('WECHAT_OPEN_PLATFORM_AES_KEY', ''),
  85. // ],
  86. // ],
  87. /*
  88. * 小程序
  89. */
  90. 'mini_program' => [
  91. 'default' => [
  92. 'app_id' => env('WECHAT_MINI_PROGRAM_APPID', 'wxf536016d4923e584'),
  93. 'secret' => env('WECHAT_MINI_PROGRAM_SECRET', '553f627cbb015f51b49edc153ed5f493'),
  94. 'token' => env('WECHAT_MINI_PROGRAM_TOKEN', ''),
  95. 'aes_key' => env('WECHAT_MINI_PROGRAM_AES_KEY', ''),
  96. ],
  97. ],
  98. // 'mini_program' => [
  99. // 'default' => [
  100. // 'app_id' => env('WECHAT_MINI_PROGRAM_APPID', ''),
  101. // 'secret' => env('WECHAT_MINI_PROGRAM_SECRET', ''),
  102. // 'token' => env('WECHAT_MINI_PROGRAM_TOKEN', ''),
  103. // 'aes_key' => env('WECHAT_MINI_PROGRAM_AES_KEY', ''),
  104. // ],
  105. // ],
  106. /*
  107. * 微信支付
  108. */
  109. 'payment' => [
  110. 'default' => [
  111. 'sandbox' => env('WECHAT_PAYMENT_SANDBOX', false),
  112. 'app_id' => env('WECHAT_PAYMENT_APPID', 'wx5224793b7dc7f7b7'),
  113. 'mch_id' => env('WECHAT_PAYMENT_MCH_ID', '1603992271'),
  114. 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', '400c15dfd1338b941341993afa651ca6'),
  115. 'key' => env('WECHAT_PAYMENT_KEY', 'GiB0bJNdF2QPpMZEL1qG2dMbv5V095nF'),
  116. 'api_v3' => env('WECHAT_PAYMENT_API_V3', 'plHeJH0LoCrHXMxxgtJD2rlGzkL7Xmpv'),
  117. 'serial_no' => env('WECHAT_PAYMENT_SERIAL_NO', '696B623841134292AAB48D4EC5907FB376504E98'),
  118. 'cert_path' => env('WECHAT_PAYMENT_CERT_PATH', base_path().'/jwy_api_cert/apiclient_cert.pem'), // XXX: 绝对路径!!!!
  119. 'key_path' => env('WECHAT_PAYMENT_KEY_PATH', base_path().'/jwy_api_cert/apiclient_key.pem'), // XXX: 绝对路径!!!!
  120. 'cert_pem' => env('WECHAT_PAYMENT_CERT_PEM',base_path().'/jwy_api_cert/apiclient_cert.pem'),
  121. 'notify_url' => 'http://weidian.cliu.cc/api/payment/notify', // 默认支付结果通知地址
  122. ],
  123. // 'default' => [
  124. // 'sandbox' => env('WECHAT_PAYMENT_SANDBOX', false),
  125. // 'app_id' => env('WECHAT_PAYMENT_APPID', 'wx22dc4d8cbc0a192d'),
  126. // 'mch_id' => env('WECHAT_PAYMENT_MCH_ID', '1604585534'),
  127. // 'secret' => env('WECHAT_OFFICIAL_ACCOUNT_SECRET', 'c79e6d7f3ba6ca9b5e42421923f17824'),
  128. // 'key' => env('WECHAT_PAYMENT_KEY', 'i5fcaqSNELvVdf2wHqoSvJcBPUEzEQCZ'),
  129. // 'api_v3' => env('WECHAT_PAYMENT_API_V3', 'plHeJH0LoCrHXMxxgtJD2rlGzkL7Xmpv'),
  130. // 'serial_no' => env('WECHAT_PAYMENT_SERIAL_NO', '73024BD5FA3E83F39DC1EE36D53FF206F6B82289'),
  131. // 'cert_path' => env('WECHAT_PAYMENT_CERT_PATH', '/www/wwwroot/weidian.woaidakele.cn/weidian-api-test/xmnk_api_cert/apiclient_cert.pem'), // XXX: 绝对路径!!!!
  132. // 'key_path' => env('WECHAT_PAYMENT_KEY_PATH', '/www/wwwroot/weidian.woaidakele.cn/weidian-api-test/xmnk_api_cert/apiclient_key.pem'), // XXX: 绝对路径!!!!
  133. // 'cert_pem' => env('WECHAT_PAYMENT_CERT_PEM','/www/wwwroot/weidian.woaidakele.cn/weidian-api-test/cert/cert.pem'),
  134. // 'notify_url' => 'http://weidian.woaidakele.cn/api/payment/notify', // 默认支付结果通知地址
  135. // ],
  136. ],
  137. /*
  138. * 企业微信
  139. */
  140. // 'work' => [
  141. // 'default' => [
  142. // 'corp_id' => 'xxxxxxxxxxxxxxxxx',
  143. // 'agent_id' => 100020,
  144. // 'secret' => env('WECHAT_WORK_AGENT_CONTACTS_SECRET', ''),
  145. // //...
  146. // ],
  147. // ],
  148. ];