UNPKG

uz-pay-sdk

Version:

🚀 Universal Payment SDK for Uzbekistan - Integrate Payme, Click, UzCard, Humo & Apelsin with one simple API. Battle-tested, production-ready, 95% faster integration.

74 lines • 3.31 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.PaymentConfigService = void 0; const common_1 = require("@nestjs/common"); const config_1 = require("@nestjs/config"); let PaymentConfigService = class PaymentConfigService { constructor(configService) { this.configService = configService; } // Payme Configuration get paymeConfig() { return { merchantId: this.configService.get('PAYME_MERCHANT_ID'), key: this.configService.get('PAYME_KEY'), apiUrl: this.configService.get('PAYME_API_URL', 'https://checkout.test.paycom.uz/api'), }; } // Click Configuration get clickConfig() { return { serviceId: this.configService.get('CLICK_SERVICE_ID'), merchantId: this.configService.get('CLICK_MERCHANT_ID'), secretKey: this.configService.get('CLICK_SECRET_KEY'), apiUrl: this.configService.get('CLICK_API_URL', 'https://api.click.uz/v2'), }; } // UzCard Configuration get uzcardConfig() { return { terminalId: this.configService.get('UZCARD_TERMINAL_ID'), terminalUserId: this.configService.get('UZCARD_TERMINAL_USER_ID'), serviceId: this.configService.get('UZCARD_SERVICE_ID'), apiUrl: this.configService.get('UZCARD_API_URL', 'https://api.uzcard.uz/api/v1'), }; } // Humo Configuration get humoConfig() { return { merchantId: this.configService.get('HUMO_MERCHANT_ID'), secretKey: this.configService.get('HUMO_SECRET_KEY'), apiUrl: this.configService.get('HUMO_API_URL', 'https://api.humo.tj/v1'), }; } // Apelsin Configuration get apelsinConfig() { return { terminalKey: this.configService.get('APELSIN_TERMINAL_KEY'), password: this.configService.get('APELSIN_PASSWORD'), apiUrl: this.configService.get('APELSIN_API_URL', 'https://api.apelsin.uz/v1'), }; } // Application Configuration get appConfig() { return { port: this.configService.get('PORT', 3000), nodeEnv: this.configService.get('NODE_ENV', 'development'), }; } }; exports.PaymentConfigService = PaymentConfigService; exports.PaymentConfigService = PaymentConfigService = __decorate([ (0, common_1.Injectable)(), __metadata("design:paramtypes", [config_1.ConfigService]) ], PaymentConfigService); //# sourceMappingURL=payment-config.service.js.map