Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging
This commit is contained in:
commit
534865ffd5
15
package-lock.json
generated
15
package-lock.json
generated
|
@ -23,6 +23,7 @@
|
|||
"class-transformer": "^0.4.0",
|
||||
"class-validator": "^0.13.1",
|
||||
"crypto": "^1.0.1",
|
||||
"crypto-md5": "^1.0.0",
|
||||
"csv-parser": "^3.0.0",
|
||||
"decimal.js": "^10.3.1",
|
||||
"exceljs": "^4.3.0",
|
||||
|
@ -3835,6 +3836,15 @@
|
|||
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==",
|
||||
"deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in."
|
||||
},
|
||||
"node_modules/crypto-md5": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/crypto-md5/-/crypto-md5-1.0.0.tgz",
|
||||
"integrity": "sha512-65Mtei8+EkSIK+5Ie4gpWXoJ/5bgpqPXFknHHXAyhDqKsEAAzUslGd8mOeawbfcuQ8fADNKcF4xQA3fqlZJ8Ig==",
|
||||
"engines": {
|
||||
"iojs": ">=1.0.0",
|
||||
"node": ">=0.5.2"
|
||||
}
|
||||
},
|
||||
"node_modules/cssom": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz",
|
||||
|
@ -13583,6 +13593,11 @@
|
|||
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
|
||||
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig=="
|
||||
},
|
||||
"crypto-md5": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/crypto-md5/-/crypto-md5-1.0.0.tgz",
|
||||
"integrity": "sha512-65Mtei8+EkSIK+5Ie4gpWXoJ/5bgpqPXFknHHXAyhDqKsEAAzUslGd8mOeawbfcuQ8fADNKcF4xQA3fqlZJ8Ig=="
|
||||
},
|
||||
"cssom": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz",
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
"class-transformer": "^0.4.0",
|
||||
"class-validator": "^0.13.1",
|
||||
"crypto": "^1.0.1",
|
||||
"crypto-md5": "^1.0.0",
|
||||
"csv-parser": "^3.0.0",
|
||||
"decimal.js": "^10.3.1",
|
||||
"exceljs": "^4.3.0",
|
||||
|
|
|
@ -32,9 +32,7 @@ export const doTransaction = async (
|
|||
} else if (supplier.code == 'Digiflazz') {
|
||||
if (typePaid == 'INQUIRY') {
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
const cryptoMd5 = require('crypto');
|
||||
|
||||
cryptoMd5.createHash('md5').update(md5HashDigiflazz).digest('hex');
|
||||
var cryptoMd5 = require('md5');
|
||||
|
||||
const options = {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
@ -45,7 +43,7 @@ export const doTransaction = async (
|
|||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${idtrx}`,
|
||||
sign: cryptoMd5,
|
||||
sign: cryptoMd5(md5HashDigiflazz, 'hex'),
|
||||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
|
@ -57,9 +55,7 @@ export const doTransaction = async (
|
|||
return res.data;
|
||||
} else if (typePaid == 'PAYMENT') {
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
const cryptoMd5 = require('crypto');
|
||||
|
||||
cryptoMd5.createHash('md5').update(md5HashDigiflazz).digest('hex');
|
||||
var cryptoMd5 = require('md5');
|
||||
|
||||
const options = {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
@ -70,7 +66,7 @@ export const doTransaction = async (
|
|||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${billTrxId}`,
|
||||
sign: cryptoMd5,
|
||||
sign: cryptoMd5(md5HashDigiflazz, 'hex'),
|
||||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
|
@ -82,9 +78,7 @@ export const doTransaction = async (
|
|||
return res.data;
|
||||
} else {
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
const cryptoMd5 = require('crypto');
|
||||
|
||||
cryptoMd5.createHash('md5').update(md5HashDigiflazz).digest('hex');
|
||||
var cryptoMd5 = require('md5');
|
||||
|
||||
const options = {
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
|
@ -94,7 +88,7 @@ export const doTransaction = async (
|
|||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${idtrx}`,
|
||||
sign: cryptoMd5,
|
||||
sign: cryptoMd5(md5HashDigiflazz, 'hex'),
|
||||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
|
@ -103,6 +97,7 @@ export const doTransaction = async (
|
|||
options,
|
||||
);
|
||||
|
||||
console.log('resdigiflazz', res);
|
||||
return res.data;
|
||||
}
|
||||
} else if (supplier.code == 'Hemat') {
|
||||
|
|
|
@ -2265,6 +2265,11 @@
|
|||
"shebang-command" "^2.0.0"
|
||||
"which" "^2.0.1"
|
||||
|
||||
"crypto-md5@^1.0.0":
|
||||
"integrity" "sha512-65Mtei8+EkSIK+5Ie4gpWXoJ/5bgpqPXFknHHXAyhDqKsEAAzUslGd8mOeawbfcuQ8fADNKcF4xQA3fqlZJ8Ig=="
|
||||
"resolved" "https://registry.npmjs.org/crypto-md5/-/crypto-md5-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"crypto@^1.0.1":
|
||||
"integrity" "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig=="
|
||||
"resolved" "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz"
|
||||
|
|
Loading…
Reference in New Issue
Block a user