acknowledgePurchase method

Future<BillingResultWrapper> acknowledgePurchase(
  1. String purchaseToken
)

Acknowledge an in-app purchase.

The developer must acknowledge all in-app purchases after they have been granted to the user. If this doesn't happen within three days of the purchase, the purchase will be refunded.

Consumables are already implicitly acknowledged by calls to consumeAsync and do not need to be explicitly acknowledged by using this method. However this method can be called for them in order to explicitly acknowledge them if desired.

Be sure to only acknowledge a purchase after it has been granted to the user. PurchaseWrapper.purchaseState should be PurchaseStateWrapper.purchased and the purchase should be validated. See Verify a purchase on verifying purchases.

Please refer to acknowledge for more details.

This wraps BillingClient#acknowledgePurchase(AcknowledgePurchaseParams, AcknowledgePurchaseResponseListener)

Implementation

Future<BillingResultWrapper> acknowledgePurchase(String purchaseToken) async {
  return resultWrapperFromPlatform(
      await _hostApi.acknowledgePurchase(purchaseToken));
}