- added digiflazz supplier
This commit is contained in:
parent
823dbf1912
commit
5463d1b12b
|
@ -31,7 +31,7 @@ export const doTransaction = async (
|
|||
return res.data;
|
||||
} else if (supplier.code == 'Digiflazz') {
|
||||
if (typePaid == 'INQUIRY') {
|
||||
const md5HashDigiflazz = `${irs_user}${irs_pass}${idtrx}`;
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
const cryptoMd5 = require('crypto');
|
||||
|
||||
cryptoMd5.createHash('md5').update(md5HashDigiflazz).digest('hex');
|
||||
|
@ -41,7 +41,7 @@ export const doTransaction = async (
|
|||
};
|
||||
const data = {
|
||||
commands: 'inq-pasca',
|
||||
username: irs_user,
|
||||
username: supplier.irs_user,
|
||||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${idtrx}`,
|
||||
|
@ -49,14 +49,14 @@ export const doTransaction = async (
|
|||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
`${supplier.url}/v1/transaction`,
|
||||
`${supplier.url}/transaction`,
|
||||
data,
|
||||
options,
|
||||
);
|
||||
|
||||
return res.data;
|
||||
} else if (typePaid == 'PAYMENT') {
|
||||
const md5HashDigiflazz = `${irs_user}${irs_pass}${idtrx}`;
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
const cryptoMd5 = require('crypto');
|
||||
|
||||
cryptoMd5.createHash('md5').update(md5HashDigiflazz).digest('hex');
|
||||
|
@ -66,7 +66,7 @@ export const doTransaction = async (
|
|||
};
|
||||
const data = {
|
||||
commands: 'pay-pasca',
|
||||
username: irs_user,
|
||||
username: supplier.irs_user,
|
||||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${billTrxId}`,
|
||||
|
@ -74,14 +74,14 @@ export const doTransaction = async (
|
|||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
`${supplier.url}/v1/transaction`,
|
||||
`${supplier.url}/transaction`,
|
||||
data,
|
||||
options,
|
||||
);
|
||||
|
||||
return res.data;
|
||||
} else {
|
||||
const md5HashDigiflazz = `${irs_user}${irs_pass}${idtrx}`;
|
||||
const md5HashDigiflazz = `${supplier.irs_user}${supplier.irs_pass}${idtrx}`;
|
||||
const cryptoMd5 = require('crypto');
|
||||
|
||||
cryptoMd5.createHash('md5').update(md5HashDigiflazz).digest('hex');
|
||||
|
@ -90,7 +90,7 @@ export const doTransaction = async (
|
|||
headers: {'Content-Type': 'application/json'},
|
||||
};
|
||||
const data = {
|
||||
username: irs_user,
|
||||
username: supplier.irs_user,
|
||||
customer_no: `${destination}`,
|
||||
buyer_sku_code: `${productCode}`,
|
||||
ref_id: `${idtrx}`,
|
||||
|
@ -98,7 +98,7 @@ export const doTransaction = async (
|
|||
testing: true,
|
||||
};
|
||||
const res = await axios.post(
|
||||
`${supplier.url}/v1/transaction`,
|
||||
`${supplier.url}/transaction`,
|
||||
data,
|
||||
options,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user