Log.out.info("Added "+selectedProduct.getCredits().toString()+" credits to customer "+getSessionAttribute("customer_acount"));
DAO.log(oSes, cacc.getDocument(), CustomerAccount.class, "UPDATE CREDITS", AtrilEvent.Level.INFO, cacc.getDocument().id()+";"+cacc.get("credits_left"));
disconnect();
LoginInterceptor.expire(getSessionAttribute("nickname"), getSessionAttribute("password"));
return new RedirectResolution(CaptureInvoice.class);
} catch (Exception e) {
String sStackTrace = "";
try { sStackTrace = StackTraceUtil.getStackTrace(e); } catch (Exception ignore) { }
Log.out.error(e.getClass().getName()+" "+e.getMessage()+"\n"+sStackTrace);
getContext().getMessages().add(new SimpleMessage("ERROR "+e.getMessage(), order));
return new RedirectResolution(BuyCredits.class);
} finally { close(); }
}