String desc = drink + " " + size + " " + milk;
LineItem item = new LineItem( desc, 1, new Double(total), Config.CURRENCY);
Cart cart = new Cart(Config.CURRENCY);
cart.addItem(item);
FullWalletRequest fullWalletRequest = new FullWalletRequest(Config.MERCHANT_ID, Config.MERCHANT_SECRET, cart, mwResponse.getGoogle_transaction_id());
fullWalletRequest.setOrigin(origin);
Velocity.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.NullLogChute");
// Escape HTML
Velocity.setProperty("eventhandler.referenceinsertion.class", "org.apache.velocity.app.event.implement.EscapeHtmlReference");
Velocity.setProperty("eventhandler.escape.html.match", "/.*/");
Velocity.init();
VelocityContext context = new VelocityContext();
context.put("pay", mwResponse.getSelection().getPay());
context.put("ship", mwResponse.getSelection().getShip());
context.put("order", order);
context.put("maskedJWT", maskedWalletRequest.generateJWT());
context.put("fullWalletJWT", fullWalletRequest.generateJWT());
context.put("walletJSUrl", Config.WALLET_JS_URL);
PrintWriter pw;
pw = resp.getWriter();
Velocity.mergeTemplate("confirm.vm","UTF-8", context, pw);