Exemplo n.º 1
0
 protected void SetStatus(eStatusPos pStatus)
 {
     ActionStatus?.Invoke(new PosStatus()
     {
         Status = pStatus, ModelEquipment = ModelEquipment, State = (int)pStatus, TextState = pStatus.ToString()
     });
 }
Exemplo n.º 2
0
        /// <summary>
        /// треба обробити всі статуси.
        /// </summary>
        /// <param name="pStatus"></param>
        /// <returns></returns>
        public static ePosTypeError GetPosTypeError(this eStatusPos pStatus)
        {
            switch (pStatus)
            {
            case eStatusPos.StatusCodeIsNotAvailable:
                return(ePosTypeError.NotDefine);

            case eStatusPos.CardWasRead:
            case eStatusPos.UsedAChipCard:
            case eStatusPos.AuthorizationInProgress:
            case eStatusPos.WaitingForCashierAction:
            case eStatusPos.PrintingReceipt:
            case eStatusPos.PinEntryIsNeeded:
            case eStatusPos.CardWasRemoved:
            case eStatusPos.WaitingForCard:
            case eStatusPos.InProgress:
            case eStatusPos.CorrectTransaction:
            case eStatusPos.PinInputWaitKey:
            case eStatusPos.PinInputBackspacePressed:
            case eStatusPos.PinInputKeyPressed:
                return(ePosTypeError.NoError);

            case eStatusPos.WrongPIN:
            case eStatusPos.NotEnoughMoney:
            case eStatusPos.TransactionCanceledByUser:
            case eStatusPos.NoClientsCreditAccount:
            case eStatusPos.CardIslostRemoved:
            case eStatusPos.CardIsStolenRemoved:
            case eStatusPos.IncorrectAmountEntered:
            case eStatusPos.InvalidCardNumber:
                return(ePosTypeError.Card);


            case eStatusPos.ErrorConnectingWithTerminal:
            case eStatusPos.TerminalReturnedAnError:
            case eStatusPos.ErrorOpeningCOMPort:
            case eStatusPos.NeedToOpenCOMPort:
            case eStatusPos.Error:
            case eStatusPos.GeneralError:
            case eStatusPos.NoPaperInPrinter:
                return(ePosTypeError.PosTerminal);

            default:
                return(ePosTypeError.Other);

/*
 *                  EMVMultiAids = 8,
 *
 *      SuccessfullyFulfilled = 19,
 *
 *      AuthorizationRejectedNoPayment = 21,
 *
 *       = 25,
 *      EMVDecline = 26,
 *      TransactionLogIsFullNeedCloseBatch = 27,
 *      NoConnectionWithHost = 28,
 *       = 29,
 *      ErrorCryptoKeys = 30,
 *      CardReaderIsNotConnected = 31,
 *      TransactionIsAlreadyComplete = 32,
 *      ApprovedAndCompleted = 33,
 *      TheCardIsInOrderThereIsNoReasonToRefuse = 34,
 *      AuthorizationDenied = 35,
 *      UnregisteredTradingPoint = 36,
 *      AuthorizationRejectedWithdrawTheCardAtTheBanksRequest = 37,
 *      CommonErrorNeedToRepeat = 38,
 *      InvalidTransactionNetworkErrorNeedToRepeat = 39,
 *       = 40,
 *       = 41,
 *      BankNodeIsNotFoundOnTheNetwork = 42,
 *      CanceledByTheClient = 43,
 *      ActionsNotCompletedDidNotMatchData = 44,
 *      NoResponseFileIsTemporarilyUnavailable = 45,
 *      WrongFormatNeedToRepeat = 46,
 *      TheIssuerIsNotFoundInThePaymentSystem = 47,
 *      PartiallyCompleted = 48,
 *      TheValidityPeriodOfTheCardHasExpiredTheCardHasBeenWithdrawnAtTheBanksRequest = 49,
 *      ForbiddenCardRemove = 50,
 *      WithdrawnByTheIssuerRemovedFromTheCardAndContactedByTheAcquirer = 51,
 *      ThereAreNoAttemptsToEnterThePINRemoveTheCard = 52,
 *       = 53,
 *       = 54,
 *       = 55,
 *      NoSettlementSpecifiedClienAccount = 56,
 *      ThereIsNoCumulativeAccountOfTheClient = 57,
 *      TheExpirationDateOfTheCardExpires = 58,
 *      ThisTransactionTypeIsNotProvidedForTheGivenCard = 59,
 *      ThisTypeOfTransactionIsNotProvidedForPOSTerminal = 60,
 *      TheAamountOfAuthorizationExceededTheExpenseLimitOnTheCard = 61,
 *      IncorrectServiceCodeForbiddenCardCanNotBeSeized = 62,
 *      TheAmountOfTheCancellationAuthorizationIsDifferentFromTheAmountOfTheOriginalAuthorization = 63,
 *      TheExpenseLimitExpiredOnTheAccount = 64,
 *      TheCardIsVoidCanNotBeSeized = 65,
 *      CardIsWithdrawnFromATM = 66,
 *      ItIsTooLateToReceiveAnAnswerFromTheNetworkItIsNecessaryToRepeat = 67,
 *      TheNumberOfIncorrectlyEnteredPINsExceededTheAmountDischarged = 68,
 *      ActionsAreNotCompletedIncompleteDataItIsNecessaryToRollbackOrRepeat = 69,
 *      NoAccount = 70,
 *      AlreadyCanceledWhenTurnedOn = 71,
 *      GeneralNetworkErrorIncorrectData = 72,
 *      RemoteNetworkErrorOrPINEncryption = 73,
 *      TimeoutWhenConnectedWithTheIssuersNodeOrWrongCVVOrCacheIsNotApprovedTheCashbackSumLimitIsExceeded = 74,
 *      ThePINVerificationTransactionIsUnsuccessfulNetworkError = 75,
 *      PINCanNotBeCheckedNetworkError = 76,
 *      PINEncryptionErrorNetworkError = 77,
 *      IdentificationErrorIsANetworkError = 78,
 *      NoConnectionWithTheBankByTheIssuerNetworkError = 79,
 *      UnsuccessfulRequestRoutingIsNotPossibleNetworkError = 80,
 *      TheTransactionCanNotBeCompletedTheIssuerDeclineAuthorizationDueToAViolationOfTheRules = 81,
 *      DuplicationOfTransmissionNetworkError = 82,
 *      GeneralSystemMalfunction = 83,
 *      UnableToSendEncryptedMessage = 84
 *
 *
 */
            }
        }