/** *AUTO_GENERATED */ public AddressVerifyResponseType AddressVerify(AddressVerifyReq addressVerifyReq, string apiUserName) { setStandardParams(addressVerifyReq.AddressVerifyRequest); string response = Call("AddressVerify", addressVerifyReq.ToXMLString(), apiUserName); XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(response); XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='AddressVerifyResponse']"); return new AddressVerifyResponseType(xmlNode); }
/// <summary> /// /// </summary> ///<param name="addressVerifyReq"></param> ///<param name="apiUserName">API Username that you want to authenticate this call against. This username and the corresponding 3-token/certificate credentials must be available in Web.Config/App.Config</param> public AddressVerifyResponseType AddressVerify(AddressVerifyReq addressVerifyReq, string apiUserName) { setStandardParams(addressVerifyReq.AddressVerifyRequest); DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, addressVerifyReq.ToXMLString(null, "AddressVerifyReq"), null, null); IAPICallPreHandler apiCallPreHandler = new MerchantAPICallPreHandler(this.config, defaultHandler, apiUserName, getAccessToken(), getAccessTokenSecret()); ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName; ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion; ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = "PayPalAPI"; XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(Call(apiCallPreHandler)); return new AddressVerifyResponseType( xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='AddressVerifyResponse']") ); }
/** *AUTO_GENERATED */ public AddressVerifyResponseType AddressVerify(AddressVerifyReq addressVerifyReq, ICredential credential) { IAPICallPreHandler apiCallPreHandler = null; string portName = "PayPalAPI"; setStandardParams(addressVerifyReq.AddressVerifyRequest); DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(addressVerifyReq.ToXMLString(null, "AddressVerifyReq"), null, null); apiCallPreHandler = new MerchantAPICallPreHandler(defaultHandler, credential); ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName; ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion; ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = portName; string response = Call(apiCallPreHandler); XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(response); XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='AddressVerifyResponse']"); return new AddressVerifyResponseType(xmlNode); }