completePurchase method
Future<void>
completePurchase({
- required PurchaseDetails purchaseDetail,
- OnError? onError,
override
Implementation
@override
Future<void> completePurchase({
required PurchaseDetails purchaseDetail,
OnError? onError,
}) async {
try {
await _clearIOSPendingPurchases();
await _inAppPurchase.completePurchase(purchaseDetail);
} on InAppPurchaseException catch (x) {
log('CompletePurchaseException(${x.code}, ${x.message}, ${x.source})');
onError?.call(x.message.toString());
}
}