| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?php
- $mainConfig = require_once __DIR__ . '/config.php';
- return [
- 'language' => 'zh-CN',
- 'timeZone' => 'PRC',
- 'aliases' => [
- '@bower' => '@vendor/bower-asset',
- '@npm' => '@vendor/npm-asset',
- // 'anlity/swooleAsyncTimer' => '@backend/runtime/tmp-extensions/yii2-swoole-async-timer',
- ],
- 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
- 'components' => [
- // 'log' => [
- // 'targets' => [
- // [
- // 'class' => 'yii\log\FileTarget',
- // 'levels' => ['error', 'warning', 'info'],
- // 'categories' => ['yii\db\*', 'app\models\*'],
- // 'logFile' => '@runtime/logs/sql.log',
- // ],
- // 'db' => [ 'class' => 'yii\log\FileTarget'],
- // ],
- // ],
- 'db' => array_merge([
- 'class' => 'yii\db\Connection',
- 'enableSlaves' => false,
- // 'enableSavepoint' => false,
- ], $mainConfig['db'], $mainConfig['slavesDb']),
- // 'dbShop' => array_merge(['class' => 'yii\db\Connection', 'schemaMap' => ['oci' => 'common\helpers\Schema']], $mainConfig['dbShop']),
- 'dbLog' => array_merge(['class' => 'yii\mongodb\Connection',], $mainConfig['dbLog']),
- 'dbCalc' => array_merge(['class' => 'yii\db\Connection'], $mainConfig['dbCalc']),
- // 'dbShopCalc' => array_merge(['class' => 'yii\db\Connection', 'schemaMap' => ['oci' => 'common\helpers\Schema'],], $mainConfig['dbShopCalc']),
- 'dbNetPoint' => array_merge(['class' => 'yii\db\Connection'], $mainConfig['dbNetPoint']),
- // 'cache' => [
- // //'class' => 'yii\caching\FileCache',
- // 'class' => 'dcb9\redis\Cache',
- // 'redis' => $mainConfig['cacheRedis'],
- // ],
- 'cache' => [
- 'class' => 'yii\redis\Cache',
- 'redis' => $mainConfig['cacheRedis'],
- // 'redis' => [
- // 'hostname' => '127.0.0.1',
- // 'port' => 6379,
- // 'database' => 0,
- // ]
- ],
- 'tokenRedis' => array_merge(['class' => 'yii\redis\Connection'], $mainConfig['tokenRedis']),
- 'redis' => array_merge(['class' => 'yii\redis\Connection'], $mainConfig['otherRedis']),
- // 'tokenRedis' => array_merge(['class' => 'common\components\Redis'], $mainConfig['tokenRedis']),
- // 'redis' => array_merge(['class' => 'common\components\Redis'], $mainConfig['otherRedis']),
- 'mailer' => [
- 'class' => 'yii\swiftmailer\Mailer',
- 'viewPath' => '@common/mail',
- // send all mails to a file by default. You have to set
- // 'useFileTransport' to false and configure a transport
- // for the mailer to send real emails.
- 'useFileTransport' => true,
- ],
- 'swooleAsyncTimer' => [
- 'class' => 'common\components\SwooleAsyncTimer',
- ],
- // iPay88配置
- 'iPay88' => [
- 'class' => 'frontendApi\modules\v1\components\IPay88',
- 'merchantCode' => 'M08669_S0002',
- 'merchantKey' => '5Mb154IrY8',
- 'currencyCode' => 'MYR', // MYR CNY TODO: 目前暂时只能使用MYR支付 RMB
- 'responseUrl' => 'https://nc-fele-mips.elken.com:8015/#/shop/order-list', // 支付后跳转URL. 用户发起支付后会跳转到iPay88支付页面,用户支付过后会跳转到此页面。中途如果用户放弃支付或者支付失败都会请求此接口。iPay88会携带一些参数给我们,我们可以判断是否成功,给前端返回一些内容等
- 'backendUrl' => 'https://nc-fapi-mips.elken.com:8013/v1/shop/verify-approach-order', // 支付回调地址
- 'requeryUrl' => 'https://payment.ipay88.com.my/epayment/enquiry.asp',
- 'paymentUrl' => 'https://payment.ipay88.com.my/epayment/entry.asp',
- 'recurringUrlSubscription' => 'https://www.ipay88.com/recurringpayment/webservice/RecurringPayment.asmx/Subscription',
- 'recurringUrlTermination' => 'https://www.ipay88.com/recurringpayment/webservice/RecurringPayment.asmx/Termination'
- ],
- ],
- 'controllerMap' => [
- 'swoole_server' => [
- 'class' => 'anlity\swooleAsyncTimer\SwooleAsyncTimerController',
- ],
- ],
- ];
|