mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-24 21:32:28 +00:00
fix: make kyc run on mocks
This commit is contained in:
9003
package-lock.json
generated
9003
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,7 @@ export class NeoLeapService {
|
||||
private readonly zodApiUrl: string;
|
||||
private readonly apiKey: string;
|
||||
private readonly useGateway: boolean;
|
||||
private readonly useKycMock: boolean;
|
||||
private readonly institutionCode = '1100';
|
||||
useLocalCert: boolean;
|
||||
constructor(private readonly httpService: HttpService, private readonly configService: ConfigService) {
|
||||
@ -37,12 +38,13 @@ export class NeoLeapService {
|
||||
this.useGateway = [true, 'true'].includes(this.configService.get<boolean>('USE_GATEWAY', false));
|
||||
this.useLocalCert = this.configService.get<boolean>('USE_LOCAL_CERT', false);
|
||||
this.zodApiUrl = this.configService.getOrThrow<string>('ZOD_API_URL');
|
||||
this.useKycMock = [true, 'true'].includes(this.configService.get<boolean>('USE_KYC_MOCK', true));
|
||||
}
|
||||
|
||||
async initiateKyc(customerId: string, body: InitiateKycRequestDto) {
|
||||
const responseKey = 'InitiateKycResponseDetails';
|
||||
|
||||
if (!this.useGateway) {
|
||||
if (this.useKycMock) {
|
||||
const responseDto = plainToInstance(InitiateKycResponseDto, INITIATE_KYC_MOCK[responseKey], {
|
||||
excludeExtraneousValues: true,
|
||||
});
|
||||
|
Reference in New Issue
Block a user