Я разрабатываю мобильное приложение с Flutter, и мне нужно получить сведения о подписке (например, срок действия, идентификатор продукта и т. Д.). Как я могу получить информацию о покупке?
Как получить информацию о подписке во флаттере
Ответы (1)
Вы можете использовать RevenueCat и Qonversion.
RevenueCat
try { PurchaserInfo purchaserInfo = await Purchases.getPurchaserInfo(); // access latest purchaserInfo } on PlatformException catch (e) { // Error fetching purchaser info }
Qonversion
final Map<String, QPermission> permissions = await Qonversion.checkPermissions(); final main = permissions['main']; if (main != null && main.isActive) { switch (main.renewState) { case QProductRenewState.willRenew: case QProductRenewState.nonRenewable: // .willRenew is the state of an auto-renewable subscription // .nonRenewable is the state of consumable/non-consumable IAPs that could unlock lifetime access break; case QProductRenewState.billingIssue: // Grace period: permission is active, but there was some billing issue. // Prompt the user to update the payment method. break; case QProductRenewState.canceled: // The user has turned off auto-renewal for the subscription, but the subscription has not expired yet. // Prompt the user to resubscribe with a special offer. break; default: break; } }
Если вам нужна дополнительная информация, обратитесь к их руководству.
person
loyal
schedule
27.04.2021
Я надеюсь, что это будет вам полезно. stackoverflow.com/questions/53880390/
- person loyal; 28.04.2021