@konplit-services/common 1.0.234 → 1.0.236
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/build/helper/keys.js +3 -3
- package/package.json +1 -1
package/build/helper/keys.js
CHANGED
|
@@ -27,8 +27,8 @@ exports.generateOpaySign = exports.generateTransactionID = exports.generateBase6
|
|
|
27
27
|
const crypto = __importStar(require("crypto"));
|
|
28
28
|
const forge = __importStar(require("node-forge"));
|
|
29
29
|
const timestamp_1 = require("./timestamp");
|
|
30
|
-
const util_1 = require("../util");
|
|
31
30
|
const app_configs_1 = require("../app.configs");
|
|
31
|
+
const nanoid_1 = require("nanoid");
|
|
32
32
|
/**
|
|
33
33
|
* Hashing a secret using sha256
|
|
34
34
|
* @param secret - the secret to hash
|
|
@@ -149,8 +149,8 @@ exports.authData = authData;
|
|
|
149
149
|
*/
|
|
150
150
|
const generateOrderId = () => {
|
|
151
151
|
const yyyymm = (0, timestamp_1.getYearMonth)();
|
|
152
|
-
const
|
|
153
|
-
return `${yyyymm}${
|
|
152
|
+
const nanoid = (0, nanoid_1.customAlphabet)("0123456789", 24);
|
|
153
|
+
return `${yyyymm}${nanoid()}`;
|
|
154
154
|
};
|
|
155
155
|
exports.generateOrderId = generateOrderId;
|
|
156
156
|
/**
|