forked from eatvio/eatvio_app
19 lines
704 B
Dart
19 lines
704 B
Dart
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'},
|
||
);
|
||
}
|
||
}
|