/** * Buys the item with the given <code>itemId</code>. * * @param itemId id of item to be purchased * @param payload a string you want to be assigned to the purchase. This string * is saved in a static variable and will be given bacl to you when the * purchase is completed. * @throws InsufficientFundsException * @throws VirtualItemNotFoundException */ public static void buy(String itemId, String payload) { PurchasableVirtualItem pvi = (PurchasableVirtualItem)StoreInfo.getVirtualItem(itemId); pvi.buy(payload); }