shouldAddStorePayment abstract method

bool shouldAddStorePayment({
  1. required SKPaymentWrapper payment,
  2. required SKProductWrapper product,
})

Triggered when a user initiates an in-app purchase from App Store.

Return true to continue the transaction in your app. If you have multiple SKTransactionObserverWrappers, the transaction will continue if any SKTransactionObserverWrapper returns true. Return false to defer or cancel the transaction. For example, you may need to defer a transaction if the user is in the middle of onboarding. You can also continue the transaction later by calling addPayment with the payment param from this method.

Implementation

bool shouldAddStorePayment(
    {required SKPaymentWrapper payment, required SKProductWrapper product});