Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Mobile App CI / test (push) Waiting to run
Mobile App CI / build-android (push) Blocked by required conditions
Mobile App CI / build-ios (push) Blocked by required conditions
Web App CI / test (push) Waiting to run
Web App 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
Deploy Telegram Bot / Deploy Telegram Bot (push) Waiting to run
39 lines
965 B
Dart
39 lines
965 B
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 {
|
|
return YookassaPayment(
|
|
id: 'test_payment_${DateTime.now().millisecondsSinceEpoch}',
|
|
status: 'pending',
|
|
confirmationUrl: 'https://yookassa.ru/payment/test',
|
|
);
|
|
}
|
|
|
|
Future<YookassaPayment> checkPayment(String paymentId) async {
|
|
return YookassaPayment(id: paymentId, status: 'pending');
|
|
}
|
|
}
|