private ActionResult ProcessingPrivate(ProcessingModel model)
        {
            if (model == null)
            {
                throw new System.ArgumentNullException("model");
            }
            if (model.claimId == 0)
            {
                throw new System.ArgumentException("claimid");
            }
            PaymentMode paymentMode = (
                from m in BookingProvider.GetPaymentModes(UrlLanguage.CurrentLanguage, model.claimId)
                where m.id == model.paymentId
                select m).FirstOrDefault<PaymentMode>();
            if (paymentMode == null)
            {
                throw new System.Exception(string.Format("payment mode id '{0}' not found", model.paymentId));
            }
            string text = (paymentMode.processing ?? "").ToLowerInvariant();

            if (text != null)
            {
                switch (text)
                {
                    case "paypal":
                        return this.Processing_PayPal(model.claimId, paymentMode);

                    case "uniteller":
                        return this.Processing_Uniteller(model.claimId, paymentMode);

                    case "payu":
                        return this.Processing_PayU(model.claimId, paymentMode);

                    case "cash":
                        return new RedirectResult(base.Url.Action("howtopay", "info"));

                    default:
                        break;
                }
            }
            throw new System.Exception(string.Format("unsupported processing system '{0}'", paymentMode.processing));
        }
        public ActionResult Processing(ProcessingModel model)
        {
            if (model == null)
            {
                throw new System.ArgumentNullException("model");
            }
            if (model.claimId == 0)
            {
                throw new System.ArgumentException("claimid");
            }
            PaymentMode paymentMode = (
                from m in BookingProvider.GetPaymentModes(UrlLanguage.CurrentLanguage, model.claimId)
                where m.id == model.paymentId
                select m).FirstOrDefault<PaymentMode>();

            if (paymentMode == null)
            {
                throw new System.Exception(string.Format("payment mode id '{0}' not found", model.paymentId));
            }

            var tempPaymentModes = BookingController.ApplyPaymentComissions(  new List<PaymentMode>() { paymentMode },

                                                                              new ReservationPrice()
                                                                              {
                                                                                 currency = paymentMode.payrest.currency,
                                                                                 total = paymentMode.payrest.total
                                                                              });

            paymentMode = tempPaymentModes[0];

            string text = (paymentMode.processing ?? "").ToLowerInvariant();

            if (text != null)
            {
                switch (text)
                {
                    case "paypal":
                        return this.Processing_PayPal(model.claimId, paymentMode);

                    case "uniteller":
                        return this.Processing_Uniteller(model.claimId, paymentMode);

                    case "payu":
                    //    return this.Processing_PayU(model.claimId, paymentMode);

                    case "jcc":
                        return this.Processing_JCC(model.claimId, paymentMode);

                    default:
                        break;
                }
            }
            throw new System.Exception(string.Format("unsupported processing system '{0}'", paymentMode.processing));
        }