public override ActionResult Execute(ISpecialExecutionTaskTestAction testAction) { String bankIdent = testAction.GetParameterAsInputValue("bankIdent", false).Value; if (string.IsNullOrEmpty(bankIdent)) { throw new ArgumentException(string.Format("Es muss eine Bank identifikation angegeben sein.")); } String accountNumber = testAction.GetParameterAsInputValue("accountNumber", false).Value; if (string.IsNullOrEmpty(accountNumber)) { throw new ArgumentException(string.Format("Es muss eine Kontonummer angegeben sein.")); } String buffer = testAction.GetParameterAsInputValue("buffer", false).Value; if (string.IsNullOrEmpty(buffer)) { throw new ArgumentException(string.Format("Es muss ein Puffer angegeben werden in welche die IBAN gespeichert werden soll.")); } // onyl support DE so far ECountry countryCode = ECountry.DE; // DE46 | 5054 0028 | 0420 0861 00 _manager = ContainerBootstrapper.Resolve <IIbanManager>(countryCode.ToString()); iban = _manager.GenerateIban(countryCode, bankIdent, accountNumber); Buffers.Instance.SetBuffer(buffer, iban.IBAN.IBAN, false); testAction.SetResult(SpecialExecutionTaskResultState.Ok, "IBAN generated and saved to buffer."); throw new NotImplementedException(); }
/// <summary> /// Synchronous method to generate an iban code. /// </summary> /// <param name="countryCode">Country for which the code should be generated.</param> /// <param name="bankIdent">Band ident for which the code should be generated.</param> /// <param name="accountNumber">Account number for which the code should be generated.</param> /// <returns>The generated iban code and bic code.</returns> public IbanBic GenerateIban(ECountry countryCode, string bankIdent, string accountNumber) { _manager = ContainerBootstrapper.Resolve <IIbanManager>(countryCode.ToString()); return(_manager.GenerateIban(countryCode, bankIdent, accountNumber)); }
/// <summary> /// Synchronous method to generate an iban code. /// </summary> /// <param name="countryCode">Country for which the code should be generated.</param> /// <param name="bankIdent">Band ident for which the code should be generated.</param> /// <param name="accountNumber">Account number for which the code should be generated.</param> /// <returns>The generated iban code and bic code.</returns> public IbanBic GenerateIban(ECountry countryCode, string bankIdent, string accountNumber) { _manager = ContainerBootstrapper.Resolve<IIbanManager>(countryCode.ToString()); return _manager.GenerateIban(countryCode, bankIdent, accountNumber); }