public static int addPaymentDetails(ServletConfig config, HttpSession session,
Payment payment, String amount) throws UIException {
try{
BillingServiceClient serviceClient = new BillingServiceClient(config, session);
return serviceClient.addPayment(payment, amount);
}catch (Exception exp){
String msg = "Failed to add the payment record " + payment.getDescription();
log.error(msg, exp);
throw new UIException(msg, exp);
}