aeremmiddleware 1.0.26 → 1.0.28
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/Ingenico.types.d.ts +5 -4
- package/dist/Finance/ingenicoHtml.js +114 -114
- package/dist/Finance/ingenicoHtml.js.map +1 -1
- package/dist/Finance/novel.types.js +1 -1
- package/dist/Finance/novel.types.js.map +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/package.json +21 -21
- package/src/Finance/Ingenico.types.ts +22 -21
- package/src/Finance/auEncrypt.ts +32 -32
- package/src/Finance/auFinance.ts +115 -115
- package/src/Finance/crimeCheck.ts +212 -212
- 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 +16 -16
- package/src/Finance/ingenico.ts +104 -104
- package/src/Finance/ingenicoHtml.ts +119 -119
- package/src/Finance/novel.ts +233 -233
- package/src/Finance/novel.types.ts +30 -30
- package/src/Finance/qbrik.ts +828 -828
- package/src/Finance/qbrik.types.ts +131 -131
- package/src/Finance/setu.ts +560 -560
- package/src/Finance/setu.types.ts +44 -44
- 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
|
|
@@ -2,7 +2,6 @@ export interface MandateDataType {
|
|
|
2
2
|
merchantId: string;
|
|
3
3
|
txnId: string;
|
|
4
4
|
totalamount: string;
|
|
5
|
-
accountNo: string;
|
|
6
5
|
consumerId: string;
|
|
7
6
|
consumerMobileNo: string;
|
|
8
7
|
consumerEmailId: string;
|
|
@@ -11,11 +10,13 @@ export interface MandateDataType {
|
|
|
11
10
|
maxAmount: string;
|
|
12
11
|
amountType: string;
|
|
13
12
|
frequency: string;
|
|
13
|
+
accountType: string;
|
|
14
|
+
returnUrl: string;
|
|
14
15
|
cardNumber?: string;
|
|
15
16
|
expMonth?: string;
|
|
16
17
|
expYear?: string;
|
|
17
18
|
cvvCode?: string;
|
|
18
|
-
paymentMode
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
paymentMode?: string;
|
|
20
|
+
accountNo?: string;
|
|
21
|
+
ifscCode?: string;
|
|
21
22
|
}
|
|
@@ -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
|
-
"
|
|
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
|
+
"${mandateData === null || mandateData === void 0 ? void 0 : mandateData.returnUrl}", //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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingenicoHtml.js","sourceRoot":"","sources":["../../src/Finance/ingenicoHtml.ts"],"names":[],"mappings":";;;AAEO,MAAM,WAAW,GAAG,CAAC,WAA4B,EAAE,OAAe,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"ingenicoHtml.js","sourceRoot":"","sources":["../../src/Finance/ingenicoHtml.ts"],"names":[],"mappings":";;;AAEO,MAAM,WAAW,GAAG,CAAC,WAA4B,EAAE,OAAe,EAAE,EAAE;IACzE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAiEgB,OAAO;;uBAEX,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS;;kCAEX,WAAW,CAAC,WAAW;;;iCAGxB,WAAW,CAAC,UAAU;;iCAEtB,WAAW,CAAC,UAAU;uCAChB,WAAW,CAAC,gBAAgB;sCAC7B,WAAW,CAAC,eAAe;4BACrC,WAAW,CAAC,KAAK;;;;;iCAKZ,WAAW,CAAC,WAAW;;;;;;;;;;gCAUxB,WAAW,CAAC,SAAS;;+BAEtB,WAAW,CAAC,QAAQ;kCACjB,WAAW,CAAC,WAAW;qCACpB,WAAW,CAAC,cAAc;mCAC5B,WAAW,CAAC,YAAY;gCAC3B,WAAW,CAAC,SAAS;iCACpB,WAAW,CAAC,UAAU;gCACvB,WAAW,CAAC,SAAS;;;;;;;;;;;;;;GAclD,CAAC;AACJ,CAAC,CAAC;AApHW,QAAA,WAAW,eAoHtB"}
|
|
@@ -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 || (exports.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":";;;AAyBA,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":";;;AAyBA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,2CAA4B,CAAA;IAC5B,wCAAyB,CAAA;AAC3B,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sms.types.js","sourceRoot":"","sources":["../../src/Socials/Sms.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAGT;AAHH,WAAY,QAAQ;IAChB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAHS,QAAQ,
|
|
1
|
+
{"version":3,"file":"Sms.types.js","sourceRoot":"","sources":["../../src/Socials/Sms.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAGT;AAHH,WAAY,QAAQ;IAChB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAHS,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Whatsapp.types.js","sourceRoot":"","sources":["../../src/Socials/Whatsapp.types.ts"],"names":[],"mappings":";;;AA4FE,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAHW,QAAQ,
|
|
1
|
+
{"version":3,"file":"Whatsapp.types.js","sourceRoot":"","sources":["../../src/Socials/Whatsapp.types.ts"],"names":[],"mappings":";;;AA4FE,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "aeremmiddleware",
|
|
3
|
+
"version": "1.0.28",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "dist/index.d.ts",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"prod": "node ./build/src/index.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"author": "",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"axios": "^1.5.1",
|
|
16
|
+
"fcm-node": "^1.6.1"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^20.8.2"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export interface MandateDataType {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
export interface MandateDataType {
|
|
2
|
+
merchantId: string;
|
|
3
|
+
txnId: string;
|
|
4
|
+
totalamount: string;
|
|
5
|
+
consumerId: string;
|
|
6
|
+
consumerMobileNo: string;
|
|
7
|
+
consumerEmailId: string;
|
|
8
|
+
debitStartDate: string;
|
|
9
|
+
debitEndDate: string;
|
|
10
|
+
maxAmount: string;
|
|
11
|
+
amountType: string;
|
|
12
|
+
frequency: string;
|
|
13
|
+
accountType: string;
|
|
14
|
+
returnUrl: string;
|
|
15
|
+
cardNumber?: string;
|
|
16
|
+
expMonth?: string;
|
|
17
|
+
expYear?: string;
|
|
18
|
+
cvvCode?: string;
|
|
19
|
+
paymentMode?: string;
|
|
20
|
+
accountNo?: string;
|
|
21
|
+
ifscCode?: string;
|
|
22
|
+
}
|
package/src/Finance/auEncrypt.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { createCipheriv, createDecipheriv, pbkdf2Sync } from "crypto";
|
|
2
|
-
|
|
3
|
-
export function encrypt(keyString: string, plaintext: string): string {
|
|
4
|
-
const salt = Buffer.from([
|
|
5
|
-
73, 118, 97, 110, 32, 77, 101, 100, 118, 101, 100, 101, 118,
|
|
6
|
-
]);
|
|
7
|
-
const key = pbkdf2Sync(keyString, salt, 1000, 384, "sha1");
|
|
8
|
-
const iv = Buffer.alloc(16);
|
|
9
|
-
key.copy(iv, 0, 32, 48);
|
|
10
|
-
const cipher = createCipheriv("aes-256-cbc", key.slice(0, 32), iv);
|
|
11
|
-
const encrypted = Buffer.concat([
|
|
12
|
-
cipher.update(plaintext, "utf16le"),
|
|
13
|
-
cipher.final(),
|
|
14
|
-
]);
|
|
15
|
-
return encrypted.toString("base64");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function decrypt(keyString: string, encryptedData: string): string {
|
|
19
|
-
const salt = Buffer.from([
|
|
20
|
-
73, 118, 97, 110, 32, 77, 101, 100, 118, 101, 100, 101, 118,
|
|
21
|
-
]);
|
|
22
|
-
const key = pbkdf2Sync(keyString, salt, 1000, 384, "sha1");
|
|
23
|
-
const iv = Buffer.alloc(16);
|
|
24
|
-
key.copy(iv, 0, 32, 48);
|
|
25
|
-
const encryptedText = Buffer.from(encryptedData, "base64");
|
|
26
|
-
const decipher = createDecipheriv("aes-256-cbc", key.slice(0, 32), iv);
|
|
27
|
-
const decrypted = Buffer.concat([
|
|
28
|
-
decipher.update(encryptedText),
|
|
29
|
-
decipher.final(),
|
|
30
|
-
]);
|
|
31
|
-
return decrypted.toString("utf16le");
|
|
32
|
-
}
|
|
1
|
+
import { createCipheriv, createDecipheriv, pbkdf2Sync } from "crypto";
|
|
2
|
+
|
|
3
|
+
export function encrypt(keyString: string, plaintext: string): string {
|
|
4
|
+
const salt = Buffer.from([
|
|
5
|
+
73, 118, 97, 110, 32, 77, 101, 100, 118, 101, 100, 101, 118,
|
|
6
|
+
]);
|
|
7
|
+
const key = pbkdf2Sync(keyString, salt, 1000, 384, "sha1");
|
|
8
|
+
const iv = Buffer.alloc(16);
|
|
9
|
+
key.copy(iv, 0, 32, 48);
|
|
10
|
+
const cipher = createCipheriv("aes-256-cbc", key.slice(0, 32), iv);
|
|
11
|
+
const encrypted = Buffer.concat([
|
|
12
|
+
cipher.update(plaintext, "utf16le"),
|
|
13
|
+
cipher.final(),
|
|
14
|
+
]);
|
|
15
|
+
return encrypted.toString("base64");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function decrypt(keyString: string, encryptedData: string): string {
|
|
19
|
+
const salt = Buffer.from([
|
|
20
|
+
73, 118, 97, 110, 32, 77, 101, 100, 118, 101, 100, 101, 118,
|
|
21
|
+
]);
|
|
22
|
+
const key = pbkdf2Sync(keyString, salt, 1000, 384, "sha1");
|
|
23
|
+
const iv = Buffer.alloc(16);
|
|
24
|
+
key.copy(iv, 0, 32, 48);
|
|
25
|
+
const encryptedText = Buffer.from(encryptedData, "base64");
|
|
26
|
+
const decipher = createDecipheriv("aes-256-cbc", key.slice(0, 32), iv);
|
|
27
|
+
const decrypted = Buffer.concat([
|
|
28
|
+
decipher.update(encryptedText),
|
|
29
|
+
decipher.final(),
|
|
30
|
+
]);
|
|
31
|
+
return decrypted.toString("utf16le");
|
|
32
|
+
}
|