<?php
/**
 * Created by PhpStorm.
 * User: leo
 * Date: 2018/2/23
 * Time: 下午3:53
 */
return [
    // 奖金结算系统主库
    'db' => [
        // 数据库连接
        'dsn' => 'mysql:host=16.163.228.151;port=8051;dbname=nc_shaojiangjin_0329',
        // 数据库用户名
        'username' => 'black_tea_0309',
        // 数据库密码
        'password' => 'ndZ4MXYST7',
        // 数据库字符集
        'charset' => 'utf8',
        // 数据表前缀
        'tablePrefix' => 'AR_',
    ],
    // 日志库
    'dbLog' => [
        'dsn' => 'mongodb://173.1.0.37:27017/aikang_log_db',
        'options' => [
            "username" => "aikang_bonus_log_user",
            "password" => "mongo@db.useron2020"
        ],
    ],
    // 奖金结算专属库(为不占用主库资源，不影响会员正常业务，该库专门用于奖金结算，可单独架设，需与主库做主从同步)
    'dbCalc' => [
        'dsn' => 'mysql:host=173.1.0.128;port=4000;dbname=aikang_db',
        'username' => 'aikang',
        'password' => 'xtuNQ7F&p0M&UhcE',
        'charset' => 'utf8',
        'tablePrefix' => 'AR_',
    ],
    // 移动点位时专用的点位备份库(可用来查看各个时期的会员点位情况)
    'dbNetPoint' => [
        'dsn' => 'mysql:host=173.1.0.128;port=4000;dbname=aikang_db',
        'username' => 'aikang',
        'password' => 'xtuNQ7F&p0M&UhcE',
        'charset' => 'utf8',
        'tablePrefix' => 'AR_',
    ],
    // 系统从库
    'slavesDb' => [
        'slaveConfig' => [
            'username' => 'aikang',
            'password' => 'xtuNQ7F&p0M&UhcE',
            'charset' => 'utf8',
            'tablePrefix' => 'AR_',
            'attributes' => [
                PDO::ATTR_TIMEOUT => 10,  // 从库超时切换间隔时间
            ],
        ],
        'slaves' => [
            ['dsn' => 'mysql:host=173.1.0.128;port=4000;dbname=aikang_db'],
            // 其他奖金结算系统的从库从下面继续添加配置
        ],
    ],
    // Token专用 Redis 库
    'tokenRedis' => [
        // 服务器
        'hostname' => '173.1.0.224',
        // 端口
        'port' => 6379,
        // 密码
        'password' => 'uGAmdQJt8Z',
        // 库索引
        'database' => 13,
    ],
    // 缓存专用 Redis 库
    'cacheRedis' => [
        'hostname' => '173.1.0.224',
        'port' => 6379,
        'password' => 'uGAmdQJt8Z',
        'database' => 14,
    ],
    // 其他数据 Redis 库
    'otherRedis' => [
        'hostname' => '173.1.0.224',
        'port' => 6379,
        'password' => 'uGAmdQJt8Z',
        'database' => 15,
    ],
    // 远程静态上传服务器地址 @todo 明哥提供
    'remoteUploadHost' => 'http://upload.lxak2020.com',
    // swoole异步服务器及端口
    'swooleTimerConfig' => [
        'host' => '127.0.0.1',
        'port' => '9513',
    ],
    'swooleClientConfig' => [
        'host' => '127.0.0.1',
        'port' => '9513',
    ],
    // swoole奖金服务器及端口
    'swooleBonusClientConfig' => [
        'host' => '127.0.0.1',
        'port' => '9513',
    ],
    // UnionPay OnlinePayment - 银联国际
    'UPOP' => [
        'frontPayUrl' => 'https://gate.sicpay.com/frontSecure.do', // 前台支付url
        'backPayUrl'  => 'https://gate.sicpay.com/backSecure.do',  // 后台支付url
//        'agencyId' => '549034453991107',   // 商户号
//        'childMerchantId' => '',   // 子商户号
//        'terminalId' => '20020453',   // 终端号
//        'currencyType' => 'HKD', // 支付币种
        'agencyId' => '549034453991109',   // 商户号
        'childMerchantId' => '',   // 子商户号
        'terminalId' => '20020461',   // 终端号
        'currencyType' => 'CNY', // 支付币种
//        'notifyUrl' => 'https://nc-fapi-mips.elken.com:8013/v1/shop/upop-webhook', // 异步通知url(test)
//        'returnUrl' => 'https://nc-fapi-mips.elken.com:8013/v1/shop/upop-webhook', // 同步通知url(test)
        'notifyUrl' => 'https://fapi.ncshop.elken.com/v1/shop/upop-webhook', // 异步通知url(prod)
        'returnUrl' => 'https://fapi.ncshop.elken.com/v1/shop/upop-webhook', // 同步通知url(prod)
    ],
];
