Files
eatvio_app/lib/features/payment/repositories/payment_repository.dart

19 lines
704 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:eatvio_app/features/chat/models/payment_model.dart';
import 'package:eatvio_app/features/chat/services/chat_service.dart';
/// Репозиторий оплаты консультаций (chosen_plan) через Alfa Bank / СБП.
class PaymentRepository {
final ChatService chatService;
PaymentRepository({required this.chatService});
/// Запускает процесс оплаты: POST `/api/chosen_plans/{id}/start_payment_process`
/// с `payment_provider: alfa-bank`.
Future<PaymentModel> startPaymentProcess({required int planId}) async {
return chatService.getPaymentLink(
id: planId,
body: const {'payment_provider': 'alfa-bank'},
);
}
}