mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 13:10:56 +00:00
feat: ( telebirr ) setup telebirr config
This commit is contained in:
@@ -18,6 +18,12 @@ SENDGRID_API_KEY=
|
||||
SENDGRID_FROM_EMAIL=noreply@edr-platform.com
|
||||
|
||||
# Telebirr
|
||||
TELEBIRR_API_URL=https://api.telebirr.com
|
||||
TELEBIRR_APP_ID=
|
||||
TELEBIRR_APP_KEY=
|
||||
TELEBIRR_BASE_URL=
|
||||
TELEBIRR_WEB_BASE_URL=
|
||||
TELEBIRR_FABRIC_APP_ID=
|
||||
TELEBIRR_APP_SECRET=
|
||||
TELEBIRR_MERCHANT_APP_ID=
|
||||
TELEBIRR_MERCHANT_CODE=
|
||||
TELEBIRR_NOTIFY_URL=
|
||||
TELEBIRR_RETURN_URL=
|
||||
TELEBIRR_TIMEOUT_EXPRESS=15m
|
||||
@@ -5,6 +5,7 @@ import { EventEmitterModule } from '@nestjs/event-emitter';
|
||||
import { PrismaModule } from './common/prisma.module';
|
||||
import appConfig from './config/app.config';
|
||||
import dbConfig from './config/database.config';
|
||||
import telebirrConfig from './config/telebirr.config';
|
||||
import { AuthModule } from './modules/auth/auth.module';
|
||||
import { StationsModule } from './modules/stations/stations.module';
|
||||
import { FleetModule } from './modules/fleet/fleet.module';
|
||||
@@ -25,7 +26,7 @@ import { DashboardModule } from './modules/dashboard/dashboard.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot({ isGlobal: true, load: [appConfig, dbConfig] }),
|
||||
ConfigModule.forRoot({ isGlobal: true, load: [appConfig, dbConfig, telebirrConfig] }),
|
||||
ScheduleModule.forRoot(),
|
||||
EventEmitterModule.forRoot(),
|
||||
PrismaModule,
|
||||
|
||||
13
apps/edr-passenger-api/src/config/telebirr.config.ts
Normal file
13
apps/edr-passenger-api/src/config/telebirr.config.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('telebirr', () => ({
|
||||
baseUrl: process.env.TELEBIRR_BASE_URL ?? '',
|
||||
webBaseUrl: process.env.TELEBIRR_WEB_BASE_URL ?? '',
|
||||
fabricAppId: process.env.TELEBIRR_FABRIC_APP_ID ?? '',
|
||||
appSecret: process.env.TELEBIRR_APP_SECRET ?? '',
|
||||
merchantAppId: process.env.TELEBIRR_MERCHANT_APP_ID ?? '',
|
||||
merchantCode: process.env.TELEBIRR_MERCHANT_CODE ?? '',
|
||||
notifyUrl: process.env.TELEBIRR_NOTIFY_URL ?? '',
|
||||
returnUrl: process.env.TELEBIRR_RETURN_URL ?? '',
|
||||
timeoutExpress: process.env.TELEBIRR_TIMEOUT_EXPRESS ?? '15m',
|
||||
}));
|
||||
Reference in New Issue
Block a user