@traxionpay/cbsmiddleware 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/banking/services/WelcomeBank.service.d.ts.map +1 -1
- package/dist/banking/services/WelcomeBank.service.js +18 -2
- package/dist/banking/services/WelcomeBank.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/banking/services/WelcomeBank.service.ts +22 -4
package/package.json
CHANGED
|
@@ -250,9 +250,7 @@ export class WelcomeBankService implements BankService {
|
|
|
250
250
|
}
|
|
251
251
|
);
|
|
252
252
|
}
|
|
253
|
-
|
|
254
|
-
this.logger.log({ responseData: response.data }, 'Welcome Bank Link Account Successful');
|
|
255
|
-
|
|
253
|
+
|
|
256
254
|
if (String(this.config.WELCOMBANK_ENABLEENCRYPTION).toLowerCase() === 'true') {
|
|
257
255
|
|
|
258
256
|
const encryptedResponsePayload = response.data.data;
|
|
@@ -285,6 +283,16 @@ export class WelcomeBankService implements BankService {
|
|
|
285
283
|
|
|
286
284
|
AxiosErrorHelper.handleAxiosError(error);
|
|
287
285
|
}
|
|
286
|
+
this.logger.log({ responseData: responseData }, 'Welcome Bank Link Account Successful');
|
|
287
|
+
|
|
288
|
+
if (responseData.data.status === "99994") {
|
|
289
|
+
throw new HttpException({
|
|
290
|
+
statusCode: HttpStatus.BAD_REQUEST,
|
|
291
|
+
code: 400020309,
|
|
292
|
+
message: 'The customer\'s account is a corporate account / joint account',
|
|
293
|
+
data: { ...accountDto }
|
|
294
|
+
}, HttpStatus.BAD_REQUEST);
|
|
295
|
+
}
|
|
288
296
|
|
|
289
297
|
if (responseData.data.status === "99997") {
|
|
290
298
|
throw new HttpException({
|
|
@@ -431,6 +439,16 @@ export class WelcomeBankService implements BankService {
|
|
|
431
439
|
catch (error) {
|
|
432
440
|
AxiosErrorHelper.handleAxiosError(error);
|
|
433
441
|
}
|
|
442
|
+
|
|
443
|
+
if (responseData.data.status === "99994") {
|
|
444
|
+
throw new HttpException({
|
|
445
|
+
statusCode: HttpStatus.BAD_REQUEST,
|
|
446
|
+
code: 400020309,
|
|
447
|
+
message: 'The customer\'s account is a corporate account / joint account',
|
|
448
|
+
data: { ...validateOtp }
|
|
449
|
+
}, HttpStatus.BAD_REQUEST);
|
|
450
|
+
}
|
|
451
|
+
|
|
434
452
|
if (responseData.data.status === "99997") {
|
|
435
453
|
throw new HttpException({
|
|
436
454
|
statusCode: HttpStatus.BAD_REQUEST,
|
|
@@ -444,7 +462,7 @@ export class WelcomeBankService implements BankService {
|
|
|
444
462
|
throw new HttpException({
|
|
445
463
|
statusCode: HttpStatus.BAD_REQUEST,
|
|
446
464
|
code: 400020405,
|
|
447
|
-
message: 'Account type is not supported.',
|
|
465
|
+
message: '00001 Account type is not supported.',
|
|
448
466
|
data: { ...validateOtp }
|
|
449
467
|
}, HttpStatus.BAD_REQUEST);
|
|
450
468
|
}
|