public ActionResult CancelMandateResult(CancellationRequest model) { if (String.IsNullOrEmpty(model.MessageId)) { model.MessageId = MessageIdGenerator.New(); } var response = b2bCommunicator.Cancel(model); return(View(response)); }
public ActionResult NewMandateResult(NewMandateRequestViewModel model) { if (String.IsNullOrEmpty(model.Source.MessageId)) { model.Source.MessageId = MessageIdGenerator.New(); } if (model.Instrumentation == Instrumentation.Core) { return(View(new NewMandateResponseViewModel { Source = coreCommunicator.NewMandate(model.Source), Instrumentation = Instrumentation.Core })); } if (model.Instrumentation == Instrumentation.B2B) { return(View(new NewMandateResponseViewModel { Source = b2bCommunicator.NewMandate(model.Source), Instrumentation = Instrumentation.B2B })); } throw new Exception("Instrumentation should either be Core or B2B."); }