acknowledgePurchaseAndroid method

Future<String?> acknowledgePurchaseAndroid(
  1. String token
)

Acknowledge a purchase on Android.

No effect on iOS, whose iap purchases are consumed at the time of purchase.

Implementation

Future<String?> acknowledgePurchaseAndroid(String token) async {
  if (_platform.isAndroid) {
    return await _channel
        .invokeMethod('acknowledgePurchase', <String, dynamic>{
      'token': token,
    });
  } else if (_platform.isIOS) {
    return 'no-ops in ios';
  }
  throw PlatformException(
      code: _platform.operatingSystem, message: "platform not supported");
}