Skip to main content
Question

How do I know if purchase is pending in flutter?

  • January 30, 2023
  • 1 reply
  • 134 views

Forum|alt.badge.img+4

How do I know if purchase is pending in flutter?

 

Please give me the code where I can do something like this -

 

if(purchase.isPending) {

doSomething();

else{

doSomething();

}

This post has been closed for comments

1 reply

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • January 31, 2023

Hey @Rodro M !

 

This is currently not something that we have, but has been marked as a feature request for the engineering team. What I would suggest doing in the meantime would be configuring a customerInfo listener. 

 

You can find more information about the CustomerInfoUpdateListener in our documentation. That will be called whenever Purchases receives an updated CustomerInfo object. This may happen periodically throughout the life of the app if new information becomes available (e.g. after making a purchase).

 

You can use this method `addCustomerInfoUpdateListener` found here it sets a function to be called on updated customer info.

The function is called right away with the latest customer info as soon as it's set.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings