order.put("credits_bought", selectedProduct.getCredits());
order.save(oSes);
Log.out.info("Created order "+order.getString("order_id")+" for customer "+getSessionAttribute("customer_acount"));
OrderLine line = order.addLine(oSes, selectedProduct);
Log.out.info("Added order line for product "+selectedProduct.getString("product_name"));
order.put("base_price", line.getString("base_price"));
order.put("taxes", line.getString("taxes"));
order.put("taxespct", line.getString("taxespct"));
order.put("total_price", line.getString("subtotal_price"));
order.put("currency", line.getString("currency"));
order.save(oSes);
DAO.log(oSes, order.getDocument(), Order.class, "CREATE ORDER", AtrilEvent.Level.INFO, order.getDocument().id()+";"+getSessionAttribute("customer_acount")+";"+selectedProduct.getString("product_name"));
cacc.restoreCredits(oSes, new BigDecimal(selectedProduct.getCredits().longValue()));