本文整理汇总了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());
}
示例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']")
);
}
示例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);
}
示例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);
}
示例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']")
);
}
示例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']")
);
}
示例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']")
);
}
示例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);
}
示例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);
}
示例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']")
);
}
示例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);
}
示例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());
}
示例13: Endpoint
public void Endpoint()
{
defaultSOAPHandler = new DefaultSOAPAPICallHandler(ConfigManager.Instance.GetProperties(), Constants.PayloadNVP, string.Empty, string.Empty);
Assert.AreEqual(Constants.APIEndpointSOAP, defaultSOAPHandler.GetEndpoint());
}
示例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);
}
示例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']")
);
}