Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging
This commit is contained in:
commit
ffdf888d24
|
@ -299,6 +299,22 @@ export class TransactionService {
|
|||
orderTransactionDto: OrderTransactionDto,
|
||||
currentUser: any,
|
||||
) {
|
||||
|
||||
const productData = await this.productService.findOne(
|
||||
orderTransactionDto.productCode,
|
||||
'prepaid',
|
||||
);
|
||||
|
||||
if (productData.status == 'NOT ACTIVE') {
|
||||
throw new HttpException(
|
||||
{
|
||||
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
error: `Transaction Failed because product is not active`,
|
||||
},
|
||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||
);
|
||||
} else {
|
||||
|
||||
const trxId = Array(6)
|
||||
.fill(null)
|
||||
.map(() => {
|
||||
|
@ -434,6 +450,7 @@ export class TransactionService {
|
|||
status: statusTransaction[statusTransaction.SUCCESS],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
async orderTransactionProd(
|
||||
orderTransactionDto: OrderTransactionDto,
|
||||
|
|
Loading…
Reference in New Issue
Block a user