From 3e9b8cab2d716f6e395ee7f65255ff5b4d9610ae Mon Sep 17 00:00:00 2001 From: "Mamadou Khoussa [028918 DSI/DAC/DIF/DS]" Date: Tue, 28 Oct 2025 16:01:04 +0000 Subject: [PATCH] check environnement --- angular.json | 28 +++++++- package.json | 2 +- src/environments/environment.preprod.ts | 90 +++++++++++++++++++++++++ src/environments/environment.prod.ts | 90 +++++++++++++++++++++++++ 4 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 src/environments/environment.preprod.ts create mode 100644 src/environments/environment.prod.ts diff --git a/angular.json b/angular.json index f569c0b..9746bdb 100644 --- a/angular.json +++ b/angular.json @@ -85,7 +85,30 @@ "maximumError": "8MB" } ], - "outputHashing": "all" + "outputHashing": "all", + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ] + }, + + "preprod": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "8MB", + "maximumError": "8MB" + } + ], + "outputHashing": "all", + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.preprod.ts" + } + ] }, "development": { "optimization": false, @@ -101,6 +124,9 @@ "production": { "buildTarget": "dcb-backoffice:build:production" }, + "preprod": { + "buildTarget": "dcb-backoffice:build:preprod" + }, "development": { "buildTarget": "dcb-backoffice:build:development" } diff --git a/package.json b/package.json index 31bc37c..3b46308 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "scripts": { "ng": "ng", "start": "ng serve", - "build": "ng build", + "build": "ng build --configuration=preprod", "watch": "ng build --watch --configuration development", "test": "ng test", "format": "prettier --write src/**/*.{ts,html}" diff --git a/src/environments/environment.preprod.ts b/src/environments/environment.preprod.ts new file mode 100644 index 0000000..d9295e5 --- /dev/null +++ b/src/environments/environment.preprod.ts @@ -0,0 +1,90 @@ +export const environment = { + production: false, + apiUrl: "https://api-user-service.dcb.pixpay.sn/api/v1", + dcbApiUrl: 'https://api.paymenthub.com/v2', + + // Configuration DCB + dcb: { + // Opérateurs supportés + operators: { + orange: { + endpoint: 'https://api.orange.com/dcb/v2', + timeout: 30000, + retryAttempts: 3, + countries: ['CIV', 'SEN', 'CMR', 'MLI', 'BFA', 'GIN'] + }, + mtn: { + endpoint: 'https://api.mtn.com/dcb/v2', + timeout: 25000, + retryAttempts: 3, + countries: ['CIV', 'GHA', 'NGA', 'CMR', 'RWA'] + }, + airtel: { + endpoint: 'https://api.airtel.com/dcb/v2', + timeout: 30000, + retryAttempts: 3, + countries: ['COD', 'TZN', 'KEN', 'UGA', 'RWA'] + }, + moov: { + endpoint: 'https://api.moov.com/dcb/v2', + timeout: 25000, + retryAttempts: 3, + countries: ['CIV', 'BEN', 'TGO', 'NER', 'BFA'] + } + }, + + // Limitations + limits: { + maxAmount: 50, + minAmount: 0.5, + dailyLimit: 100, + monthlyLimit: 1000 + }, + + // Sécurité + security: { + webhookSecret: 'dcb_wh_secret_2024', + encryptionKey: 'dcb_enc_key_2024', + jwtExpiry: '24h' + }, + + // Monitoring + monitoring: { + healthCheckInterval: 60000, + alertThreshold: 0.1, // 10% d'erreur + performanceThreshold: 5000 // 5 secondes + } + }, + + // Configuration Merchants + merchants: { + onboarding: { + maxFileSize: 10 * 1024 * 1024, + allowedFileTypes: ['pdf', 'jpg', 'jpeg', 'png'], + autoApproveThreshold: 1000 + }, + payouts: { + defaultSchedule: 'monthly', + processingDays: [1, 15], + minPayoutAmount: 50, + fees: { + bankTransfer: 1.5, + mobileMoney: 2.0 + } + }, + kyc: { + requiredDocuments: ['registration_certificate', 'tax_certificate', 'id_document'], + autoExpireDays: 365 + } + }, + + // Configuration générale + app: { + name: 'Payment Aggregation Hub', + version: '2.0.0', + supportEmail: 'support@paymenthub.com', + defaultLanguage: 'fr', + currencies: ['XOF', 'XAF', 'USD', 'EUR', 'TND'], + countries: ['CIV', 'SEN', 'CMR', 'COD', 'TUN', 'BFA', 'MLI', 'GIN', 'NGA', 'GHA'] + } +}; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts new file mode 100644 index 0000000..d9295e5 --- /dev/null +++ b/src/environments/environment.prod.ts @@ -0,0 +1,90 @@ +export const environment = { + production: false, + apiUrl: "https://api-user-service.dcb.pixpay.sn/api/v1", + dcbApiUrl: 'https://api.paymenthub.com/v2', + + // Configuration DCB + dcb: { + // Opérateurs supportés + operators: { + orange: { + endpoint: 'https://api.orange.com/dcb/v2', + timeout: 30000, + retryAttempts: 3, + countries: ['CIV', 'SEN', 'CMR', 'MLI', 'BFA', 'GIN'] + }, + mtn: { + endpoint: 'https://api.mtn.com/dcb/v2', + timeout: 25000, + retryAttempts: 3, + countries: ['CIV', 'GHA', 'NGA', 'CMR', 'RWA'] + }, + airtel: { + endpoint: 'https://api.airtel.com/dcb/v2', + timeout: 30000, + retryAttempts: 3, + countries: ['COD', 'TZN', 'KEN', 'UGA', 'RWA'] + }, + moov: { + endpoint: 'https://api.moov.com/dcb/v2', + timeout: 25000, + retryAttempts: 3, + countries: ['CIV', 'BEN', 'TGO', 'NER', 'BFA'] + } + }, + + // Limitations + limits: { + maxAmount: 50, + minAmount: 0.5, + dailyLimit: 100, + monthlyLimit: 1000 + }, + + // Sécurité + security: { + webhookSecret: 'dcb_wh_secret_2024', + encryptionKey: 'dcb_enc_key_2024', + jwtExpiry: '24h' + }, + + // Monitoring + monitoring: { + healthCheckInterval: 60000, + alertThreshold: 0.1, // 10% d'erreur + performanceThreshold: 5000 // 5 secondes + } + }, + + // Configuration Merchants + merchants: { + onboarding: { + maxFileSize: 10 * 1024 * 1024, + allowedFileTypes: ['pdf', 'jpg', 'jpeg', 'png'], + autoApproveThreshold: 1000 + }, + payouts: { + defaultSchedule: 'monthly', + processingDays: [1, 15], + minPayoutAmount: 50, + fees: { + bankTransfer: 1.5, + mobileMoney: 2.0 + } + }, + kyc: { + requiredDocuments: ['registration_certificate', 'tax_certificate', 'id_document'], + autoExpireDays: 365 + } + }, + + // Configuration générale + app: { + name: 'Payment Aggregation Hub', + version: '2.0.0', + supportEmail: 'support@paymenthub.com', + defaultLanguage: 'fr', + currencies: ['XOF', 'XAF', 'USD', 'EUR', 'TND'], + countries: ['CIV', 'SEN', 'CMR', 'COD', 'TUN', 'BFA', 'MLI', 'GIN', 'NGA', 'GHA'] + } +};