Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging
This commit is contained in:
commit
4bee13c5f5
11
package-lock.json
generated
11
package-lock.json
generated
|
@ -31,6 +31,7 @@
|
|||
"fs-extra": "^10.0.0",
|
||||
"joi": "^17.4.2",
|
||||
"lodash": "^4.17.21",
|
||||
"md5-hash": "^1.0.1",
|
||||
"moment": "^2.29.4",
|
||||
"nestjs-pino": "^2.3.1",
|
||||
"passport": "^0.4.0",
|
||||
|
@ -7358,6 +7359,11 @@
|
|||
"tmpl": "1.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/md5-hash": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/md5-hash/-/md5-hash-1.0.1.tgz",
|
||||
"integrity": "sha512-McGTs7cIc3JSw9SJH5JxFCJRoI1bi9tKh89LZxpHobmY2YGGhYTnDZ2rxcvNv0Bs1gBbSwSQfCwbuFleZOkkYA=="
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
|
@ -16405,6 +16411,11 @@
|
|||
"tmpl": "1.0.5"
|
||||
}
|
||||
},
|
||||
"md5-hash": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/md5-hash/-/md5-hash-1.0.1.tgz",
|
||||
"integrity": "sha512-McGTs7cIc3JSw9SJH5JxFCJRoI1bi9tKh89LZxpHobmY2YGGhYTnDZ2rxcvNv0Bs1gBbSwSQfCwbuFleZOkkYA=="
|
||||
},
|
||||
"media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
"fs-extra": "^10.0.0",
|
||||
"joi": "^17.4.2",
|
||||
"lodash": "^4.17.21",
|
||||
"md5-hash": "^1.0.1",
|
||||
"moment": "^2.29.4",
|
||||
"nestjs-pino": "^2.3.1",
|
||||
"passport": "^0.4.0",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import axios from 'axios';
|
||||
import cryptoMd5 from "crypto";
|
||||
import md5 from 'md5-hash';
|
||||
|
||||
const irs_url = 'http://h2h.elangpixiu.com/api/h2h';
|
||||
const irs_id = 'PT0005';
|
||||
|
@ -32,7 +32,6 @@ export const doTransaction = async (
|
|||
} else if (supplier.code == 'Digiflazz') {
|
||||
if (typePaid == 'INQUIRY') {
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
var cryptoMd5 = require('md5');
|
||||
|
||||
const options = {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
@ -43,7 +42,7 @@ export const doTransaction = async (
|
|||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${idtrx}`,
|
||||
sign: cryptoMd5(md5HashDigiflazz, 'hex'),
|
||||
sign: md5(md5HashDigiflazz),
|
||||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
|
@ -55,7 +54,6 @@ export const doTransaction = async (
|
|||
return res.data;
|
||||
} else if (typePaid == 'PAYMENT') {
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
var cryptoMd5 = require('md5');
|
||||
|
||||
const options = {
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
@ -66,7 +64,7 @@ export const doTransaction = async (
|
|||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${billTrxId}`,
|
||||
sign: cryptoMd5(md5HashDigiflazz, 'hex'),
|
||||
sign: md5(md5HashDigiflazz),
|
||||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
|
@ -78,8 +76,7 @@ export const doTransaction = async (
|
|||
return res.data;
|
||||
} else {
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
var cryptoMd5 = require('md5');
|
||||
console.log('hashmd5', cryptoMd5(md5HashDigiflazz, 'hex'));
|
||||
console.log('hashmd5', md5(md5HashDigiflazz));
|
||||
const options = {
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
};
|
||||
|
@ -88,7 +85,7 @@ export const doTransaction = async (
|
|||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${idtrx}`,
|
||||
sign: cryptoMd5(md5HashDigiflazz, 'hex'),
|
||||
sign: md5(md5HashDigiflazz),
|
||||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
|
|
|
@ -4386,6 +4386,11 @@
|
|||
dependencies:
|
||||
"tmpl" "1.0.5"
|
||||
|
||||
"md5-hash@^1.0.1":
|
||||
"integrity" "sha512-McGTs7cIc3JSw9SJH5JxFCJRoI1bi9tKh89LZxpHobmY2YGGhYTnDZ2rxcvNv0Bs1gBbSwSQfCwbuFleZOkkYA=="
|
||||
"resolved" "https://registry.npmjs.org/md5-hash/-/md5-hash-1.0.1.tgz"
|
||||
"version" "1.0.1"
|
||||
|
||||
"media-typer@0.3.0":
|
||||
"integrity" "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
|
||||
"resolved" "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
|
||||
|
|
Loading…
Reference in New Issue
Block a user