Esempio n. 1
0
        public DeliveryAddressResult GetApprovedDeliveryAddress(string orderRef)
        {
            Log.InfoFormat("Calling GetApprovedDeliveryAddress for orderRef:{0}.", orderRef);

            string hash      = _hasher.Create(_payExSettings.AccountNumber, orderRef, _payExSettings.EncryptionKey);
            string xmlResult = _orderFacade.GetApprovedDeliveryAddress(_payExSettings.AccountNumber, orderRef, hash);

            DeliveryAddressResult result = _resultParser.Deserialize <DeliveryAddressResult>(xmlResult);

            if (result.Status.Success)
            {
                Log.InfoFormat("Successfully called GetApprovedDeliveryAddress for orderRef:{0}. Result:{1}", orderRef, xmlResult);
            }
            else
            {
                Log.ErrorFormat("Error when calling GetApprovedDeliveryAddress for orderRef:{0}. Result:{1}", orderRef, xmlResult);
            }
            return(result);
        }