fix: some problems are fixed

This commit is contained in:
2026-07-05 18:40:53 +03:30
parent 5017e9a613
commit e94f03c499
16 changed files with 384 additions and 152 deletions
+5 -3
View File
@@ -19,10 +19,12 @@ class MyketPaymentGateway implements PaymentGateway {
}
@override
Future<PurchaseResult> purchase(String productSku) async {
Future<PurchaseResult> purchase(String productSku, {String payload = ''}) async {
await connect();
final Map<dynamic, dynamic> result =
await MyketIAP.launchPurchaseFlow(sku: productSku, payload: 'hakemsho');
final Map<dynamic, dynamic> result = await MyketIAP.launchPurchaseFlow(
sku: productSku,
payload: payload.isNotEmpty ? payload : 'hakemsho',
);
final Purchase? purchase = result[MyketIAP.PURCHASE] as Purchase?;
if (purchase == null || purchase.mToken.isEmpty) {