* Adds the payment options to the current order.
* @param submission
* @return
*/
public FormSubmission processOrderPaymentRequest() {
OrderPaymentForm opf = getOrderPaymentRequest();
Orders order = (Orders) req.getSession().getAttribute(SESSION_ATTRIBUTE_ORDER);
order.setCreditCard(opf.getCard());
SalesTaxService sts = new SalesTaxService();
SalesTax st = sts.getById(opf.getCard().getBillingAddress().getState());
Double tax = 10.00;
if (st != null) {
tax = st.getPercent()/100 * order.getItemSubTotal();
}
order.setSalesTax(tax);
opf.setSuccess(true);
opf.setResultView(getOrderPreView());
return opf;
}