当前位置: 首页>>代码示例>>C#>>正文


C# PayPal.DefaultSOAPAPICallHandler类代码示例

本文整理汇总了C#中PayPal.DefaultSOAPAPICallHandler的典型用法代码示例。如果您正苦于以下问题:C# DefaultSOAPAPICallHandler类的具体用法?C# DefaultSOAPAPICallHandler怎么用?C# DefaultSOAPAPICallHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DefaultSOAPAPICallHandler类属于PayPal命名空间,在下文中一共展示了DefaultSOAPAPICallHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DomEndpointTest

 public void DomEndpointTest()
 {
     APIContext baseAPIContext = new APIContext();
     Dictionary<string, string> configurationMap = new Dictionary<string, string>();
     configurationMap.Add("endpoint", "https://api-3t.sandbox.paypal.com/2.0");
     DefaultSOAPAPICallHandler defHandler = new DefaultSOAPAPICallHandler(new SampleBody(), baseAPIContext, configurationMap, "DoDirectPayment");
     Assert.AreEqual("https://api-3t.sandbox.paypal.com/2.0", defHandler.GetEndpoint());
 }
开发者ID:PieterScheffers,项目名称:FotoLab,代码行数:8,代码来源:DefaultSOAPAPICallHandlerTest.cs

示例2: AddressVerify

        /// <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']")
            );
        }
开发者ID:cherishPhoebe,项目名称:merchant-sdk-dotnet,代码行数:20,代码来源:PayPalAPIInterfaceServiceService.cs

示例3: AddressVerify

 /**
   *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);
 }
开发者ID:robglas,项目名称:merchant-sdk-dotnet,代码行数:19,代码来源:PayPalAPIInterfaceServiceService.cs

示例4: DomPayloadTest

        public void DomPayloadTest()
        {
            DefaultSOAPAPICallHandler.XMLNamespaceProvider = new XmlNamespacePrefixProvider();
            APIContext api = new APIContext();
            api.SOAPHeader = new SampleHeader();
            Dictionary<string, string> configurationMap = new Dictionary<string, string>();
            configurationMap.Add("service.EndPoint", "https://api-3t.sandbox.paypal.com/2.0");
            api.Config = configurationMap;

            DefaultSOAPAPICallHandler defHandler = new DefaultSOAPAPICallHandler(new SampleBody(), api, null, "DoDirectPayment");
            string payload = defHandler.GetPayload().Trim();
            string expectedPayload = "<soapenv:Envelope xmlns:xml=\"http://www.w3.org/XML/1998/namespace\" xmlns:ed=\"urn:ebay:apis:EnhancedDataTypes\" xmlns:cc=\"urn:ebay:apis:CoreComponentTypes\" xmlns:ebl=\"urn:ebay:apis:eBLBaseComponents\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:wsdlsoap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:ns=\"urn:ebay:api:PayPalAPI\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">"  +
                "<soapenv:Header>" +
                "<ns:RequesterCredentials>" +
                "<ebl:Credentials>" +
                "<ebl:Username>jb-us-seller_api1.paypal.com</ebl:Username>" +
                "</ebl:Credentials>" +
                "</ns:RequesterCredentials>" +
                "</soapenv:Header>" +
                "<soapenv:Body>" +
                "<ns:DoDirectPaymentReq>" +
                "<ns:DoDirectPaymentRequest>" +
                "<ebl:Version>98.0</ebl:Version>" +
                "<ebl:DoDirectPaymentRequestDetails>" +
                "<ebl:CreditCard>" +
                "<ebl:CreditCardType>Visa</ebl:CreditCardType>" +
                "<ebl:CreditCardNumber>4202297003827029</ebl:CreditCardNumber>" +
                "<ebl:CVV2>962</ebl:CVV2>" +
                "</ebl:CreditCard>" +
                "</ebl:DoDirectPaymentRequestDetails>" +
                "</ns:DoDirectPaymentRequest>" +
                "</ns:DoDirectPaymentReq>" +
                "</soapenv:Body>" +
            "</soapenv:Envelope>";
            Assert.AreEqual(expectedPayload, payload);
        }
开发者ID:PieterScheffers,项目名称:FotoLab,代码行数:36,代码来源:DefaultSOAPAPICallHandlerTest.cs

示例5: ManagePendingTransactionStatus

        /// <summary>
        /// 
        /// </summary>
        ///<param name="managePendingTransactionStatusReq"></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 ManagePendingTransactionStatusResponseType ManagePendingTransactionStatus(ManagePendingTransactionStatusReq managePendingTransactionStatusReq, string apiUserName)
        {
            setStandardParams(managePendingTransactionStatusReq.ManagePendingTransactionStatusRequest);
            DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, managePendingTransactionStatusReq.ToXMLString(null, "ManagePendingTransactionStatusReq"), null, null);
            IAPICallPreHandler apiCallPreHandler = new MerchantAPICallPreHandler(this.config, defaultHandler, apiUserName, getAccessToken(), getAccessTokenSecret());
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
            ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = "PayPalAPIAA";

            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.LoadXml(Call(apiCallPreHandler));
            return new ManagePendingTransactionStatusResponseType(
                xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='ManagePendingTransactionStatusResponse']")
            );
        }
开发者ID:cherishPhoebe,项目名称:merchant-sdk-dotnet,代码行数:20,代码来源:PayPalAPIInterfaceServiceService.cs

示例6: GetBillingAgreementCustomerDetails

        /// <summary>
        /// 
        /// </summary>
        ///<param name="getBillingAgreementCustomerDetailsReq"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> 
        public GetBillingAgreementCustomerDetailsResponseType GetBillingAgreementCustomerDetails(GetBillingAgreementCustomerDetailsReq getBillingAgreementCustomerDetailsReq, ICredential credential)
        {
            setStandardParams(getBillingAgreementCustomerDetailsReq.GetBillingAgreementCustomerDetailsRequest);
            DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, getBillingAgreementCustomerDetailsReq.ToXMLString(null, "GetBillingAgreementCustomerDetailsReq"), null, null);
            IAPICallPreHandler apiCallPreHandler = new MerchantAPICallPreHandler(this.config, defaultHandler, credential);
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
            ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = "PayPalAPIAA";

            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.LoadXml(Call(apiCallPreHandler));
            return new GetBillingAgreementCustomerDetailsResponseType(
                xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='GetBillingAgreementCustomerDetailsResponse']")
            );
        }
开发者ID:cherishPhoebe,项目名称:merchant-sdk-dotnet,代码行数:20,代码来源:PayPalAPIInterfaceServiceService.cs

示例7: ExternalRememberMeOptOut

        /// <summary>
        /// 
        /// </summary>
        ///<param name="externalRememberMeOptOutReq"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> 
        public ExternalRememberMeOptOutResponseType ExternalRememberMeOptOut(ExternalRememberMeOptOutReq externalRememberMeOptOutReq, ICredential credential)
        {
            setStandardParams(externalRememberMeOptOutReq.ExternalRememberMeOptOutRequest);
            DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, externalRememberMeOptOutReq.ToXMLString(null, "ExternalRememberMeOptOutReq"), null, null);
            IAPICallPreHandler apiCallPreHandler = new MerchantAPICallPreHandler(this.config, defaultHandler, credential);
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
            ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = "PayPalAPIAA";

            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.LoadXml(Call(apiCallPreHandler));
            return new ExternalRememberMeOptOutResponseType(
                xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='ExternalRememberMeOptOutResponse']")
            );
        }
开发者ID:cherishPhoebe,项目名称:merchant-sdk-dotnet,代码行数:20,代码来源:PayPalAPIInterfaceServiceService.cs

示例8: DoUATPExpressCheckoutPayment

 /**
   *AUTO_GENERATED
  	  */
 public DoUATPExpressCheckoutPaymentResponseType DoUATPExpressCheckoutPayment(DoUATPExpressCheckoutPaymentReq doUATPExpressCheckoutPaymentReq, string apiUserName)
 {
     IAPICallPreHandler apiCallPreHandler = null;
      		string portName = "PayPalAPIAA";
     setStandardParams(doUATPExpressCheckoutPaymentReq.DoUATPExpressCheckoutPaymentRequest);
     DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(doUATPExpressCheckoutPaymentReq.ToXMLString(null, "DoUATPExpressCheckoutPaymentReq"), 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()='DoUATPExpressCheckoutPaymentResponse']");
     return new DoUATPExpressCheckoutPaymentResponseType(xmlNode);
 }
开发者ID:robglas,项目名称:merchant-sdk-dotnet,代码行数:19,代码来源:PayPalAPIInterfaceServiceService.cs

示例9: HeaderElement

 public void HeaderElement()
 {
     defaultSOAPHandler = new DefaultSOAPAPICallHandler(ConfigManager.Instance.GetProperties(), string.Empty, string.Empty, string.Empty);
     defaultSOAPHandler.HeaderElement = "HeaderElement";
     Assert.AreEqual("HeaderElement", defaultSOAPHandler.HeaderElement);
 }
开发者ID:PieterScheffers,项目名称:FotoLab,代码行数:6,代码来源:DefaultSOAPAPICallHandlerTest.cs

示例10: UpdateRecurringPaymentsProfile

        /// <summary>
        /// 
        /// </summary>
        ///<param name="updateRecurringPaymentsProfileReq"></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 UpdateRecurringPaymentsProfileResponseType UpdateRecurringPaymentsProfile(UpdateRecurringPaymentsProfileReq updateRecurringPaymentsProfileReq, string apiUserName)
        {
            setStandardParams(updateRecurringPaymentsProfileReq.UpdateRecurringPaymentsProfileRequest);
            DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, updateRecurringPaymentsProfileReq.ToXMLString(null, "UpdateRecurringPaymentsProfileReq"), null, null);
            IAPICallPreHandler apiCallPreHandler = new MerchantAPICallPreHandler(this.config, defaultHandler, apiUserName, getAccessToken(), getAccessTokenSecret());
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKName = SDKName;
            ((MerchantAPICallPreHandler) apiCallPreHandler).SDKVersion = SDKVersion;
            ((MerchantAPICallPreHandler) apiCallPreHandler).PortName = "PayPalAPIAA";

            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.LoadXml(Call(apiCallPreHandler));
            return new UpdateRecurringPaymentsProfileResponseType(
                xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='UpdateRecurringPaymentsProfileResponse']")
            );
        }
开发者ID:cherishPhoebe,项目名称:merchant-sdk-dotnet,代码行数:20,代码来源:PayPalAPIInterfaceServiceService.cs

示例11: GetBillingAgreementCustomerDetails

 /**
   *AUTO_GENERATED
  	  */
 public GetBillingAgreementCustomerDetailsResponseType GetBillingAgreementCustomerDetails(GetBillingAgreementCustomerDetailsReq getBillingAgreementCustomerDetailsReq, string apiUserName)
 {
     IAPICallPreHandler apiCallPreHandler = null;
      		string portName = "PayPalAPIAA";
     setStandardParams(getBillingAgreementCustomerDetailsReq.GetBillingAgreementCustomerDetailsRequest);
     DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(getBillingAgreementCustomerDetailsReq.ToXMLString(null, "GetBillingAgreementCustomerDetailsReq"), 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()='GetBillingAgreementCustomerDetailsResponse']");
     return new GetBillingAgreementCustomerDetailsResponseType(xmlNode);
 }
开发者ID:robglas,项目名称:merchant-sdk-dotnet,代码行数:19,代码来源:PayPalAPIInterfaceServiceService.cs

示例12: GetPayloadForEmptyRawPayload

 public void GetPayloadForEmptyRawPayload()
 {
     defaultSOAPHandler = new DefaultSOAPAPICallHandler(ConfigManager.Instance.GetProperties(), string.Empty, string.Empty, string.Empty);
     Assert.AreEqual("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" ><soapenv:Header></soapenv:Header><soapenv:Body></soapenv:Body></soapenv:Envelope>", defaultSOAPHandler.GetPayload());
 }
开发者ID:PieterScheffers,项目名称:FotoLab,代码行数:5,代码来源:DefaultSOAPAPICallHandlerTest.cs

示例13: Endpoint

 public void Endpoint()
 {
     defaultSOAPHandler = new DefaultSOAPAPICallHandler(ConfigManager.Instance.GetProperties(), Constants.PayloadNVP, string.Empty, string.Empty);
     Assert.AreEqual(Constants.APIEndpointSOAP, defaultSOAPHandler.GetEndpoint());
 }
开发者ID:PieterScheffers,项目名称:FotoLab,代码行数:5,代码来源:DefaultSOAPAPICallHandlerTest.cs

示例14: NamespaceAttributes

 public void NamespaceAttributes()
 {
     defaultSOAPHandler = new DefaultSOAPAPICallHandler(ConfigManager.Instance.GetProperties(), string.Empty, string.Empty, string.Empty);
     defaultSOAPHandler.NamespaceAttributes = "NamespaceAttributes";
     Assert.AreEqual("NamespaceAttributes", defaultSOAPHandler.NamespaceAttributes);
 }
开发者ID:PieterScheffers,项目名称:FotoLab,代码行数:6,代码来源:DefaultSOAPAPICallHandlerTest.cs

示例15: SetMobileCheckout

        /// <summary>
        /// 
        /// </summary>
        ///<param name="setMobileCheckoutReq"></param>
        ///<param name="credential">An explicit ICredential object that you want to authenticate this call against</param> 
        public SetMobileCheckoutResponseType SetMobileCheckout(SetMobileCheckoutReq setMobileCheckoutReq, ICredential credential)
        {
            setStandardParams(setMobileCheckoutReq.SetMobileCheckoutRequest);
            DefaultSOAPAPICallHandler defaultHandler = new DefaultSOAPAPICallHandler(this.config, setMobileCheckoutReq.ToXMLString(null, "SetMobileCheckoutReq"), 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 SetMobileCheckoutResponseType(
                xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='SetMobileCheckoutResponse']")
            );
        }
开发者ID:cherishPhoebe,项目名称:merchant-sdk-dotnet,代码行数:20,代码来源:PayPalAPIInterfaceServiceService.cs


注:本文中的PayPal.DefaultSOAPAPICallHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。