private static BillPayReportDetail ProcessBillPayTransaction(TransactionDetailLookupResult lookupResult) { var productId = string.Empty; if (string.IsNullOrEmpty(lookupResult.ProductId)) { productId = ReportConstants.Common.UTILITY_BILL_PAYMENT_PRODUCT_TYPE; } else { productId = lookupResult.ProductId == ReportConstants.Common.EXPRESS_PAYMENT_PRODUCT_ID ? ReportConstants.Common.EXPRESS_PAYMENT_PRODUCT_TYPE : ReportConstants.Common.UTILITY_BILL_PAYMENT_PRODUCT_TYPE; } return(new BillPayReportDetail { Currency = lookupResult.IsoCurrencyCode, LocalTime = lookupResult.GetLocalTime(), ReferenceNumber = lookupResult.ReferenceId, UserId = lookupResult.GetUserId(), PosNumber = lookupResult.FormattedPosId(), FaceAmount = double.Parse(lookupResult.FaceAmount), FeeAmount = double.Parse(lookupResult.FeeAmount), TotalAmount = double.Parse(lookupResult.FaceAmount) + double.Parse(lookupResult.FeeAmount), ProductType = productId }); }
private static SendReportDetail ProcessSendTransaction(TransactionDetailLookupResult lookupResult) { return(new SendReportDetail { LocalTime = lookupResult.GetLocalTime(), ReferenceNumber = lookupResult.ReferenceId, UserId = lookupResult.GetUserId(), PosNumber = lookupResult.FormattedPosId(), FaceAmount = double.Parse(lookupResult.FaceAmount), FeeAmount = double.Parse(lookupResult.FeeAmount), TotalAmount = double.Parse(lookupResult.FaceAmount) + double.Parse(lookupResult.FeeAmount), Currency = lookupResult.IsoCurrencyCode ?? string.Empty }); }
private static ReceiveReportDetail ProcessReceiveTransaction(TransactionDetailLookupResult lookupResult) { //Amount var amount = double.Parse(lookupResult.FaceAmount); if (lookupResult.EventCode == DLSActivityTypeCode.RSN.ToString()) { amount += double.Parse(lookupResult.FeeAmount); } return(new ReceiveReportDetail { LocalTime = lookupResult.GetLocalTime(), ReferenceNumber = lookupResult.ReferenceId, UserId = lookupResult.GetUserId(), PosNumber = lookupResult.FormattedPosId(), TotalAmount = amount, Currency = lookupResult.IsoCurrencyCode ?? string.Empty, AuthCode = lookupResult.AuthCode ?? string.Empty, ReceiverLastName = lookupResult.ReceiverName.Split(',')[0], TransactionType = lookupResult.GetTransactionTypeName() }); }