我在我的 razor Web 应用程序中使用了Paypal Helper 库。
_AppStart.cshtml
@{
PayPal.Profile.Initialize(
"XXXXXXXXXXXXXX.gmail.com",
"XXXXXXXXXX",
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "sandbox");
// General Adaptive Payments’ properties
PayPal.Profile.Language = "en_US";
PayPal.Profile.CancelUrl = "http://mywebsite.com";
PayPal.Profile.ReturnUrl = "http://mywebsite.com/PaypalReturn.cshtml";
PayPal.Profile.IpnUrl = "http://mywebsite.com/PaypalReturn.cshtml";
PayPal.Profile.CurrencyCode = "USD";
}
Subscribe.cshtml
@{
var payPalButton = PayPal.ButtonManager.SubscribeButton.Create(
business: "myname@merchant.com",
itemName: "Subscribe to premium account",
a3: "10.00",
p3: "1",
t3: "M");
HtmlString payPalButtonHtml = new HtmlString(payPalButton.WebSiteCode);
}
@payPalButtonHtml
但它会抛出一个错误:
无效参数 - 指定的电子邮件或商家 ID 无效。(错误代码:11928)
任何人都可以让我知道这有什么问题吗?
谢谢