public IHttpActionResult Put(WebPayment webPayment) { string response = crudFuction.BizUpdatePayment(webPayment.WebPaymentToBizPayment()); if (!response.Equals("EXITO")) { return(BadRequest(response)); } else { return(Ok(response)); } }
/// <summary> /// Bizs the payment to web payment. /// </summary> /// <param name="DataPayment">The data payment.</param> /// <returns>WebPayment.</returns> public static WebPayment BizPaymentToWebPayment(this BizPayment DataPayment) { WebPayment webPayment = new WebPayment { Id = DataPayment.Id, UserId = DataPayment.UserId, PaymentStatus = DataPayment.PaymentStatus, Nombre = DataPayment.Nombre, Amount = DataPayment.Amount, StatusName = DataPayment.StatusName, PaymentDate = DataPayment.PaymentDate, }; return(webPayment); }
/// <summary> /// Webs the payment to biz payment. /// </summary> /// <param name="DataPayment">The data payment.</param> /// <returns>BizPayment.</returns> public static BizPayment WebPaymentToBizPayment(this WebPayment DataPayment) { BizPayment bizPayment = new BizPayment { Id = DataPayment.Id, UserId = DataPayment.UserId, PaymentStatus = DataPayment.PaymentStatus, Nombre = DataPayment.Nombre, Amount = DataPayment.Amount, StatusName = DataPayment.StatusName, PaymentDate = DataPayment.PaymentDate, }; return(bizPayment); }
public PaymentTransactionRepository() { _db = new WebPayment(); }
public TrainController(WebPayment db) { _db = db; }