private static IPaymentResponseDestination CreateRequest(string destinationType)
        {
            if (CheckoutUtils.GetEnumMemberValue(PaymentDestinationType.Card).Equals(destinationType))
            {
                return(new PaymentResponseCardDestination());
            }

            return(new PaymentResponseAlternativeDestination());
        }
コード例 #2
0
        private static WorkflowActionResponse Create(string type)
        {
            if (CheckoutUtils.GetEnumMemberValue(WorkflowActionType.Webhook).Equals(type))
            {
                return(new WebhookWorkflowActionResponse());
            }

            return(new WorkflowActionResponse());
        }
コード例 #3
0
        private static IResponseSource CreateRequest(string sourceType)
        {
            if (CheckoutUtils.GetEnumMemberValue(PaymentSourceType.Card).Equals(sourceType))
            {
                return(new ResponseCardSource());
            }

            return(new AlternativePaymentSourceResponse());
        }
コード例 #4
0
        private static IResponseSource CreateResponse(string sourceType)
        {
            if (CheckoutUtils.GetEnumMemberValue(PaymentSourceType.Card).Equals(sourceType))
            {
                return(new CardResponseSource());
            }

            if (CheckoutUtils.GetEnumMemberValue(PaymentSourceType.CurrencyAccount).Equals(sourceType))
            {
                return(new CurrencyAccountResponseSource());
            }

            return(new AlternativePaymentSourceResponse());
        }
コード例 #5
0
        private static GetInstrumentResponse Create(string type)
        {
            if (CheckoutUtils.GetEnumMemberValue(InstrumentType.BankAccount).Equals(type))
            {
                return(new GetBankAccountInstrumentResponse());
            }

            if (CheckoutUtils.GetEnumMemberValue(InstrumentType.Card).Equals(type))
            {
                return(new GetCardInstrumentResponse());
            }

            return(new GetInstrumentResponse(
                       CheckoutUtils.GetEnumFromStringMemberValue <InstrumentType>(type)));
        }
コード例 #6
0
        private static ISender CreateResponse(string senderType)
        {
            if (CheckoutUtils.GetEnumMemberValue(PaymentSenderType.Corporate).Equals(senderType))
            {
                return(new PaymentCorporateSender());
            }

            if (CheckoutUtils.GetEnumMemberValue(PaymentSenderType.Individual).Equals(senderType))
            {
                return(new PaymentIndividualSender());
            }

            if (CheckoutUtils.GetEnumMemberValue(PaymentSenderType.Instrument).Equals(senderType))
            {
                return(new PaymentInstrumentSender());
            }

            return(new ResponseAlternativeSender());
        }
        private static WorkflowConditionResponse Create(string type)
        {
            if (CheckoutUtils.GetEnumMemberValue(WorkflowConditionType.Entity).Equals(type))
            {
                return(new EntityWorkflowConditionResponse());
            }

            if (CheckoutUtils.GetEnumMemberValue(WorkflowConditionType.Event).Equals(type))
            {
                return(new EventWorkflowConditionResponse());
            }

            if (CheckoutUtils.GetEnumMemberValue(WorkflowConditionType.ProcessingChannel).Equals(type))
            {
                return(new ProcessingChannelWorkflowConditionResponse());
            }

            return(new WorkflowConditionResponse());
        }
コード例 #8
0
        private static ScheduleResponse RetrieveScheduleResponseType(JToken jToken)
        {
            string sourceType = jToken.SelectToken(CheckoutUtils.Frequency)?.Value <string>()?.ToLowerInvariant();

            if (CheckoutUtils.GetEnumMemberValue(ScheduleFrequency.Daily).Equals(sourceType))
            {
                return(new ScheduleFrequencyDailyResponse());
            }

            if (CheckoutUtils.GetEnumMemberValue(ScheduleFrequency.Weekly).Equals(sourceType))
            {
                return(new ScheduleFrequencyWeeklyResponse());
            }

            if (CheckoutUtils.GetEnumMemberValue(ScheduleFrequency.Monthly).Equals(sourceType))
            {
                return(new ScheduleFrequencyMonthlyResponse());
            }

            return(new ScheduleResponse(CheckoutUtils.GetEnumFromStringMemberValue <ScheduleFrequency>(sourceType)));
        }