private void setInformationFields(Transaction transaction, String productId) { Information information = purchaseManager.getInformation(productId); Integer priceInCents = information.getPriceInCents(); transaction.setPurchaseCost(priceInCents == null ? 0 : priceInCents); transaction.setPurchaseCostCurrency(information.getPriceCurrencyCode()); }