Beispiel #1
0
        protected ConfirmOrderResponse ConfirmServicePIL(string idRichiesta)
        {
            // Prima PreConferma e poi Conferma
            OrderRequest preconfirmRequest = GetPreConfirmRequest(idRichiesta);
            var          ceHeader          = Helper.GetCeHeader();

            ceHeader.SenderSystem = "H2H";
            ceHeader.IDSender     = "999988";
            ceHeader.IdCRM        = string.Empty;
            ceHeader.UserId       = "nello.citta.npce";
            ceHeader.ContractId   = string.Empty;
            ceHeader.GUIDMessage  = idRichiesta;
            OrderResponse preConfirmResponse = null;
            var           preConfirmResult   = Helper.PublishToBizTalk <OrderRequest, OrderResponse>(preconfirmRequest, ceHeader, ambiente.UrlEntryPoint, out preConfirmResponse);

            Assert.AreEqual(TResultResType.I, preConfirmResult.ResType);
            Thread.Sleep(20000);

            ConfirmOrder         confirmRequest  = GetConfirmRequest(preConfirmResponse.IdOrder, preConfirmResponse.PaymentTypes[0].TypeDescription);
            ConfirmOrderResponse confirmResponse = null;
            var result = Helper.PublishToBizTalk <ConfirmOrder, ConfirmOrderResponse>(confirmRequest, ceHeader, ambiente.UrlEntryPoint, out confirmResponse);

            Assert.AreEqual(TResultResType.I, result.ResType);
            return(confirmResponse);
        }
Beispiel #2
0
        protected virtual ConfirmOrder GetConfirmRequest(string idOrdine, string typeDescription)
        {
            ConfirmOrder confirmOrder = new ConfirmOrder();

            confirmOrder.IdOrder     = idOrdine;
            confirmOrder.PaymentType = new PaymentType
            {
                PostPayment          = true,
                PostPaymentSpecified = true,
                TypeDescription      = typeDescription,
                TypeId = "6"
            };

            return(confirmOrder);
        }