use of com.amazon.device.iap.model.UserData in project Osmand by osmandapp.
the class InAppPurchaseHelperImpl method onPurchaseFinished.
// Call when a purchase is finished
private void onPurchaseFinished(@NonNull String sku, @NonNull PurchaseResponse response) {
Receipt receipt = response.getReceipt();
logDebug("Purchase finished: " + receipt.getSku());
PurchaseInfo info = getPurchaseInfo(sku, receipt);
UserData userData = response.getUserData();
if (userData != null) {
info.setPurchaseToken(userData.getUserId());
} else {
info.setPurchaseToken(getUserId());
}
onPurchaseDone(info);
}
use of com.amazon.device.iap.model.UserData in project OsmAnd by osmandapp.
the class InAppPurchaseHelperImpl method onPurchaseFinished.
// Call when a purchase is finished
private void onPurchaseFinished(@NonNull String sku, @NonNull PurchaseResponse response) {
Receipt receipt = response.getReceipt();
logDebug("Purchase finished: " + receipt.getSku());
PurchaseInfo info = getPurchaseInfo(sku, receipt);
UserData userData = response.getUserData();
if (userData != null) {
info.setPurchaseToken(userData.getUserId());
} else {
info.setPurchaseToken(getUserId());
}
onPurchaseDone(info);
}
Aggregations