// Acumatica Credentials // public AcumaticaCredentials RetrieveAcumaticaCredentials() { var context = Retrieve(); var output = new AcumaticaCredentials(); output.InstanceUrl = context.AcumaticaInstanceUrl; output.Branch = context.AcumaticaBranch; output.CompanyName = context.AcumaticaCompanyName; output.Username = context.AcumaticaUsername.IsNullOrEmpty() ? "" : _cryptoService.Decrypt(context.AcumaticaUsername); output.Password = context.AcumaticaPassword.IsNullOrEmpty() ? "" : _cryptoService.Decrypt(context.AcumaticaPassword); if (output.Username.IsNullOrEmpty() && output.Password.IsNullOrEmpty()) { return(null); } return(output); }
public void BeginSession( string screenWebSerivceUrl, AcumaticaCredentials credentials) { _screen.CookieContainer = new System.Net.CookieContainer(); _screen.Url = screenWebSerivceUrl; _screen.Login(credentials.Username, credentials.Password); }
public AcumaticaCredentials RetrieveAcumaticaCredentials() { var context = RetrieveRawContext(); var output = new AcumaticaCredentials(); output.InstanceUrl = context.AcumaticaInstanceUrl; output.Branch = context.AcumaticaBranch; output.CompanyName = context.AcumaticaCompanyName; output.Username = _cryptoService.Decrypt(context.AcumaticaUsername); output.Password = _cryptoService.Decrypt(context.AcumaticaPassword); return(output); }
public void PushAcumaticaPayout( AcumaticaCredentials acumaticaCredentials, string screenWebSerivceUrl, long shopifyPayoutId) { _acumaticaPayoutPushWorker .BeginSession( screenWebSerivceUrl, acumaticaCredentials); _acumaticaPayoutPushWorker .WritePayoutToAcumatica(shopifyPayoutId); _acumaticaPayoutPushWorker.EndSession(); }
public void PushAllAcumaticaPayouts( AcumaticaCredentials acumaticaCredentials, string screenWebSerivceUrl) { _acumaticaPayoutPushWorker .BeginSession( screenWebSerivceUrl, acumaticaCredentials); foreach (var payout in _persistenceRepository.RetrieveNotYetUploadedPayouts()) { _acumaticaPayoutPushWorker .WritePayoutToAcumatica(payout.ShopifyPayoutId); } _acumaticaPayoutPushWorker.EndSession(); }