use of com.soomla.store.events.VerificationStartedEvent in project android-store by soomla.
the class SoomlaStore method handleVerificationStarted.
/**
* Posts an event about the start of verification for the purchase, or an unexpected
* error event if the item was not found.
*
* @param purchases List of purchases to handle.
*/
private void handleVerificationStarted(List<IabPurchase> purchases) {
for (IabPurchase purchase : purchases) {
String sku = purchase.getSku();
try {
PurchasableVirtualItem v = StoreInfo.getPurchasableItem(sku);
BusProvider.getInstance().post(new VerificationStartedEvent(v));
} catch (VirtualItemNotFoundException e) {
SoomlaUtils.LogError(TAG, "(purchaseActionResultCancelled) ERROR : Couldn't find the " + "VirtualCurrencyPack OR MarketItem with productId: " + sku + ". It's unexpected so an unexpected error is being emitted.");
BusProvider.getInstance().post(new UnexpectedStoreErrorEvent());
}
}
}
Aggregations