fixing: callback transaction
This commit is contained in:
@@ -67,13 +67,12 @@ export class PpobCallbackController {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const splitMessage = response['message'].split('","');
|
const splitMessage = response['message'].split('"');
|
||||||
|
|
||||||
//TODO: UPDATE BERHASIL
|
//TODO: UPDATE BERHASIL
|
||||||
await this.transactionService.updateBill(
|
await this.transactionService.updateBill(
|
||||||
response['refid'],
|
response['refid'],
|
||||||
splitMessage[3].replace(/^\D+/g, ''),
|
Number(splitMessage[9].replace(/^\D+/g, '')),
|
||||||
splitMessage[4].replace(/^\D+/g, ''),
|
Number(splitMessage[11].replace(/^\D+/g, '')),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
//
|
//
|
||||||
|
@@ -1815,7 +1815,7 @@ export class TransactionService {
|
|||||||
status: boolean,
|
status: boolean,
|
||||||
) {
|
) {
|
||||||
const billData = await this.findOneBillById(trxId);
|
const billData = await this.findOneBillById(trxId);
|
||||||
|
console.log(billData,"ini dia")
|
||||||
const userData = await this.userService.findExist(billData.user);
|
const userData = await this.userService.findExist(billData.user);
|
||||||
|
|
||||||
const product_price = await this.productHistoryPriceService.findById(
|
const product_price = await this.productHistoryPriceService.findById(
|
||||||
@@ -1855,6 +1855,7 @@ export class TransactionService {
|
|||||||
async findOneBillById(trxId: string) {
|
async findOneBillById(trxId: string) {
|
||||||
try {
|
try {
|
||||||
return await this.checkBillHistoryRepository.findOneOrFail({
|
return await this.checkBillHistoryRepository.findOneOrFail({
|
||||||
|
relations: ['product_price'],
|
||||||
where: {
|
where: {
|
||||||
trx_id: trxId,
|
trx_id: trxId,
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user