@traxionpay/cbsmiddleware 0.0.8 → 0.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@traxionpay/cbsmiddleware",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "This is a cbs middlware for RB Banks",
5
5
  "author": "Archer",
6
6
  "private": false,
@@ -814,6 +814,24 @@ export class WelcomeBankService implements BankService {
814
814
  }, HttpStatus.BAD_REQUEST);
815
815
  }
816
816
 
817
+ if (responseData.data.status === "XXXXX") {
818
+ throw new HttpException({
819
+ statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
820
+ code: 400020618,
821
+ message: 'Unknown Error',
822
+ data: { ...accountTransferDto }
823
+ }, HttpStatus.UNPROCESSABLE_ENTITY);
824
+ }
825
+
826
+ if (responseData.data.status !== "00000") {
827
+ throw new HttpException({
828
+ statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
829
+ code: 400020618,
830
+ message: 'Unknown Error',
831
+ data: { ...accountTransferDto }
832
+ }, HttpStatus.UNPROCESSABLE_ENTITY);
833
+ }
834
+
817
835
  this.logger.log(`Response Data WelcomeBank Cashin , ${responseData}`);
818
836
 
819
837
  return {
@@ -1027,6 +1045,25 @@ export class WelcomeBankService implements BankService {
1027
1045
  }, HttpStatus.BAD_REQUEST);
1028
1046
  }
1029
1047
 
1048
+ if (responseData.data.status === "XXXXX") {
1049
+ throw new HttpException({
1050
+ statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
1051
+ code: 400020617,
1052
+ message: 'Unknown Error',
1053
+ data: { ...accountTransferDto }
1054
+ }, HttpStatus.UNPROCESSABLE_ENTITY);
1055
+ }
1056
+
1057
+ if (responseData.data.status !== "00000") {
1058
+ throw new HttpException({
1059
+ statusCode: HttpStatus.UNPROCESSABLE_ENTITY,
1060
+ code: 400020617,
1061
+ message: 'Unknown Error',
1062
+ data: { ...accountTransferDto }
1063
+ }, HttpStatus.UNPROCESSABLE_ENTITY);
1064
+ }
1065
+
1066
+
1030
1067
  this.logger.log(`Response Data WelcomeBank Deposit , ${responseData}`);
1031
1068
 
1032
1069
  return {