try {
OrderHeader orderHeader = orderEngine.getOrderHeader();
InvoiceEngine invoiceEngine = new InvoiceEngine(orderHeader, null);
invoiceEngine.invoiceAll();
invoiceEngine.setCreditCardInfo(orderEngine.getCreditCardInfo());
invoiceEngine.payOrder(shoppingCart.getPaymentEngine(), request);
orderEngine.saveOrder();
orderNum = orderEngine.getOrderHeader().getOrderNum();
invoiceEngine.saveOrder();
}
catch (PaymentException e) {