Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
47 lines
No EOL
1.1 KiB
Dart
47 lines
No EOL
1.1 KiB
Dart
import 'package:injectable/injectable.dart';
|
|
|
|
/// Wrapper for YooKassa payment (simplified)
|
|
class YookassaPayment {
|
|
final String id;
|
|
final String status;
|
|
final String? confirmationUrl;
|
|
|
|
YookassaPayment({
|
|
required this.id,
|
|
required this.status,
|
|
this.confirmationUrl,
|
|
});
|
|
}
|
|
|
|
class YooMoneyHandler {
|
|
final String _shopId;
|
|
final String _secretKey;
|
|
|
|
YooMoneyHandler({
|
|
required String shopId,
|
|
required String secretKey,
|
|
}) : _shopId = shopId,
|
|
_secretKey = secretKey;
|
|
|
|
Future<YookassaPayment> createPayment({
|
|
required String amount,
|
|
required String description,
|
|
required String userId,
|
|
}) async {
|
|
// TODO: Implement real YooKassa API integration
|
|
// For now, return stub
|
|
return YookassaPayment(
|
|
id: 'test_payment_${DateTime.now().millisecondsSinceEpoch}',
|
|
status: 'pending',
|
|
confirmationUrl: 'https://yookassa.ru/payment/test',
|
|
);
|
|
}
|
|
|
|
Future<YookassaPayment> checkPayment(String paymentId) async {
|
|
// TODO: Implement real YooKassa API checking
|
|
return YookassaPayment(
|
|
id: paymentId,
|
|
status: 'pending',
|
|
);
|
|
}
|
|
} |