【发布时间】:2012-05-05 21:06:01
【问题描述】:
我在网上找到了this code。
但根据WSDL,PayPal API 中不存在paypalAAInt 函数。任何人都可以帮助我如何在 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?
【问题讨论】:
-
请先确保您的答案尚未在论坛中得到回答,当您编写问题时,现有问题会自动出现,而我提到的问题会自动出现!如果你也用谷歌搜索
Paypal Express C#,那么老问题就会出现...... -
是的,我已经看到了 paresh 的问题,但我的问题是我如何从 paypal api 网络服务获得响应以接收令牌???
-
我一直在阅读你的问题......它没有提到你在评论中所说的!您的问题具体而简单地说:谁能帮助我如何在 asp.net 中集成 paypal express checkout,为此,这是一个重复的问题。
-
我已经编辑了问题,请您帮忙