香洲二院小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
mini_xzey/config/wechat.php

159 lines
6.3 KiB

<?php
return [
'official' => [
/*
|--------------------------------------------------------------------------
| WeChat Official Account 配置
|--------------------------------------------------------------------------
|
| 微信公众号对应配置数据
| 详见:https://easywechat.com/6.x/official-account/index.html
|
*/
'app_id' => env('WECHAT_OFFICIAL_APP_ID', ''),
'secret' => env('WECHAT_OFFICIAL_APP_SECRET', ''),
'token' => env('WECHAT_OFFICIAL_TOKEN', ''),
'aes_key' => env('WECHAT_OFFICIAL_AES_KEY', ''),
/*
|--------------------------------------------------------------------------
| OAuth 配置
|--------------------------------------------------------------------------
|
| scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
| callback:OAuth授权完成后的回调页地址
|
*/
'oauth' => [
'scopes' => ['snsapi_userinfo'],
'callback' => env('WECHAT_OAUTH_CALLBACK_URL', ''),
],
/*
|--------------------------------------------------------------------------
| Http 配置
|--------------------------------------------------------------------------
|
| 接口请求相关配置,超时时间等,具体可用参数请参考:
| https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php
|
*/
'http' => [
'timeout' => 5.0,
// 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri
// 'base_uri' => 'https://api.weixin.qq.com/',
'retry' => true, // 使用默认重试配置
/* 'retry' => [
// 仅以下状态码重试
'http_codes' => [429, 500]
// 最大重试次数
'max_retries' => 3,
// 请求间隔 (毫秒)
'delay' => 1000,
// 如果设置,每次重试的等待时间都会增加这个系数
// (例如. 首次:1000ms; 第二次: 3 * 1000ms; etc.)
'multiplier' => 3
],*/
],
],
'mini' => [
/*
|--------------------------------------------------------------------------
| WeChat Mini Program 配置
|--------------------------------------------------------------------------
|
| 微信小程序对应配置数据
| 详见:https://easywechat.com/6.x/mini-app/index.html
|
*/
'app_id' => env('WECHAT_MINI_APP_ID', 'wx84863fc5fadc3f8c'),
'secret' => env('WECHAT_MINI_APP_SECRET', 'feff14552b5507329e45bd14eec1de72'),
'token' => env('WECHAT_MINI_TOKEN', ''),
'aes_key' => env('WECHAT_MINI_AES_KEY', ''),
/*
|--------------------------------------------------------------------------
| Http 配置
|--------------------------------------------------------------------------
|
| 接口请求相关配置,超时时间等,具体可用参数请参考:
| https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php
|
*/
'http' => [
// 默认不抛出异常
'throw' => false,
// 超时时间
'timeout' => 5.0,
// 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri
// 'base_uri' => 'https://api.weixin.qq.com/',
'retry' => true, // 使用默认重试配置
/* 'retry' => [
// 仅以下状态码重试
'http_codes' => [429, 500]
// 最大重试次数
'max_retries' => 3,
// 请求间隔 (毫秒)
'delay' => 1000,
// 如果设置,每次重试的等待时间都会增加这个系数
// (例如. 首次:1000ms; 第二次: 3 * 1000ms; etc.)
'multiplier' => 3
],*/
],
],
'payment' => [
/*
|--------------------------------------------------------------------------
| WeChat Payment 配置
|--------------------------------------------------------------------------
|
| 微信支付对应配置数据
| 详见:https://easywechat.com/6.x/pay/index.html
|
*/
// V2
'app_id' => env('WECHAT_PAYMENT_SP_APP_ID', ''),
'sub_app_id' => env('WECHAT_PAYMENT_SUB_APP_ID', ''),
'mch_id' => env('WECHAT_PAYMENT_SP_MCH_ID', ''),
'sub_mch_id' => env('WECHAT_PAYMENT_SUB_MCH_ID', ''),
'private_key' => env('WECHAT_PAYMENT_V2_PRIVATE_KEY_PATH', ''),
'certificate' => env('WECHAT_PAYMENT_V2_CERTIFICATE_PATH', ''),
'v2_secret_key' => env('WECHAT_PAYMENT_V2_SECRET_KEY', ''),
// V3
/*
'sp_app_id' => env('WECHAT_PAYMENT_SP_APP_ID', ''),
'sub_app_id' => env('WECHAT_PAYMENT_SUB_APP_ID', ''),
'sp_mch_id' => env('WECHAT_PAYMENT_SP_MCH_ID', ''),
'sub_mch_id' => env('WECHAT_PAYMENT_SUB_MCH_ID', ''),
'secret_key' => env('WECHAT_PAYMENT_V3_SECRET_KEY', ''),
'platform_certs' => [
// 请使用绝对路径
// '/path/to/wechatpay/cert.pem',
env('WECHAT_PAYMENT_V3_PRIVATE_KEY_PATH'),
],
*/
/*
|--------------------------------------------------------------------------
| Http 配置
|--------------------------------------------------------------------------
|
| 接口请求相关配置,超时时间等,具体可用参数请参考:
| https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php
|
*/
'http' => [
'throw' => true, // 状态码非 200、300 时是否抛出异常,默认为开启
'timeout' => 5.0,
// 'base_uri' => 'https://api.mch.weixin.qq.com/', // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri
],
]
];