/// <summary> /// pass additional info /// </summary> /// <param name="holder"></param> public override void GetPaymentInfo(SerializedOrderHolder holder) { if ((holder.Order as Order_V01) == null || SpecialResponse == null) { return; } string[] bankInfo = SpecialResponse.Split(','); if (bankInfo.Length == 2 && (holder.Order as Order_V01).Payments != null && ((holder.Order as Order_V01).Payments).Count > 0) { var btPayment = holder.BTOrder.Payments[0]; var orderPayment = (holder.Order as Order_V01).Payments[0] as CreditPayment_V01; btPayment.PaymentCode = orderPayment.TransactionType = "DC"; orderPayment.Card.IssuingBankID = bankInfo[0]; // this is PayChannel orderPayment.AuthorizationMerchantAccount = bankInfo[1]; // this is PaymentID } }
public ActionResult <SpecialResponse> GetSpecial([FromQuery] string productName) { var special = _specialsDataAccessor.GetByProductName(productName); if (special != null) { var specialResponse = new SpecialResponse { ProductName = special.ProductName, PurchaseQty = special.PurchaseQty, DiscountQty = special.PurchaseQty, Type = special.Type }; return(specialResponse); } return(null); }
public async Task <IActionResult> GetSaleproGoodPattn([FromRoute] int id) { try { var saleproGoodPattn = await _context.SaleproGoodPattn.SingleOrDefaultAsync(m => m.Id == id); var response = new SpecialResponse { SubPromotionDropDowns = iCodeProService.SubPromotionDropDowns(), GoodPattnDropDowns = iGetTranInvService.PattnDropDowns(), GoodClassDropDowns = iGetTranInvService.ClassDropDowns(), promotionSpecial = saleproGoodPattn }; return(Ok(response)); } catch (Exception ex) { return(StatusCode(500, ex)); } }
/// <summary> /// pass additional info /// </summary> /// <param name="holder"></param> public override void GetPaymentInfo(SerializedOrderHolder holder) { Order_V01 orderv01 = (holder.Order as Order_V01); if (orderv01 == null) { return; } if (orderv01.Payments != null && (orderv01.Payments).Count > 0) { var orderPayment = orderv01.Payments[0] as CreditPayment_V01; if (orderPayment != null && SpecialResponse != null) { var btPayment = holder.BTOrder.Payments[0]; btPayment.PaymentCode = orderPayment.TransactionType = "CC"; //Use back 'CC' as Payment Code for BT handling. string[] bankInfo = SpecialResponse.Split(','); if (bankInfo.Length == 2) { orderPayment.Card.IssuingBankID = bankInfo[0]; // this is PayChannel orderPayment.AuthorizationMerchantAccount = bankInfo[1]; // this is PaymentID } } } }