public DataResponse GetBillerPaymentOptions(PosBillPaymentRequest posBillPaymentRequest) { var cashier = _blackstonePosService.FindMerchant(posBillPaymentRequest.MerchantId); var cashierInfo = cashier.UIMapTo<Cashier, GiveCashier>(); var billerPaymentOptions = _meteleService.GetBillerPaymentOptionsPos(cashierInfo, posBillPaymentRequest.BillerId); var billerSettings = _meteleService.GetMasterBillerOptionsPos(cashierInfo, posBillPaymentRequest.BillerId); if(billerSettings == null) return new DataResponse { ErrorMessage = "Could not retrieve Biller Payment Options", Status = 201 }; if (billerSettings.PostingTime.HasPassedCutOff()) SetNextPaymentDay(billerPaymentOptions); return new DataResponse { Data = billerPaymentOptions, ErrorMessage = billerPaymentOptions != null ? string.Empty : "Could not retrieve Biller Payment Options", Status = billerPaymentOptions != null ? 200 : 201 }; }
public DataResponse DoBillPaymentNextStep(PosBillPaymentRequest posBillPaymentRequest) { var doBillPaymentNextStep = _blackstonePosService.DoBillPaymentNextStep(posBillPaymentRequest); return doBillPaymentNextStep; }
public DataResponse DoBillPayment(PosBillPaymentRequest posBillPaymentRequest) { var doBillPaymentResponse = _blackstonePosService.DoBillPayment(posBillPaymentRequest); return doBillPaymentResponse; }
public DataResponse GetMasterBiller(PosBillPaymentRequest posBillPaymentRequest) { var cashier = _blackstonePosService.FindMerchant(posBillPaymentRequest.MerchantId); var cashierInfo = cashier.UIMapTo<Cashier, GiveCashier>(); var masterBiller = _meteleService.GetMasterBillerOptionsPos(cashierInfo, posBillPaymentRequest.BillerId); var posMasterBiller = masterBiller.UIMapTo<MasterBiller, PosMasterBiller>(); return new DataResponse { Data = posMasterBiller, ErrorMessage = masterBiller != null ? string.Empty : "Could not retrieve Biller Details", Status = masterBiller != null ? 200: 201 }; }
public DataResponse GetBillPaymentCategories(PosBillPaymentRequest posBillPaymentRequest) { var cashier = _blackstonePosService.FindMerchant(posBillPaymentRequest.MerchantId); var cashierInfo = cashier.UIMapTo<Cashier, GiveCashier>(); var categories = _meteleService.GetBillPaymentCategoriesPos(cashierInfo); return new DataResponse { Data = categories, ErrorMessage = categories != null? string.Empty:"Could not retrieve categories", Status = categories != null? 200 : 201 }; }
public DataResponse GetBillersInitials(PosBillPaymentRequest posBillPaymentRequest) { var cashier = _blackstonePosService.FindMerchant(posBillPaymentRequest.MerchantId); var cashierInfo = MapperHelper.UIMapTo<Cashier, GiveCashier>(cashier); //Retrieves all master billers when the category is not suministrated var billersByCategory = string.IsNullOrEmpty(posBillPaymentRequest.CategoryId) ? GetAllMasterBillers(cashierInfo) : GetMasterBillersByCategories(cashierInfo, posBillPaymentRequest.CategoryId); var initials = billersByCategory.Select(a => a.Id.Substring(0,1)).GetInitials(); return new DataResponse { Data = initials, ErrorMessage = billersByCategory != null ? string.Empty : "Could not retrieve Billers", Status = billersByCategory != null ? 200 : 201 }; }