flutter_inapp_purchase icon indicating copy to clipboard operation
flutter_inapp_purchase copied to clipboard

FlutterInappPurchase.purchaseUpdated.listen callback twice???

Open hc2088 opened this issue 2 years ago • 1 comments

Version of flutter_inapp_purchase

5.3.1

Platforms you faced the error (IOS or Android or both?)

IOS

Expected behavior

FlutterInappPurchase.purchaseUpdated.listen callback twice 第一次回调,返回的是上次支付成功的订单 然后在FlutterInappPurchase.instance.requestPurchase重新购买之后,又返回一次"purchase-updated回调

为什么返回两次呢?

Actual behavior

Tested environment (Emulator? Real Device?)

Real Device

Steps to reproduce the behavior

1、购买一次,成功之后退出app 2、重新打开app,再次购买呢,会触发purchase-updated 2次回调。 第一次回调不会有弹窗。第二次回调是支付弹窗购买之后

本案例注册的内购产品为消耗型产品。

hc2088 avatar Jun 18 '22 17:06 hc2088

Each time the purchase is completed, finishTransaction is called, and the next time the page is opened, the completion of the purchase will be automatically monitored.

tudosxxx avatar Jul 29 '22 07:07 tudosxxx

This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.

github-actions[bot] avatar Oct 28 '22 02:10 github-actions[bot]