internal IFacadeUpdateResult <ShipToData> SaveShipTo(ShipToDto dto) { ArgumentValidator.IsNotNull("dto", dto); FacadeUpdateResult <ShipToData> result = new FacadeUpdateResult <ShipToData>(); IShipToService service = UnitOfWork.GetService <IShipToService>(); ShipTo instance = RetrieveOrNew <ShipToData, ShipTo, IShipToService>(result.ValidationResult, dto.Id); if (result.IsSuccessful) { instance.Code = dto.Code; instance.CustomerId = dto.CustomerId; instance.ContactPerson = dto.ContactPerson; instance.ContactPhone = dto.ContactPhone; instance.AddressLine1 = dto.AddressLine1; instance.AddressLine2 = dto.AddressLine2; instance.Country = dto.Country; instance.CountryState = dto.CountryState; instance.City = dto.City; instance.ZipCode = dto.ZipCode; var saveQuery = service.Save(instance); result.AttachResult(instance.RetrieveData <ShipToData>()); result.Merge(saveQuery); } return(result); }
public async Task <bool> UpdateCostCenter(ShipTo shipTo, Ship2Model model) { shipTo.Sorderedby = model.Sorderedby; shipTo.DivisionId = model.DivisionId; shipTo.ShipId = model.ShipId; shipTo.Sname = model.Sname; shipTo.Sadd1 = model.Sadd1; shipTo.Sadd2 = model.Sadd2; shipTo.Scity = model.Scity; shipTo.Sst = model.Sst; shipTo.Szip = model.Szip; shipTo.Sph = model.Sph; shipTo.SsalesTax = model.SsalesTax; shipTo.ApprovalId = model.ApprovalId; var result = await _shipRepository.UpdateAsync(shipTo); if (result != null) { return(true); } else { return(false); } }
public async Task <IHttpActionResult> PutShipTo(int id, ShipTo shipTo) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != shipTo.ShipToId) { return(BadRequest()); } db.Entry(shipTo).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ShipToExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public virtual void UpdateShipTo(ShipTo address) { if (address == null) { throw new ArgumentNullException(nameof(address)); } //some validation if (address.CountryId == 0) { address.CountryId = null; } if (address.StateProvinceId == 0) { address.StateProvinceId = null; } _shipToRepository.Update(address); //cache _cacheManager.RemoveByPattern(NopCommonDefaults.AddressesPatternCacheKey); //event notification _eventPublisher.EntityUpdated(address); }
public static ShipToModel ToHydratedModel(this ShipTo aShipToEntity) { var result = aShipToEntity.ToModel(); result.ShipViaCode = aShipToEntity.DefaultShipVia.ToHydratedModel(); return(result); }
public ActionResult DeleteConfirmed(int id) { ShipTo shipTo = db.ShipToes.Find(id); db.ShipToes.Remove(shipTo); db.SaveChanges(); return(RedirectToAction("Index")); }
public async Task <ActionResult> DeleteConfirmed(int id) { ShipTo shipTo = await db.ShipToes.FindAsync(id); db.ShipToes.Remove(shipTo); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public void TestSteps() { bool SkipF0101 = true; bool SkipF03012 = true; // 1.) Read the concept ConceptCSV TestConceptCSV = new ConceptCSV(@"E:\gitHub\Rollout\TestFiles\SageRolloutExample1.csv", ","); TestConceptCSV.ReadConcept(); // 2.) Test for missing entries List <string> TestMissing = TestConceptCSV.CheckForMissingShipToAddresses(); // 3.) If entries are missing, do the following: if (0 < TestMissing.Count && !SkipF0101) { // 4.) Populate the missing CSV using the list of missing items ShipToCSV MissingShipToCSV = new ShipToCSV(@"E:\gitHub\Rollout\TestFiles\SageRolloutMissing.csv", ","); MissingShipToCSV.PopulateSpreadsheet(TestMissing, TestConceptCSV); // 5.) Populate the transformed data structure ShipTo MissingShipTo = XfrmShipTo.CSVToShipTo(MissingShipToCSV, false); // Don't look up JDE Addresses // 6.) Upload the transformed data structure to the F0101 Z-File JDE.PopulateF0101Z2(MissingShipTo); // 7.) Now write the CSV to disk MissingShipToCSV.WriteCSV(); // 8.) Now, someone must run R01010Z to load the data into JDE. // Popup window } else if (!SkipF03012) { // TODO: 9.) Check for F03012 records // 10.) If F03012 records are missing: ShipToCSV MissingShipToCSV = new ShipToCSV(@"E:\gitHub\Rollout\TestFiles\SageRolloutMissing.csv", ","); MissingShipToCSV.ReadShipTo(); if (MissingShipToCSV.ValidateHeader() && // Required row is all there MissingShipToCSV.ValidateRows(false)) // We can't have an empty tax area code { // 11.) Convert the CSV into a data structure we can upload ShipTo PopulatedShipTo = XfrmShipTo.CSVToShipTo(MissingShipToCSV, true); // Lookup JDE Address // 12.) Upload the data structure into JDE JDE.PopulateF03012Z1(PopulatedShipTo); // 13.) Now someone must run R03010Z to load the data into JDE. } else { //TODO: Say we don't have a valid spreadsheet int x = 0; x++; } } else { Concept TestConcept = XfrmConcept.CSVtoConcept(TestConceptCSV); JDE.PopulateF47011(TestConcept); JDE.PopulateF47012(TestConcept); } }
public async Task <IHttpActionResult> GetShipTo(int id) { ShipTo shipTo = await db.ShipToes.FindAsync(id); if (shipTo == null) { return(NotFound()); } return(Ok(shipTo)); }
public void ReadShipToCSVandPopulateF0101Z2() { ShipToCSV PopulatedCSV = new ShipToCSV(@"E:\gitHub\Rollout\TestFiles\SageRolloutMissing.csv", ","); PopulatedCSV.ReadShipTo(); PopulatedCSV.ValidateHeader(); PopulatedCSV.ValidateRows(true); ShipTo PopulatedShipTo = XfrmShipTo.CSVToShipTo(PopulatedCSV, false); // Dont lookup JDE address JDE.PopulateF0101Z2(PopulatedShipTo); }
public void PopulateF03012Z1() { ShipToCSV PopulatedCSV = new ShipToCSV(@"E:\gitHub\Rollout\TestFiles\SageRolloutMissing.csv", ","); PopulatedCSV.ReadShipTo(); PopulatedCSV.ValidateHeader(); PopulatedCSV.ValidateRows(false); // Force non-empty tax area code ShipTo PopulatedShipTo = XfrmShipTo.CSVToShipTo(PopulatedCSV, true); // Lookup JDE address JDE.PopulateF03012Z1(PopulatedShipTo); }
public ActionResult Edit([Bind(Include = "ShipToId,CustomerId,ShipToNum,CustNum,Company,ShipToName,TerritoryEpicorId,CountryId,Country,State,City,Address,PhoneNum,Email,VendorId,SincronizadoEpicor")] ShipTo shipTo) { if (ModelState.IsValid) { db.Entry(shipTo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CustomerId = new SelectList(db.Customers, "CustomerId", "CustId", shipTo.CustomerId); return(View(shipTo)); }
public async Task <ActionResult> Edit(ShipTo shipTo) { if (ModelState.IsValid) { db.Entry(shipTo).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.CustomerId = new SelectList(db.Customers, "CustomerId", "Names", shipTo.CustomerId); return(View(shipTo)); }
public async Task <IHttpActionResult> PostShipTo(ShipTo shipTo) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.ShipToes.Add(shipTo); await db.SaveChangesAsync(); return(CreatedAtRoute("DefaultApi", new { id = shipTo.ShipToId }, shipTo)); }
public async Task <bool> InsertCostCenter(ShipTo shipTo) { var result = await _shipRepository.InsertAsync(shipTo); if (result != null) { return(true); } else { return(false); } }
public async Task <ActionResult> Create(ShipTo shipTo) { if (ModelState.IsValid) { db.ShipToes.Add(shipTo); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.CustomerId = new SelectList(db.Customers, "CustomerId", "Names", shipTo.CustomerId); return(View(shipTo)); }
public async Task <bool> UpdateBugetSetupCostCenter(ShipTo shipTo) { var result = await _shipRepository.UpdateAsync(shipTo); if (result != null) { return(true); } else { return(false); } }
// GET: ShipToes/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ShipTo shipTo = await db.ShipToes.FindAsync(id); if (shipTo == null) { return(HttpNotFound()); } return(View(shipTo)); }
//public ActionResult EditShipTo([Bind(Include = "ShipToId,CustomerId,ShipToNum,CustNum,Company,ShipToName,TerritoryEpicorId,CountryId,Country,State,City,Address,PhoneNum,Email,VendorId,SincronizadoEpicor")] ShipTo shipTo) public ActionResult EditShipTo(ShipTo shipTo) { if (ModelState.IsValid) { var country = db.Countries.Find(shipTo.CountryId); shipTo.Country = country.Description; db.Entry(shipTo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details" + "/" + shipTo.CustomerId)); } ViewBag.CustomerId = new SelectList(db.Customers.Where(c => c.VendorId == 74), "CustomerId", "Names", shipTo.CustomerId); return(View(shipTo)); }
public async Task <IHttpActionResult> DeleteShipTo(int id) { ShipTo shipTo = await db.ShipToes.FindAsync(id); if (shipTo == null) { return(NotFound()); } db.ShipToes.Remove(shipTo); await db.SaveChangesAsync(); return(Ok(shipTo)); }
// GET: ShipToes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ShipTo shipTo = db.ShipToes.Find(id); if (shipTo == null) { return(HttpNotFound()); } return(View(shipTo)); }
public ActionResult CreateShipTo([Bind(Include = "ShipToId,CustomerId,ShipToNum,CustNum,Company,ShipToName,TerritoryEpicorId,CountryId,Country,State,City,Address,PhoneNum,Email,VendorId,SincronizadoEpicor")] ShipTo shipTo) { var country = db.Countries.Find(shipTo.CountryId); shipTo.Country = country.Description; if (ModelState.IsValid) { db.ShipToes.Add(shipTo); db.SaveChanges(); return(RedirectToAction("Details" + "/" + shipTo.CustomerId)); } return(View(shipTo)); }
// GET: ShipToes/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ShipTo shipTo = await db.ShipToes.FindAsync(id); if (shipTo == null) { return(HttpNotFound()); } ViewBag.CustomerId = new SelectList(db.Customers, "CustomerId", "Names", shipTo.CustomerId); return(View(shipTo)); }
public ActionResult DeleteSHConfirmed(int id) { ShipTo shipTo = db.ShipToes.Find(id); db.ShipToes.Remove(shipTo); try { db.SaveChanges(); } catch { TempData["CustomError"] = "No se puede eliminar la sucursal."; return(RedirectToAction("Details" + "/" + shipTo.CustomerId)); } return(RedirectToAction("Details" + "/" + shipTo.CustomerId)); }
internal TDto RetrieveOrNewShipTo <TDto>(object instanceId, IDataConverter <ShipToData, TDto> converter) where TDto : class { ArgumentValidator.IsNotNull("converter", converter); IShipToService service = UnitOfWork.GetService <IShipToService>(); FacadeUpdateResult <ShipToData> result = new FacadeUpdateResult <ShipToData>(); ShipTo instance = RetrieveOrNew <ShipToData, ShipTo, IShipToService>(result.ValidationResult, instanceId); if (result.IsSuccessful) { return(converter.Convert(instance.RetrieveData <ShipToData>())); } else { return(null); } }
public SourcingControllerIntegrationTests() { SourcingEngine.atgOrderReq = new AtgOrderReq(); // Add ship to address on the order var shipTo = new ShipTo() { address1 = "2294 Cloverdale Dr", city = "Atlanta", state = "GA", zip = "30316" }; SourcingEngine.atgOrderReq.shipping = new Shipping() { shipTo = shipTo }; // Add location shipping addresses frontRoyal.Address1 = "620 Fairground Rd"; frontRoyal.City = "Front Royal"; frontRoyal.State = "VA"; frontRoyal.Zip = "22630"; mcGregor.Address1 = "2055 S Main St"; mcGregor.City = "McGregor"; mcGregor.State = "TX"; mcGregor.Zip = "76657"; fortPayne.Address1 = "2500 Jordan Rd S"; fortPayne.City = "Fort Payne"; fortPayne.State = "AL"; fortPayne.Zip = "35968"; frostProof.Address1 = "1225 Scenic Hwy S"; frostProof.City = "Frostproof"; frostProof.State = "FL"; frostProof.Zip = "33843-9201"; locationController.locations.LocationDict.Add("423", frontRoyal); locationController.locations.LocationDict.Add("474", mcGregor); locationController.locations.LocationDict.Add("533", fortPayne); locationController.locations.LocationDict.Add("761", frostProof); }
} // ConceptCodeExists /// <summary> /// Make sure all tax codes exist in F4008 and we are in an active date range for that code. /// </summary> /// <param name="ship"></param> /// <returns></returns> private bool ValidateTaxCodes(ShipTo ship) { bool result = ship.ValidateTaxCodes(); if (!result) { // TODO: Fix this to display the missing information log.Error("Failed to validate tax codes."); using (new CenterDialog(this)) { MessageBoxButtons buttons = MessageBoxButtons.OK; MessageBox.Show($"Error in csv. There are missing or non-active tax codes in the CSV. See Log file and documentation for more information.", "Data Error", buttons); } } else { log.Debug("All tax codes exist and are active."); } return(result); } // ValidateTaxCodes
/// <summary> /// Validate that the Tax Explanations are valid entries in the UDC /// </summary> /// <param name="ship"></param> /// <returns></returns> private bool ValidateTaxExplanations(ShipTo ship) { bool result = ship.ValidateTaxExplanations(); if (!result) { // TODO: Fix this to display the missing information log.Error("Failed to validate tax explanations."); using (new CenterDialog(this)) { MessageBoxButtons buttons = MessageBoxButtons.OK; MessageBox.Show($"Error in csv. There are invalid tax explanation codes. See Log file and documentation for more information.", "Data Error", buttons); } } else { log.Debug("All tax explanations are valid in UDC 00/EX."); } return(result); } // ValidateTaxExplanations
internal IFacadeUpdateResult <ShipToData> DeleteShipTo(object instanceId) { ArgumentValidator.IsNotNull("instanceId", instanceId); FacadeUpdateResult <ShipToData> result = new FacadeUpdateResult <ShipToData>(); IShipToService service = UnitOfWork.GetService <IShipToService>(); var query = service.Retrieve(instanceId); if (query.HasResult) { ShipTo instance = query.ToBo <ShipTo>(); var saveQuery = instance.Delete(); result.Merge(saveQuery); } else { AddError(result.ValidationResult, "ShipToCannotBeFound"); } return(result); }
public static ShipToModel ToModel(this ShipTo aShipToEntity) { return(new ShipToModel() { CustId = aShipToEntity.CustId, ShipToId = aShipToEntity.ShipToId, Inactive = aShipToEntity.Inactive, Name = aShipToEntity.Name, Address1 = aShipToEntity.Address1, Address2 = aShipToEntity.Address2, Address3 = aShipToEntity.Address3, City = aShipToEntity.City, State = aShipToEntity.State, Zip = aShipToEntity.Zip, Country = aShipToEntity.Country, DefaultShipViaId = aShipToEntity.DefaultShipViaId, EmailAddress = aShipToEntity.EmailAddress, PhoneNum = aShipToEntity.PhoneNum, FaxNum = aShipToEntity.FaxNum }); }
/// <summary> /// Process payment /// </summary> /// <param name="paymentInfo">Payment info required for an order processing</param> /// <param name="customer">Customer</param> /// <param name="orderGuid">Unique order identifier</param> /// <param name="processPaymentResult">Process payment result</param> public void ProcessPayment(PaymentInfo paymentInfo, Customer customer, Guid orderGuid, ref ProcessPaymentResult processPaymentResult) { InitSettings(); TransactMode transactionMode = GetCurrentTransactionMode(); //little hack here CultureInfo userCulture = Thread.CurrentThread.CurrentCulture; NopContext.Current.SetCulture(new CultureInfo("en-US")); try { Invoice invoice = new Invoice(); BillTo to = new BillTo(); to.FirstName = paymentInfo.BillingAddress.FirstName; to.LastName = paymentInfo.BillingAddress.LastName; to.Street = paymentInfo.BillingAddress.Address1; to.City = paymentInfo.BillingAddress.City; to.Zip = paymentInfo.BillingAddress.ZipPostalCode; if (paymentInfo.BillingAddress.StateProvince != null) to.State = paymentInfo.BillingAddress.StateProvince.Abbreviation; invoice.BillTo = to; if (paymentInfo.ShippingAddress != null) { ShipTo to2 = new ShipTo(); to2.ShipToFirstName = paymentInfo.ShippingAddress.FirstName; to2.ShipToLastName = paymentInfo.ShippingAddress.LastName; to2.ShipToStreet = paymentInfo.ShippingAddress.Address1; to2.ShipToCity = paymentInfo.ShippingAddress.City; to2.ShipToZip = paymentInfo.ShippingAddress.ZipPostalCode; if (paymentInfo.ShippingAddress.StateProvince != null) to2.ShipToState = paymentInfo.ShippingAddress.StateProvince.Abbreviation; invoice.ShipTo = to2; } invoice.InvNum = orderGuid.ToString(); decimal orderTotal = Math.Round(paymentInfo.OrderTotal, 2); invoice.Amt = new PayPal.Payments.DataObjects.Currency(orderTotal, IoC.Resolve<ICurrencyService>().PrimaryStoreCurrency.CurrencyCode); string creditCardExp = string.Empty; if (paymentInfo.CreditCardExpireMonth < 10) { creditCardExp = "0" + paymentInfo.CreditCardExpireMonth.ToString(); } else { creditCardExp = paymentInfo.CreditCardExpireMonth.ToString(); } creditCardExp = creditCardExp + paymentInfo.CreditCardExpireYear.ToString().Substring(2, 2); CreditCard credCard = new CreditCard(paymentInfo.CreditCardNumber, creditCardExp); credCard.Cvv2 = paymentInfo.CreditCardCvv2; CardTender tender = new CardTender(credCard); // <vendor> = your merchant (login id) // <user> = <vendor> unless you created a separate <user> for Payflow Pro // partner = paypal UserInfo userInfo = new UserInfo(user, vendor, partner, password); string url = GetPaypalUrl(); PayflowConnectionData payflowConnectionData = new PayflowConnectionData(url, 443, null, 0, null, null); Response response = null; if (transactionMode == TransactMode.Authorize) { response = new AuthorizationTransaction(userInfo, payflowConnectionData, invoice, tender, PayflowUtility.RequestId).SubmitTransaction(); } else { response = new SaleTransaction(userInfo, payflowConnectionData, invoice, tender, PayflowUtility.RequestId).SubmitTransaction(); } if (response.TransactionResponse != null) { if (response.TransactionResponse.Result == 0) { processPaymentResult.AuthorizationTransactionId = response.TransactionResponse.Pnref; processPaymentResult.AuthorizationTransactionResult = response.TransactionResponse.RespMsg; if (transactionMode == TransactMode.Authorize) { processPaymentResult.PaymentStatus = PaymentStatusEnum.Authorized; } else { processPaymentResult.PaymentStatus = PaymentStatusEnum.Paid; } } else { processPaymentResult.Error = string.Format("{0} - {1}", response.TransactionResponse.Result, response.TransactionResponse.RespMsg); processPaymentResult.FullError = string.Format("Response Code : {0}. Response Description : {1}", response.TransactionResponse.Result, response.TransactionResponse.RespMsg); } } else { processPaymentResult.Error = "Error during checkout"; processPaymentResult.FullError = "Error during checkout"; } } catch (Exception) { throw; } finally { NopContext.Current.SetCulture(userCulture); } }
/// <summary> /// Process payment /// </summary> /// <param name="paymentInfo">Payment info required for an order processing</param> /// <param name="customer">Customer</param> /// <param name="OrderGuid">Unique order identifier</param> /// <param name="processPaymentResult">Process payment result</param> public void ProcessPayment(PaymentInfo paymentInfo, Customer customer, Guid OrderGuid, ref ProcessPaymentResult processPaymentResult) { InitSettings(); TransactMode transactionMode = GetCurrentTransactionMode(); //little hack here CultureInfo userCulture = Thread.CurrentThread.CurrentCulture; NopContext.Current.SetCulture(new CultureInfo("en-US")); try { BillTo to = new BillTo(); to.FirstName = paymentInfo.BillingAddress.FirstName; to.LastName = paymentInfo.BillingAddress.LastName; to.Street = paymentInfo.BillingAddress.Address1; to.City = paymentInfo.BillingAddress.City; to.Zip = paymentInfo.BillingAddress.ZipPostalCode; if (paymentInfo.BillingAddress.StateProvince != null) to.State = paymentInfo.BillingAddress.StateProvince.Abbreviation; ShipTo to2 = new ShipTo(); to2.ShipToFirstName = paymentInfo.ShippingAddress.FirstName; to2.ShipToLastName = paymentInfo.ShippingAddress.LastName; to2.ShipToStreet = paymentInfo.ShippingAddress.Address1; to2.ShipToCity = paymentInfo.ShippingAddress.City; to2.ShipToZip = paymentInfo.ShippingAddress.ZipPostalCode; if (paymentInfo.ShippingAddress.StateProvince != null) to2.ShipToState = paymentInfo.ShippingAddress.StateProvince.Abbreviation; Invoice invoice = new Invoice(); invoice.BillTo = to; invoice.ShipTo = to2; invoice.InvNum = OrderGuid.ToString(); //For values which have more than two decimal places //Currency Amt = new Currency(new decimal(25.1214)); //Amt.NoOfDecimalDigits = 2; //If the NoOfDecimalDigits property is used then it is mandatory to set one of the following properties to true. //Amt.Round = true; //Amt.Truncate = true; //Inv.Amt = Amt; decimal orderTotal = Math.Round(paymentInfo.OrderTotal, 2); //UNDONE USD only invoice.Amt = new PayPal.Payments.DataObjects.Currency(orderTotal, CurrencyManager.PrimaryStoreCurrency.CurrencyCode); string creditCardExp = string.Empty; if (paymentInfo.CreditCardExpireMonth < 10) { creditCardExp = "0" + paymentInfo.CreditCardExpireMonth.ToString(); } else { creditCardExp = paymentInfo.CreditCardExpireMonth.ToString(); } creditCardExp = creditCardExp + paymentInfo.CreditCardExpireYear.ToString().Substring(2, 2); CreditCard credCard = new CreditCard(paymentInfo.CreditCardNumber, creditCardExp); credCard.Cvv2 = paymentInfo.CreditCardCVV2; CardTender tender = new CardTender(credCard); // <vendor> = your merchant (login id) // <user> = <vendor> unless you created a separate <user> for Payflow Pro // partner = paypal UserInfo userInfo = new UserInfo(user, vendor, partner, password); string url = GetPaypalUrl(); PayflowConnectionData payflowConnectionData = new PayflowConnectionData(url, 443, null, 0, null, null); Response response = null; if (transactionMode == TransactMode.Authorize) { response = new AuthorizationTransaction(userInfo, payflowConnectionData, invoice, tender, PayflowUtility.RequestId).SubmitTransaction(); } else { response = new SaleTransaction(userInfo, payflowConnectionData, invoice, tender, PayflowUtility.RequestId).SubmitTransaction(); } if (response.TransactionResponse != null) { if (response.TransactionResponse.Result == 0) { processPaymentResult.AuthorizationTransactionID = response.TransactionResponse.Pnref; processPaymentResult.AuthorizationTransactionResult = response.TransactionResponse.RespMsg; if (transactionMode == TransactMode.Authorize) { processPaymentResult.PaymentStatus = PaymentStatusEnum.Authorized; } else { processPaymentResult.PaymentStatus = PaymentStatusEnum.Paid; } } else { processPaymentResult.Error = string.Format("{0} - {1}", response.TransactionResponse.Result, response.TransactionResponse.RespMsg); processPaymentResult.FullError = string.Format("Response Code : {0}. Response Description : {1}", response.TransactionResponse.Result, response.TransactionResponse.RespMsg); } } else { processPaymentResult.Error = "Error during checkout"; processPaymentResult.FullError = "Error during checkout"; } } catch (Exception exc) { throw; } finally { NopContext.Current.SetCulture(userCulture); } }