CaiWuXiTong/config/services.php
limeng 8f150080c5 修正聚水潭成本价历史凭据边界与未同步状态 (#186)
保留完整成本价历史方案,区分经典接口凭据与新开放平台凭据;首次同步未完成时显示待同步,不误报 0 条。

验证:33 passed,260 assertions。
2026-09-15 11:39:09 +08:00

78 lines
3.4 KiB
PHP

<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'sendgrid' => [
'api_key' => env('SENDGRID_API_KEY'),
],
'esign' => [
// Credentials are deliberately read from the private runtime/.env only.
// Keep the endpoint aligned with the selected environment when the
// explicit ESIGN_BASE_URL override is omitted.
'environment' => env('ESIGN_ENVIRONMENT', 'sandbox'),
'base_url' => env(
'ESIGN_BASE_URL',
env('ESIGN_ENVIRONMENT', 'sandbox') === 'production'
? 'https://openapi.esign.cn'
: 'https://smlopenapi.esign.cn',
),
'app_id' => env('ESIGN_APP_ID'),
'app_secret' => env('ESIGN_APP_SECRET'),
'notify_url' => env('ESIGN_NOTIFY_URL'),
'callback_tolerance_seconds' => (int) env('ESIGN_CALLBACK_TOLERANCE_SECONDS', 900),
'timeout' => (int) env('ESIGN_TIMEOUT', 20),
// Callback-free deployments opt in to bounded status polling. Keep it
// disabled until the private production credentials are verified.
'polling_enabled' => filter_var(env('ESIGN_POLLING_ENABLED', false), FILTER_VALIDATE_BOOL),
'poll_batch_size' => (int) env('ESIGN_POLL_BATCH_SIZE', 25),
'poll_min_age_seconds' => (int) env('ESIGN_POLL_MIN_AGE_SECONDS', 120),
],
'jushuitan' => [
// 聚水潭开放平台凭据只从私有 runtime/.env 读取,不进入代码仓库。
// 商品操作日志使用经典开放接口。经典接口的 partnerid / partnerkey / token
// 与新开放平台的 App Key / App Secret / Access Token 不是同一套凭据,禁止混用。
'base_url' => env('JUSHUITAN_CLASSIC_API_URL', 'https://open.erp321.com/api/open/query.aspx'),
'partner_id' => env('JUSHUITAN_PARTNER_ID'),
'partner_key' => env('JUSHUITAN_PARTNER_KEY'),
'token' => env('JUSHUITAN_TOKEN'),
'timeout' => (int) env('JUSHUITAN_OPEN_API_TIMEOUT', 20),
'product_operation_history_method' => 'worklog.query',
'cost_price_history_start' => env('JUSHUITAN_COST_PRICE_HISTORY_START', '2000-01-01 00:00:00'),
'cost_price_history_window_days' => (int) env('JUSHUITAN_COST_PRICE_HISTORY_WINDOW_DAYS', 7),
'cost_price_history_overlap_hours' => (int) env('JUSHUITAN_COST_PRICE_HISTORY_OVERLAP_HOURS', 48),
'cost_price_history_page_size' => (int) env('JUSHUITAN_COST_PRICE_HISTORY_PAGE_SIZE', 50),
'cost_price_history_max_pages' => (int) env('JUSHUITAN_COST_PRICE_HISTORY_MAX_PAGES', 30),
],
];