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