confirm payment
This commit is contained in:
@@ -71,11 +71,13 @@ export class PaymentService {
|
||||
throw new BadRequestException("you can not pay beause Balance is zero")
|
||||
}
|
||||
|
||||
|
||||
if (amount <= 0) {
|
||||
throw new BadRequestException(PaymentMessage.AMOUNT_MUST_BE_GREATER_THAN_ZERO);
|
||||
}
|
||||
|
||||
if (amount > order.balance) {
|
||||
throw new BadRequestException(`You cant pay more than ${order.balance}`);
|
||||
}
|
||||
|
||||
return {
|
||||
user: order.user,
|
||||
|
||||
Reference in New Issue
Block a user