This commit is contained in:
2025-12-02 16:58:44 +03:30
parent 58cf3c58b1
commit e43727f1c6
3 changed files with 24 additions and 27 deletions
@@ -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) {