public ToXMLString ( string prefix, string name ) : string | ||
prefix | string | |
name | string | |
Результат | string |
/** *AUTO_GENERATED */ public CreateMobilePaymentResponseType CreateMobilePayment(CreateMobilePaymentReq createMobilePaymentReq, string apiUserName) { IAPICallPreHandler apiCallPreHandler = null; string portName = "PayPalAPI"; setStandardParams(createMobilePaymentReq.CreateMobilePaymentRequest); DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(createMobilePaymentReq.ToXMLString(null, "CreateMobilePaymentReq"), null, null); apiCallPreHandler = new MerchantAPICallPreHandler(defaultHandler, apiUserName, getAccessToken(), getAccessTokenSecret()); ((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()='CreateMobilePaymentResponse']"); return new CreateMobilePaymentResponseType(xmlNode); }
/// <summary> /// /// </summary> ///<param name="createMobilePaymentReq"></param> ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> public CreateMobilePaymentResponseType CreateMobilePayment(CreateMobilePaymentReq createMobilePaymentReq, ICredential credential) { setStandardParams(createMobilePaymentReq.CreateMobilePaymentRequest); DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, createMobilePaymentReq.ToXMLString(null, "CreateMobilePaymentReq"), null, null); IAPICallPreHandler apiCallPreHandler = new MerchantAPICallPreHandler(this.config, defaultHandler, credential); ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName; ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion; ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = "PayPalAPI"; XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(Call(apiCallPreHandler)); return new CreateMobilePaymentResponseType( xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='CreateMobilePaymentResponse']") ); }
/** *AUTO_GENERATED */ public CreateMobilePaymentResponseType CreateMobilePayment(CreateMobilePaymentReq createMobilePaymentReq, string apiUserName) { setStandardParams(createMobilePaymentReq.CreateMobilePaymentRequest); string response = Call("CreateMobilePayment", createMobilePaymentReq.ToXMLString(), apiUserName); XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(response); XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='CreateMobilePaymentResponse']"); return new CreateMobilePaymentResponseType(xmlNode); }