aeremmiddleware 1.0.21 → 1.0.23
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/README.md +28 -28
- package/dist/Finance/auEncrypt.d.ts +2 -0
- package/dist/Finance/auEncrypt.js +36 -0
- package/dist/Finance/auEncrypt.js.map +1 -0
- package/dist/Finance/auFinance.d.ts +19 -0
- package/dist/Finance/auFinance.js +73 -0
- package/dist/Finance/auFinance.js.map +1 -0
- package/dist/Finance/index.d.ts +2 -0
- package/dist/Finance/index.js +2 -0
- package/dist/Finance/index.js.map +1 -1
- package/dist/Finance/ingenicoHtml.js +114 -114
- package/dist/Finance/novel.js +1 -1
- package/dist/Finance/novel.types.js +1 -1
- package/dist/Finance/novel.types.js.map +1 -1
- package/dist/Finance/qbrik.d.ts +34 -33
- package/dist/Finance/qbrik.js +7 -6
- package/dist/Finance/qbrik.js.map +1 -1
- package/dist/Finance/qbrik.types.d.ts +50 -0
- package/dist/PushNotification/index.js +1 -1
- package/dist/Socials/Sms.types.js +1 -1
- package/dist/Socials/Sms.types.js.map +1 -1
- package/dist/Socials/Whatsapp.types.js +1 -1
- package/dist/Socials/Whatsapp.types.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +21 -21
- package/src/Finance/Ingenico.types.ts +21 -21
- package/src/Finance/auEncrypt.ts +32 -0
- package/src/Finance/auFinance.ts +78 -0
- package/src/Finance/crimeCheck.ts +135 -135
- package/src/Finance/crimecheck.types.ts +31 -31
- package/src/Finance/encrypt.ts +18 -18
- package/src/Finance/idfy.ts +542 -542
- package/src/Finance/index.ts +15 -13
- package/src/Finance/ingenico.ts +110 -110
- package/src/Finance/ingenicoHtml.ts +119 -119
- package/src/Finance/novel.ts +226 -226
- package/src/Finance/novel.types.ts +24 -24
- package/src/Finance/qbrik.ts +828 -822
- package/src/Finance/qbrik.types.ts +131 -81
- package/src/PushNotification/index.ts +5 -5
- package/src/PushNotification/pushNotificationFCM.ts +37 -37
- package/src/Socials/Sms.types.ts +9 -9
- package/src/Socials/SmsSender.ts +78 -78
- package/src/Socials/Whatsapp.types.ts +95 -95
- package/src/Socials/index.ts +6 -6
- package/src/Socials/whatsApp.ts +188 -188
- package/src/index.ts +9 -9
- package/tsconfig.json +111 -111
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# README #
|
|
2
|
-
|
|
3
|
-
This README would normally document whatever steps are necessary to get your application up and running.
|
|
4
|
-
|
|
5
|
-
### What is this repository for? ###
|
|
6
|
-
|
|
7
|
-
* Quick summary
|
|
8
|
-
* Version
|
|
9
|
-
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
|
10
|
-
|
|
11
|
-
### How do I get set up? ###
|
|
12
|
-
|
|
13
|
-
* Summary of set up
|
|
14
|
-
* Configuration
|
|
15
|
-
* Dependencies
|
|
16
|
-
* Database configuration
|
|
17
|
-
* How to run tests
|
|
18
|
-
* Deployment instructions
|
|
19
|
-
|
|
20
|
-
### Contribution guidelines ###
|
|
21
|
-
|
|
22
|
-
* Writing tests
|
|
23
|
-
* Code review
|
|
24
|
-
* Other guidelines
|
|
25
|
-
|
|
26
|
-
### Who do I talk to? ###
|
|
27
|
-
|
|
28
|
-
* Repo owner or admin
|
|
1
|
+
# README #
|
|
2
|
+
|
|
3
|
+
This README would normally document whatever steps are necessary to get your application up and running.
|
|
4
|
+
|
|
5
|
+
### What is this repository for? ###
|
|
6
|
+
|
|
7
|
+
* Quick summary
|
|
8
|
+
* Version
|
|
9
|
+
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
|
10
|
+
|
|
11
|
+
### How do I get set up? ###
|
|
12
|
+
|
|
13
|
+
* Summary of set up
|
|
14
|
+
* Configuration
|
|
15
|
+
* Dependencies
|
|
16
|
+
* Database configuration
|
|
17
|
+
* How to run tests
|
|
18
|
+
* Deployment instructions
|
|
19
|
+
|
|
20
|
+
### Contribution guidelines ###
|
|
21
|
+
|
|
22
|
+
* Writing tests
|
|
23
|
+
* Code review
|
|
24
|
+
* Other guidelines
|
|
25
|
+
|
|
26
|
+
### Who do I talk to? ###
|
|
27
|
+
|
|
28
|
+
* Repo owner or admin
|
|
29
29
|
* Other community or team contact
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decrypt = exports.encrypt = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
function encrypt(keyString, plaintext) {
|
|
6
|
+
const salt = Buffer.from([
|
|
7
|
+
73, 118, 97, 110, 32, 77, 101, 100, 118, 101, 100, 101, 118,
|
|
8
|
+
]);
|
|
9
|
+
const key = (0, crypto_1.pbkdf2Sync)(keyString, salt, 1000, 384, "sha1");
|
|
10
|
+
const iv = Buffer.alloc(16);
|
|
11
|
+
key.copy(iv, 0, 32, 48);
|
|
12
|
+
const cipher = (0, crypto_1.createCipheriv)("aes-256-cbc", key.slice(0, 32), iv);
|
|
13
|
+
const encrypted = Buffer.concat([
|
|
14
|
+
cipher.update(plaintext, "utf16le"),
|
|
15
|
+
cipher.final(),
|
|
16
|
+
]);
|
|
17
|
+
return encrypted.toString("base64");
|
|
18
|
+
}
|
|
19
|
+
exports.encrypt = encrypt;
|
|
20
|
+
function decrypt(keyString, encryptedData) {
|
|
21
|
+
const salt = Buffer.from([
|
|
22
|
+
73, 118, 97, 110, 32, 77, 101, 100, 118, 101, 100, 101, 118,
|
|
23
|
+
]);
|
|
24
|
+
const key = (0, crypto_1.pbkdf2Sync)(keyString, salt, 1000, 384, "sha1");
|
|
25
|
+
const iv = Buffer.alloc(16);
|
|
26
|
+
key.copy(iv, 0, 32, 48);
|
|
27
|
+
const encryptedText = Buffer.from(encryptedData, "base64");
|
|
28
|
+
const decipher = (0, crypto_1.createDecipheriv)("aes-256-cbc", key.slice(0, 32), iv);
|
|
29
|
+
const decrypted = Buffer.concat([
|
|
30
|
+
decipher.update(encryptedText),
|
|
31
|
+
decipher.final(),
|
|
32
|
+
]);
|
|
33
|
+
return decrypted.toString("utf16le");
|
|
34
|
+
}
|
|
35
|
+
exports.decrypt = decrypt;
|
|
36
|
+
//# sourceMappingURL=auEncrypt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auEncrypt.js","sourceRoot":"","sources":["../../src/Finance/auEncrypt.ts"],"names":[],"mappings":";;;AAAA,mCAAsE;AAEtE,SAAgB,OAAO,CAAC,SAAiB,EAAE,SAAiB;IAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACvB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;KAC5D,CAAC,CAAC;IACH,MAAM,GAAG,GAAG,IAAA,mBAAU,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3D,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5B,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,MAAM,MAAM,GAAG,IAAA,uBAAc,EAAC,aAAa,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9B,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC;QACnC,MAAM,CAAC,KAAK,EAAE;KACf,CAAC,CAAC;IACH,OAAO,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACtC,CAAC;AAbD,0BAaC;AAED,SAAgB,OAAO,CAAC,SAAiB,EAAE,aAAqB;IAC9D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACvB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;KAC5D,CAAC,CAAC;IACH,MAAM,GAAG,GAAG,IAAA,mBAAU,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3D,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5B,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC3D,MAAM,QAAQ,GAAG,IAAA,yBAAgB,EAAC,aAAa,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACvE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9B,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC;QAC9B,QAAQ,CAAC,KAAK,EAAE;KACjB,CAAC,CAAC;IACH,OAAO,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvC,CAAC;AAdD,0BAcC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AxiosResponse } from "axios";
|
|
2
|
+
declare class AuFinanceApiWrapper {
|
|
3
|
+
private enachEndpoint;
|
|
4
|
+
private baseUrl;
|
|
5
|
+
private authEndpoint;
|
|
6
|
+
private emandateWithUserConfirmationEndpoint;
|
|
7
|
+
private emandateWithoutUserConfirmationEndpoint;
|
|
8
|
+
private encryptionKey;
|
|
9
|
+
getAccessToken({ clientId, clientSecret, }: {
|
|
10
|
+
clientId: string;
|
|
11
|
+
clientSecret: string;
|
|
12
|
+
}): Promise<AxiosResponse>;
|
|
13
|
+
auEmandate({ requireUserConsent, accessToken, jsonData, }: {
|
|
14
|
+
requireUserConsent: boolean;
|
|
15
|
+
accessToken: string;
|
|
16
|
+
jsonData: JSON;
|
|
17
|
+
}): Promise<any>;
|
|
18
|
+
}
|
|
19
|
+
export default AuFinanceApiWrapper;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const axios_1 = __importDefault(require("axios"));
|
|
16
|
+
const auEncrypt_1 = require("./auEncrypt");
|
|
17
|
+
class AuFinanceApiWrapper {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.baseUrl = "https://api.aubankuat.in";
|
|
20
|
+
this.authEndpoint = "/oauth/accesstoken?grant_type=client_credentials";
|
|
21
|
+
this.emandateWithUserConfirmationEndpoint = "/EmandateUserRegistrationRestService/userconfirmation";
|
|
22
|
+
this.emandateWithoutUserConfirmationEndpoint = "/EmandateUserRegistrationRestService/withoutUserConfirmation";
|
|
23
|
+
this.encryptionKey = "545932040048E8B4FAF59DCC6B20B042AE7B3DD9C282C53B6A0E66599CC01693";
|
|
24
|
+
}
|
|
25
|
+
getAccessToken({ clientId, clientSecret, }) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
try {
|
|
28
|
+
const authString = `${clientId}:${clientSecret}`;
|
|
29
|
+
const base64Auth = Buffer.from(authString).toString("base64");
|
|
30
|
+
console.log(base64Auth);
|
|
31
|
+
const response = yield axios_1.default.get(`${this.baseUrl}${this.authEndpoint}`, {
|
|
32
|
+
headers: {
|
|
33
|
+
Authorization: `Basic ${base64Auth}`,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
return response;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
auEmandate({ requireUserConsent, accessToken, jsonData, }) {
|
|
44
|
+
var _a;
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
requireUserConsent
|
|
47
|
+
? (this.enachEndpoint = this.emandateWithUserConfirmationEndpoint)
|
|
48
|
+
: (this.enachEndpoint = this.emandateWithoutUserConfirmationEndpoint);
|
|
49
|
+
let jsonString = JSON.stringify(jsonData);
|
|
50
|
+
const encryptedData = (0, auEncrypt_1.encrypt)(this.encryptionKey, jsonString);
|
|
51
|
+
const headers = {
|
|
52
|
+
Authorization: `Bearer ${accessToken}`,
|
|
53
|
+
"Content-Type": "application/json",
|
|
54
|
+
};
|
|
55
|
+
const body = {
|
|
56
|
+
encvalue: encryptedData,
|
|
57
|
+
};
|
|
58
|
+
try {
|
|
59
|
+
const response = yield axios_1.default.post(`${this.baseUrl}${this.enachEndpoint}`, body, { headers: headers });
|
|
60
|
+
console.log(response.data);
|
|
61
|
+
const res = response.data;
|
|
62
|
+
const decryptedData = (0, auEncrypt_1.decrypt)(this.encryptionKey, res);
|
|
63
|
+
return decryptedData;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
console.error("Error:", (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data);
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.default = AuFinanceApiWrapper;
|
|
73
|
+
//# sourceMappingURL=auFinance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auFinance.js","sourceRoot":"","sources":["../../src/Finance/auFinance.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,2CAA+C;AAE/C,MAAM,mBAAmB;IAAzB;QAEU,YAAO,GAAG,0BAA0B,CAAC;QACrC,iBAAY,GAAG,kDAAkD,CAAC;QAClE,yCAAoC,GAC1C,uDAAuD,CAAC;QAClD,4CAAuC,GAC7C,8DAA8D,CAAC;QACzD,kBAAa,GACnB,kEAAkE,CAAC;IAgEvE,CAAC;IA9DO,cAAc,CAAC,EACnB,QAAQ,EACR,YAAY,GAIb;;YACC,IAAI;gBACF,MAAM,UAAU,GAAG,GAAG,QAAQ,IAAI,YAAY,EAAE,CAAC;gBACjD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAC9D,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAExB,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,EAAE,EAAE;oBACtE,OAAO,EAAE;wBACP,aAAa,EAAE,SAAS,UAAU,EAAE;qBACrC;iBACF,CAAC,CAAC;gBAEH,OAAO,QAAQ,CAAC;aACjB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,KAAK,CAAC;aACb;QACH,CAAC;KAAA;IAEK,UAAU,CAAC,EACf,kBAAkB,EAClB,WAAW,EACX,QAAQ,GAKT;;;YACC,kBAAkB;gBAChB,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,oCAAoC,CAAC;gBAClE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,uCAAuC,CAAC,CAAC;YAExE,IAAI,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC1C,MAAM,aAAa,GAAG,IAAA,mBAAO,EAAC,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YAE9D,MAAM,OAAO,GAAG;gBACd,aAAa,EAAE,UAAU,WAAW,EAAE;gBACtC,cAAc,EAAE,kBAAkB;aACnC,CAAC;YACF,MAAM,IAAI,GAAG;gBACX,QAAQ,EAAE,aAAa;aACxB,CAAC;YACF,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,IAAI,CAC/B,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,EAAE,EACtC,IAAI,EACJ,EAAE,OAAO,EAAE,OAAO,EAAE,CACrB,CAAC;gBACF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAC3B,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC;gBAC1B,MAAM,aAAa,GAAG,IAAA,mBAAO,EAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;gBACvD,OAAO,aAAa,CAAC;aACtB;YAAC,OAAO,KAAU,EAAE;gBACnB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,0CAAE,IAAI,CAAC,CAAC;gBAC/C,MAAM,KAAK,CAAC;aACb;;KACF;CACF;AACD,kBAAe,mBAAmB,CAAC"}
|
package/dist/Finance/index.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ import NovelApiWrapper from "./novel";
|
|
|
3
3
|
import IngenicoApiWrapper from "./ingenico";
|
|
4
4
|
import CrimeSearchAPIWrapper from "./crimeCheck";
|
|
5
5
|
import QbrikApiWrapper from "./qbrik";
|
|
6
|
+
import AuFinanceApiWrapper from "./auFinance";
|
|
6
7
|
export declare const finance: {
|
|
7
8
|
idFy: typeof IdfyAPIWrapper;
|
|
8
9
|
novel: typeof NovelApiWrapper;
|
|
9
10
|
ingenico: typeof IngenicoApiWrapper;
|
|
10
11
|
crimecheck: typeof CrimeSearchAPIWrapper;
|
|
11
12
|
qbrik: typeof QbrikApiWrapper;
|
|
13
|
+
auFinance: typeof AuFinanceApiWrapper;
|
|
12
14
|
};
|
package/dist/Finance/index.js
CHANGED
|
@@ -9,11 +9,13 @@ const novel_1 = __importDefault(require("./novel"));
|
|
|
9
9
|
const ingenico_1 = __importDefault(require("./ingenico"));
|
|
10
10
|
const crimeCheck_1 = __importDefault(require("./crimeCheck"));
|
|
11
11
|
const qbrik_1 = __importDefault(require("./qbrik"));
|
|
12
|
+
const auFinance_1 = __importDefault(require("./auFinance"));
|
|
12
13
|
exports.finance = {
|
|
13
14
|
idFy: idfy_1.default,
|
|
14
15
|
novel: novel_1.default,
|
|
15
16
|
ingenico: ingenico_1.default,
|
|
16
17
|
crimecheck: crimeCheck_1.default,
|
|
17
18
|
qbrik: qbrik_1.default,
|
|
19
|
+
auFinance: auFinance_1.default,
|
|
18
20
|
};
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Finance/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAoC;AACpC,oDAAsC;AACtC,0DAA4C;AAC5C,8DAAiD;AACjD,oDAAsC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Finance/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAoC;AACpC,oDAAsC;AACtC,0DAA4C;AAC5C,8DAAiD;AACjD,oDAAsC;AACtC,4DAA8C;AAEjC,QAAA,OAAO,GAAG;IACrB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,kBAAkB;IAC5B,UAAU,EAAE,oBAAqB;IACjC,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,mBAAmB;CAC/B,CAAC"}
|
|
@@ -2,120 +2,120 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mandateHtml = void 0;
|
|
4
4
|
const mandateHtml = (mandateData, tokenId) => {
|
|
5
|
-
return `<!DOCTYPE html>
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>Checkout Demo</title>
|
|
9
|
-
<meta name="viewport" content="user-scalable=no, width=device-width,
|
|
10
|
-
initial-scale=1" / />
|
|
11
|
-
<script
|
|
12
|
-
src="https://www.paynimo.com/paynimocheckout/client/lib/jquery.min.js"
|
|
13
|
-
type="text/javascript"
|
|
14
|
-
></script>
|
|
15
|
-
</head>
|
|
16
|
-
|
|
17
|
-
<body>
|
|
18
|
-
<button id="btnSubmit">Register Now</button>
|
|
19
|
-
|
|
20
|
-
<script
|
|
21
|
-
type="text/javascript"
|
|
22
|
-
src="https://www.paynimo.com/paynimocheckout/server/lib/checkout.js"
|
|
23
|
-
></script>
|
|
24
|
-
|
|
25
|
-
<script type="text/javascript">
|
|
26
|
-
$(document).ready(function () {
|
|
27
|
-
function handleResponse(res) {
|
|
28
|
-
if (
|
|
29
|
-
typeof res != "undefined" &&
|
|
30
|
-
typeof res.paymentMethod != "undefined" &&
|
|
31
|
-
typeof res.paymentMethod.paymentTransaction != "undefined" &&
|
|
32
|
-
typeof res.paymentMethod.paymentTransaction.statusCode !=
|
|
33
|
-
"undefined" &&
|
|
34
|
-
res.paymentMethod.paymentTransaction.statusCode == "0300"
|
|
35
|
-
) {
|
|
36
|
-
// success block
|
|
37
|
-
console.log("success block",res);
|
|
38
|
-
} else if (
|
|
39
|
-
typeof res != "undefined" &&
|
|
40
|
-
typeof res.paymentMethod != "undefined" &&
|
|
41
|
-
typeof res.paymentMethod.paymentTransaction != "undefined" &&
|
|
42
|
-
typeof res.paymentMethod.paymentTransaction.statusCode !=
|
|
43
|
-
"undefined" &&
|
|
44
|
-
res.paymentMethod.paymentTransaction.statusCode == "0398"
|
|
45
|
-
) {
|
|
46
|
-
// initiated block
|
|
47
|
-
console.log("initiate block",res);
|
|
48
|
-
} else {
|
|
49
|
-
// error block
|
|
50
|
-
console.log("error block",res);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
$(document)
|
|
55
|
-
.off("click", "#btnSubmit")
|
|
56
|
-
.on("click", "#btnSubmit", function (e) {
|
|
57
|
-
e.preventDefault();
|
|
58
|
-
|
|
59
|
-
var reqJson = {
|
|
60
|
-
features: {
|
|
61
|
-
enableAbortResponse: true,
|
|
62
|
-
enableNewWindowFlow: true, //for hybrid applications please disable this by passing false
|
|
63
|
-
enableExpressPay: true,
|
|
64
|
-
enableMerTxnDetails: true,
|
|
65
|
-
siDetailsAtMerchantEnd: true,
|
|
66
|
-
enableSI: true,
|
|
67
|
-
},
|
|
68
|
-
consumerData: {
|
|
69
|
-
deviceId: "WEBSH2",
|
|
70
|
-
token:"${tokenId}",
|
|
71
|
-
returnUrl:
|
|
72
|
-
"https://aerem.co/", //merchant response page URL
|
|
73
|
-
responseHandler: handleResponse,
|
|
74
|
-
paymentMode: "${mandateData.paymentMode}",
|
|
75
|
-
merchantLogoUrl:
|
|
76
|
-
"https://www.paynimo.com/CompanyDocs/company-logo-vertical.png",
|
|
77
|
-
merchantId: "${mandateData.merchantId}",
|
|
78
|
-
currency: "INR",
|
|
79
|
-
consumerId: "${mandateData.consumerId}",
|
|
80
|
-
consumerMobileNo: "${mandateData.consumerMobileNo}",
|
|
81
|
-
consumerEmailId: "${mandateData.consumerEmailId}",
|
|
82
|
-
txnId: "${mandateData.txnId}",
|
|
83
|
-
|
|
84
|
-
items: [
|
|
85
|
-
{
|
|
86
|
-
itemId: "FIRST",
|
|
87
|
-
amount: "${mandateData.totalamount}",
|
|
88
|
-
comAmt: "0",
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
customStyle: {
|
|
92
|
-
PRIMARY_COLOR_CODE: "#45beaa",
|
|
93
|
-
SECONDARY_COLOR_CODE: "#FFFFFF",
|
|
94
|
-
BUTTON_COLOR_CODE_1: "#2d8c8c",
|
|
95
|
-
BUTTON_COLOR_CODE_2: "#FFFFFF",
|
|
96
|
-
},
|
|
97
|
-
accountNo: "${mandateData.accountNo}", //Pass this if accountNo is captured at merchant side for eMandate/eNACH
|
|
98
|
-
|
|
99
|
-
ifscCode: "${mandateData.ifscCode}", //Pass this if ifscCode is captured at merchant side.
|
|
100
|
-
accountType: "${mandateData.accountType}", //Required for eNACH registration this is mandatory field
|
|
101
|
-
debitStartDate: "${mandateData.debitStartDate}",
|
|
102
|
-
debitEndDate: "${mandateData.debitEndDate}",
|
|
103
|
-
maxAmount: "${mandateData.maxAmount}",
|
|
104
|
-
amountType: "${mandateData.amountType}",
|
|
105
|
-
frequency: "${mandateData.frequency}",
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
$.pnCheckout(reqJson);
|
|
110
|
-
if (reqJson.features.enableNewWindowFlow) {
|
|
111
|
-
pnCheckoutShared.openNewWindow();
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
</script>
|
|
116
|
-
</body>
|
|
117
|
-
</html>
|
|
118
|
-
|
|
5
|
+
return `<!DOCTYPE html>
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>Checkout Demo</title>
|
|
9
|
+
<meta name="viewport" content="user-scalable=no, width=device-width,
|
|
10
|
+
initial-scale=1" / />
|
|
11
|
+
<script
|
|
12
|
+
src="https://www.paynimo.com/paynimocheckout/client/lib/jquery.min.js"
|
|
13
|
+
type="text/javascript"
|
|
14
|
+
></script>
|
|
15
|
+
</head>
|
|
16
|
+
|
|
17
|
+
<body>
|
|
18
|
+
<button id="btnSubmit">Register Now</button>
|
|
19
|
+
|
|
20
|
+
<script
|
|
21
|
+
type="text/javascript"
|
|
22
|
+
src="https://www.paynimo.com/paynimocheckout/server/lib/checkout.js"
|
|
23
|
+
></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript">
|
|
26
|
+
$(document).ready(function () {
|
|
27
|
+
function handleResponse(res) {
|
|
28
|
+
if (
|
|
29
|
+
typeof res != "undefined" &&
|
|
30
|
+
typeof res.paymentMethod != "undefined" &&
|
|
31
|
+
typeof res.paymentMethod.paymentTransaction != "undefined" &&
|
|
32
|
+
typeof res.paymentMethod.paymentTransaction.statusCode !=
|
|
33
|
+
"undefined" &&
|
|
34
|
+
res.paymentMethod.paymentTransaction.statusCode == "0300"
|
|
35
|
+
) {
|
|
36
|
+
// success block
|
|
37
|
+
console.log("success block",res);
|
|
38
|
+
} else if (
|
|
39
|
+
typeof res != "undefined" &&
|
|
40
|
+
typeof res.paymentMethod != "undefined" &&
|
|
41
|
+
typeof res.paymentMethod.paymentTransaction != "undefined" &&
|
|
42
|
+
typeof res.paymentMethod.paymentTransaction.statusCode !=
|
|
43
|
+
"undefined" &&
|
|
44
|
+
res.paymentMethod.paymentTransaction.statusCode == "0398"
|
|
45
|
+
) {
|
|
46
|
+
// initiated block
|
|
47
|
+
console.log("initiate block",res);
|
|
48
|
+
} else {
|
|
49
|
+
// error block
|
|
50
|
+
console.log("error block",res);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
$(document)
|
|
55
|
+
.off("click", "#btnSubmit")
|
|
56
|
+
.on("click", "#btnSubmit", function (e) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
|
|
59
|
+
var reqJson = {
|
|
60
|
+
features: {
|
|
61
|
+
enableAbortResponse: true,
|
|
62
|
+
enableNewWindowFlow: true, //for hybrid applications please disable this by passing false
|
|
63
|
+
enableExpressPay: true,
|
|
64
|
+
enableMerTxnDetails: true,
|
|
65
|
+
siDetailsAtMerchantEnd: true,
|
|
66
|
+
enableSI: true,
|
|
67
|
+
},
|
|
68
|
+
consumerData: {
|
|
69
|
+
deviceId: "WEBSH2",
|
|
70
|
+
token:"${tokenId}",
|
|
71
|
+
returnUrl:
|
|
72
|
+
"https://aerem.co/", //merchant response page URL
|
|
73
|
+
responseHandler: handleResponse,
|
|
74
|
+
paymentMode: "${mandateData.paymentMode}",
|
|
75
|
+
merchantLogoUrl:
|
|
76
|
+
"https://www.paynimo.com/CompanyDocs/company-logo-vertical.png",
|
|
77
|
+
merchantId: "${mandateData.merchantId}",
|
|
78
|
+
currency: "INR",
|
|
79
|
+
consumerId: "${mandateData.consumerId}",
|
|
80
|
+
consumerMobileNo: "${mandateData.consumerMobileNo}",
|
|
81
|
+
consumerEmailId: "${mandateData.consumerEmailId}",
|
|
82
|
+
txnId: "${mandateData.txnId}",
|
|
83
|
+
|
|
84
|
+
items: [
|
|
85
|
+
{
|
|
86
|
+
itemId: "FIRST",
|
|
87
|
+
amount: "${mandateData.totalamount}",
|
|
88
|
+
comAmt: "0",
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
customStyle: {
|
|
92
|
+
PRIMARY_COLOR_CODE: "#45beaa",
|
|
93
|
+
SECONDARY_COLOR_CODE: "#FFFFFF",
|
|
94
|
+
BUTTON_COLOR_CODE_1: "#2d8c8c",
|
|
95
|
+
BUTTON_COLOR_CODE_2: "#FFFFFF",
|
|
96
|
+
},
|
|
97
|
+
accountNo: "${mandateData.accountNo}", //Pass this if accountNo is captured at merchant side for eMandate/eNACH
|
|
98
|
+
|
|
99
|
+
ifscCode: "${mandateData.ifscCode}", //Pass this if ifscCode is captured at merchant side.
|
|
100
|
+
accountType: "${mandateData.accountType}", //Required for eNACH registration this is mandatory field
|
|
101
|
+
debitStartDate: "${mandateData.debitStartDate}",
|
|
102
|
+
debitEndDate: "${mandateData.debitEndDate}",
|
|
103
|
+
maxAmount: "${mandateData.maxAmount}",
|
|
104
|
+
amountType: "${mandateData.amountType}",
|
|
105
|
+
frequency: "${mandateData.frequency}",
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
$.pnCheckout(reqJson);
|
|
110
|
+
if (reqJson.features.enableNewWindowFlow) {
|
|
111
|
+
pnCheckoutShared.openNewWindow();
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
</script>
|
|
116
|
+
</body>
|
|
117
|
+
</html>
|
|
118
|
+
|
|
119
119
|
`;
|
|
120
120
|
};
|
|
121
121
|
exports.mandateHtml = mandateHtml;
|
package/dist/Finance/novel.js
CHANGED
|
@@ -22,7 +22,7 @@ class NovelApiWrapper {
|
|
|
22
22
|
this.downloadExcelEndpoint = "downloadFileAsExcel";
|
|
23
23
|
this.downloadJsonEndpoint = "downloadFile";
|
|
24
24
|
this.autoFetchEndpoint = "generateNetBankingRequest";
|
|
25
|
-
this.authToken = "API://
|
|
25
|
+
this.authToken = "API://cJCwpFvaLS/qd7W8APrJt3tObcKQqZubh2/yoMHXsa4=";
|
|
26
26
|
}
|
|
27
27
|
uploadDocument(file, filename, metadata, documentDetails) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -6,5 +6,5 @@ var ContentType;
|
|
|
6
6
|
ContentType["TEXT"] = "text/plain";
|
|
7
7
|
ContentType["FORM"] = "multipart/form-data";
|
|
8
8
|
ContentType["JSON"] = "application/json";
|
|
9
|
-
})(ContentType
|
|
9
|
+
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
10
10
|
//# sourceMappingURL=novel.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"novel.types.js","sourceRoot":"","sources":["../../src/Finance/novel.types.ts"],"names":[],"mappings":";;;AAmBA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,2CAA4B,CAAA;IAC5B,wCAAyB,CAAA;AAC3B,CAAC,EAJW,WAAW,
|
|
1
|
+
{"version":3,"file":"novel.types.js","sourceRoot":"","sources":["../../src/Finance/novel.types.ts"],"names":[],"mappings":";;;AAmBA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,2CAA4B,CAAA;IAC5B,wCAAyB,CAAA;AAC3B,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}
|
package/dist/Finance/qbrik.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AxiosResponse } from "axios";
|
|
2
|
+
import { AccountPayload, ApproveData, AssociateDetails, CustomerDetails, Doctype, EntityPayload, LoginDetails, MasterListInput, OpenLoanAccountType, SolarPayloadType, UpdateLoanPayloadType } from "./qbrik.types";
|
|
2
3
|
declare class QbrikApiWrapper {
|
|
3
4
|
private isUAT;
|
|
4
5
|
private baseUrl;
|
|
@@ -24,77 +25,77 @@ declare class QbrikApiWrapper {
|
|
|
24
25
|
private viewLoanScheduleEndpoint;
|
|
25
26
|
private viewLoanStatementEndpoint;
|
|
26
27
|
constructor(isUAT: boolean);
|
|
27
|
-
login(loginDetails: LoginDetails): Promise<any
|
|
28
|
+
login(loginDetails: LoginDetails): Promise<AxiosResponse<any>>;
|
|
28
29
|
getDates(accessToken: string): Promise<any>;
|
|
29
30
|
getMasterList({ masterListInput, accessToken, }: {
|
|
30
31
|
masterListInput: MasterListInput;
|
|
31
32
|
accessToken: string;
|
|
32
|
-
}): Promise<
|
|
33
|
-
identityProofMaster(accessToken: string): Promise<
|
|
34
|
-
branchMaster(accessToken: string): Promise<
|
|
33
|
+
}): Promise<AxiosResponse>;
|
|
34
|
+
identityProofMaster(accessToken: string): Promise<AxiosResponse>;
|
|
35
|
+
branchMaster(accessToken: string): Promise<AxiosResponse>;
|
|
35
36
|
enrollCustomer({ customerDetails, accessToken, }: {
|
|
36
37
|
customerDetails: CustomerDetails;
|
|
37
38
|
accessToken: string;
|
|
38
|
-
}): Promise<
|
|
39
|
+
}): Promise<AxiosResponse>;
|
|
39
40
|
viewCustomerDetails({ customerNo, accessToken, }: {
|
|
40
|
-
customerNo:
|
|
41
|
+
customerNo: string;
|
|
41
42
|
accessToken: string;
|
|
42
|
-
}): Promise<
|
|
43
|
+
}): Promise<AxiosResponse>;
|
|
43
44
|
viewBranchCustomerDetails({ branchCode, accessToken, }: {
|
|
44
|
-
branchCode:
|
|
45
|
+
branchCode: string;
|
|
45
46
|
accessToken: string;
|
|
46
|
-
}): Promise<
|
|
47
|
+
}): Promise<AxiosResponse>;
|
|
47
48
|
addLoanAssociateInformation({ associateDetails, accessToken, }: {
|
|
48
49
|
associateDetails: AssociateDetails;
|
|
49
50
|
accessToken: string;
|
|
50
|
-
}): Promise<
|
|
51
|
+
}): Promise<AxiosResponse>;
|
|
51
52
|
approve({ approveData, accessToken, }: {
|
|
52
53
|
approveData: ApproveData;
|
|
53
54
|
accessToken: string;
|
|
54
|
-
}): Promise<
|
|
55
|
+
}): Promise<AxiosResponse>;
|
|
55
56
|
viewAssociates({ accNo, accessToken, }: {
|
|
56
|
-
accNo:
|
|
57
|
+
accNo: string;
|
|
57
58
|
accessToken: string;
|
|
58
|
-
}): Promise<
|
|
59
|
+
}): Promise<AxiosResponse>;
|
|
59
60
|
addEntityProofs({ entityPayload, accessToken, }: {
|
|
60
61
|
entityPayload: EntityPayload;
|
|
61
62
|
accessToken: string;
|
|
62
|
-
}): Promise<
|
|
63
|
+
}): Promise<AxiosResponse>;
|
|
63
64
|
openLoanAccount({ loanPayload, accessToken, }: {
|
|
64
|
-
loanPayload:
|
|
65
|
+
loanPayload: OpenLoanAccountType;
|
|
65
66
|
accessToken: string;
|
|
66
|
-
}): Promise<
|
|
67
|
+
}): Promise<AxiosResponse>;
|
|
67
68
|
updateLoanInfo({ loanPayload, accessToken, }: {
|
|
68
|
-
loanPayload:
|
|
69
|
+
loanPayload: UpdateLoanPayloadType;
|
|
69
70
|
accessToken: string;
|
|
70
|
-
}): Promise<
|
|
71
|
+
}): Promise<AxiosResponse>;
|
|
71
72
|
addSolarInfo({ solarPayload, accessToken, }: {
|
|
72
|
-
solarPayload:
|
|
73
|
+
solarPayload: SolarPayloadType;
|
|
73
74
|
accessToken: string;
|
|
74
|
-
}): Promise<
|
|
75
|
+
}): Promise<AxiosResponse>;
|
|
75
76
|
generateDocument({ docDetails, accessToken, }: {
|
|
76
|
-
docDetails:
|
|
77
|
+
docDetails: Doctype;
|
|
77
78
|
accessToken: string;
|
|
78
|
-
}): Promise<
|
|
79
|
+
}): Promise<AxiosResponse>;
|
|
79
80
|
generateTransactionId({ actionName, accessToken, }: {
|
|
80
|
-
actionName:
|
|
81
|
+
actionName: string;
|
|
81
82
|
accessToken: string;
|
|
82
|
-
}): Promise<
|
|
83
|
+
}): Promise<AxiosResponse>;
|
|
83
84
|
addAccountDocument({ addAccPayload, accessToken, }: {
|
|
84
|
-
addAccPayload:
|
|
85
|
+
addAccPayload: AccountPayload;
|
|
85
86
|
accessToken: string;
|
|
86
|
-
}): Promise<
|
|
87
|
+
}): Promise<AxiosResponse>;
|
|
87
88
|
viewLoan({ accNo, accessToken, }: {
|
|
88
|
-
accNo:
|
|
89
|
+
accNo: string;
|
|
89
90
|
accessToken: string;
|
|
90
|
-
}): Promise<
|
|
91
|
+
}): Promise<AxiosResponse>;
|
|
91
92
|
viewLoanSchedules({ accNo, accessToken, }: {
|
|
92
|
-
accNo:
|
|
93
|
+
accNo: string;
|
|
93
94
|
accessToken: string;
|
|
94
|
-
}): Promise<
|
|
95
|
+
}): Promise<AxiosResponse>;
|
|
95
96
|
viewLoanStatement({ accNo, accessToken, }: {
|
|
96
|
-
accNo:
|
|
97
|
+
accNo: string;
|
|
97
98
|
accessToken: string;
|
|
98
|
-
}): Promise<
|
|
99
|
+
}): Promise<AxiosResponse>;
|
|
99
100
|
}
|
|
100
101
|
export default QbrikApiWrapper;
|