fix: ppob callback

This commit is contained in:
ilham
2022-05-24 00:42:58 +07:00
parent c26294ac50
commit 6f29457720
3 changed files with 16 additions and 4 deletions

View File

@@ -887,6 +887,7 @@ export class TransactionService {
product_code: orderTransactionDto.productCode,
partner_trx_id: orderTransactionDto.trx_id,
product_price: product_price,
status: 'PENDING',
});
}
} catch (e) {
@@ -1399,9 +1400,9 @@ export class TransactionService {
}
}
async findAll(user: string) {
async findAll(user: string, page, pageSize?) {
try {
return this.checkBillHistoryRepository.find({
return await this.checkBillHistoryRepository.findAndCount({
where: {
user: user,
},
@@ -1414,6 +1415,8 @@ export class TransactionService {
'partner_trx_id',
'createdAt',
],
skip: page * (pageSize || 10),
take: pageSize || 10,
order: {
createdAt: 'DESC',
}
@@ -1859,6 +1862,7 @@ export class TransactionService {
{
amount: amount + product_price.partner_fee + product_price.mark_up_price,
admin_price: admin,
status: status ? 'SUCCESS' : 'FAILED',
},
);