Skip to main content

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();

}

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.


Reply