payment
This commit is contained in:
@@ -14,7 +14,7 @@ export class PaymentsService {
|
||||
restaurantPaymentMethodId: string,
|
||||
amount: number,
|
||||
orderId: string,
|
||||
): Promise<{ paymentUrl: string }> {
|
||||
): Promise<{ paymentUrl: string | null }> {
|
||||
// Validate amount
|
||||
if (amount <= 0) {
|
||||
throw new BadRequestException('Amount must be greater than zero');
|
||||
@@ -37,7 +37,7 @@ export class PaymentsService {
|
||||
}
|
||||
|
||||
if (!restaurantPaymentMethod.paymentMethod?.isOnline) {
|
||||
throw new BadRequestException('Payment method is not online');
|
||||
return { paymentUrl: null };
|
||||
}
|
||||
|
||||
if (!restaurantPaymentMethod.callbackUrl) {
|
||||
|
||||
Reference in New Issue
Block a user