我在网上找到了这段代码。
但是根据WSDLpaypalAAInt
,PayPal API 中不存在该功能。谁能帮助我如何在 Asp.Net 中集成 PayPal 快速结帐
CustomSecurityHeaderType type = new CustomSecurityHeaderType();
type.Credentials = new UserIdPasswordType()
{
Username = "thakur_1322207622_biz_api1.gmail.com",
Password = "1322207646",
Signature = "An5ns1Kso7MWUdW4ErQKJJJ4qi4-Asr3E2CXn-a5b6uZmCDTPNNvpGBl"
};
SetExpressCheckoutRequestDetailsType sdt = new SetExpressCheckoutRequestDetailsType();
sdt.NoShipping = "1";
PaymentDetailsType pdt = new PaymentDetailsType()
{
OrderDescription = "Order for 1 year" + Request.Cookies["username"].Value,
OrderTotal = new BasicAmountType()
{
currencyID = CurrencyCodeType.USD,
Value = "95.40"
}
};
sdt.PaymentDetails = new PaymentDetailsType[] { pdt };
sdt.CancelURL = "http://localhost:2326/MusicStore/Default.aspx";
sdt.ReturnURL = "http://localhost:2326/MusicStore/regsuccessfull.aspx";
SetExpressCheckoutReq req = new SetExpressCheckoutReq()
{
SetExpressCheckoutRequest = new SetExpressCheckoutRequestType()
{
SetExpressCheckoutRequestDetails = sdt,
Version = "60.0"
}
};
var resp = paypalAAInt.SetExpressCheckout(ref type, req);
if (resp.Errors != null && resp.Errors.Length > 0)
{
// errors occured
throw new Exception("Exception(s) occured when calling PayPal. First exception: " +
resp.Errors[0].LongMessage);
}
Response.Redirect(string.Format("{0}?cmd=_express-checkout&token={1}",
ConfigurationManager.AppSettings["PayPalSubmitUrl"], resp.Token));
这是我正在使用的代码,但该功能paypalAAInt
在 PayPal API 中不存在。应该使用哪个函数来代替paypalAAInt
?