【发布时间】:2011-01-07 08:22:00
【问题描述】:
我现在正试图弄清楚如何发送请求。例如,我看到 3 种代理类型:
SetExpressCheckoutDetails
SetExpressCheckoutReq
SetExpressCheckoutRequest
SetExpressCheckoutResponse
所以到目前为止,我继续创建了以下内容:
SetExpressCheckoutRequestType checkoutRequest = new SetExpressCheckoutRequestType();
SetExpressCheckoutRequestDetailsType checkoutRequestDetails = new SetExpressCheckoutRequestDetailsType();
// Assign properties.
checkoutRequestDetails.ReturnURL = returnURL;
checkoutRequestDetails.CancelURL = cancelURL;
// Set all parameters required for this transaction.
checkoutRequestDetails.PaymentAction = PaymentActionCodeType.Sale;
// Do not display any shipping address fields in Paypal payment screens.
checkoutRequestDetails.NoShipping = "1";
checkoutRequestDetails.LocaleCode = "en-US";
checkoutRequest.SetExpressCheckoutRequestDetails = checkoutRequestDetails;
现在我想执行实际的 API 调用并检索响应数据。我现在不知道如何调用/执行。我们还必须附上 PayPal X509 证书。我不明白怎么打电话。我正在使用 .NET 3.5,但使用的是旧的 Web 服务。我们还没有计划使用 WCF,所以我需要了解如何在填充完所有内容后执行调用。
我也不明白以下内容与该类型最初的用途之间的区别。因为这些类型没有附加任何类型的“调用”逻辑,所以它们有什么用?
SetExpressCheckoutReq
SetExpressCheckoutRequest
不,我们不会使用 PayPal SDK。在 Web 服务在 2.0 中得到改进之前,这已经过时了(.NET 1.1)。
【问题讨论】: