fix: ppob callback
This commit is contained in:
parent
d2deb841f9
commit
c26294ac50
|
@ -155,14 +155,13 @@ export class TransactionController {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('check-bill-history/:id')
|
@Get('check-bill-history')
|
||||||
async getCheckBillHistory(
|
async getCheckBillHistory(
|
||||||
@Param('id') id: string,
|
@Param('id') id: string,
|
||||||
@Request() req,
|
@Request() req,
|
||||||
) {
|
) {
|
||||||
const data = await this.transactionService.findOne(
|
const data = await this.transactionService.findAll(
|
||||||
req.user.userId,
|
req.user.userId,
|
||||||
id,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1399,6 +1399,36 @@ export class TransactionService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async findAll(user: string) {
|
||||||
|
try {
|
||||||
|
return this.checkBillHistoryRepository.find({
|
||||||
|
where: {
|
||||||
|
user: user,
|
||||||
|
},
|
||||||
|
select: [
|
||||||
|
'amount',
|
||||||
|
'admin_price',
|
||||||
|
'product_code',
|
||||||
|
'destination',
|
||||||
|
'trx_id',
|
||||||
|
'partner_trx_id',
|
||||||
|
'createdAt',
|
||||||
|
],
|
||||||
|
order: {
|
||||||
|
createdAt: 'DESC',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
throw new HttpException(
|
||||||
|
{
|
||||||
|
statusCode: HttpStatus.NOT_FOUND,
|
||||||
|
error: 'Billing not found',
|
||||||
|
},
|
||||||
|
HttpStatus.NOT_FOUND,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async topUpHistoryByUser(
|
async topUpHistoryByUser(
|
||||||
page: number,
|
page: number,
|
||||||
user: string,
|
user: string,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user