public CompleteResult Complete(string orderRef) { Log.InfoFormat("Calling Complete for orderRef:{0}.", orderRef); string hash = _hasher.Create(_payExSettings.AccountNumber, orderRef, _payExSettings.EncryptionKey); string xmlResult = _orderFacade.Complete(_payExSettings.AccountNumber, orderRef, hash); CompleteResult result = _resultParser.Deserialize <CompleteResult>(xmlResult); if (result.Status.Success) { Log.InfoFormat("Successfully called Complete for orderRef:{0}. Result:{1}", orderRef, xmlResult); } else { Log.ErrorFormat("Error when calling Complete for orderRef:{0}. Result:{1}", orderRef, xmlResult); } return(result); }