Esempio n. 1
0
        protected internal override void stageExecute(SalePostContext context)
        {
            SaleRepo.SaleBuilder builder = context.saleBuild();
            SalePostRequest      request = context.Request;
            AcceptorDetail       defaultAcceptorDetail = builder.Terminal.DefaultAcceptorDetail;
            AcceptorDetail       dynamicAcceptor;

            if (request.hasDynamicAcceptor())
            {
                // So we have dynamic acceptor details provided, try to use.
                dynamicAcceptor = _acceptorUtil.obtainExplicitAcceptor(builder.Terminal, request.getDynamicAcceptorName(), request.getDynamicAcceptorStreet(), request.getDynamicAcceptorCity(), request.getDynamicAcceptorState(), request.getDynamicAcceptorPostalCode(), request.getDynamicAcceptorCustomerServicePhone(), request.getDynamicAcceptorSubMerchantId(), defaultAcceptorDetail.CustomerServiceEmail);

                if (dynamicAcceptor != null)
                {
                    //Logger.info("Dynamic Acceptor associated: " + dynamicAcceptor);
                    builder.ExplictAcceptor = dynamicAcceptor;
                }
                else
                {
                    //Logger.warn("Ignoring supplied Dynamic Acceptor");
                }
            }
            else
            {
                //Logger.warn("No Dynamic Acceptor - doing nothing");
            }

            nextStg(context);
        }
Esempio n. 2
0
        public override void stageExecute(SalePostContext context)
        {
            SaleRepo.SaleBuilder saleBuilder;
            SalePostRequest      request = context.Request;

            saleBuilder = context.saleBuild();
            if ((!string.ReferenceEquals(request.getRecipientSurname(), null)) || (request.getRecipientDOB() != null) || (!string.ReferenceEquals(request.getRecipientSurname(), null)) || (!string.ReferenceEquals(request.getDynamicAcceptorSubMerchantId(), null)))
            {
                SaleRepo.FundsRecipientBuilder recipBuilder = saleBuilder.fundsRecipientBuilder();

                recipBuilder.setSurname(request.getRecipientSurname()).setDoB(request.getRecipientDOB()).setPostalCode(request.getRecipientPostalCode()).setAccountNumber(request.getRecipientAccountNumber());
            }
            nextStage(context);
        }