【问题标题】:Flutter In App Purchases Consumable Product - Purchase Stream not firingFlutter In App Purchases Consumable Product - 购买流未触发
【发布时间】:2020-12-20 23:22:47
【问题描述】:

我正在使用 in_app_purchases Flutter 包来处理我在 android 和 ios 上的应用内购买需求。我只使用消耗性 IAP。但是我的购买流没有触发。只有 queryPastPurchases 方法返回消耗品列表。所以我对插件有点困惑。一旦应用程序在 main 方法中启动,我也开始收听购买流。但是我没有收到购买流中的购买更新。

in_app_purchase 中的这个声明似乎有点模棱两可,它说尝试完成待处理的购买可能会导致错误。但是提到在待处理状态下重试购买完成

Completing a [PurchaseStatus.pending] purchase will cause an exception.
For convenience, [PurchaseDetails.pendingCompletePurchase] indicates if a 
purchase is pending for completion.

The method returns a [BillingResultWrapper] to indicate a detailed status 
of the complete process.
If the result contains [BillingResponse.error] or 
[BillingResponse.serviceUnavailable], the developer should try
to complete the purchase via this method again, or retry the 
[completePurchase] it at a later time.
If the result indicates other errors, there might be some issue with
the app's code. The developer is responsible to fix the issue.

【问题讨论】:

    标签: android ios flutter dart in-app-purchase


    【解决方案1】:

    请在此处查看我的答案: How can I dd in-app-purchase functionality to my flutter app?

    我还添加了一些指向视频教程的链接,这将对您有所帮助。 请使用 flutter_in_app_purchase 包。它是原始 in_app_purchase 包的一个分支

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-26
      • 2011-12-10
      • 2021-02-24
      • 1970-01-01
      • 2013-08-18
      • 2021-02-15
      • 1970-01-01
      相关资源
      最近更新 更多