Razor 无效参数-指定的电子邮件或商户ID无效。(错误代码:11928)

Razor 无效参数-指定的电子邮件或商户ID无效。(错误代码:11928),razor,paypal,subscribe,Razor,Paypal,Subscribe,我已经在我的razor web应用程序中使用了 \u AppStart.cshtml @{ PayPal.Profile.Initialize( "XXXXXXXXXXXXXX.gmail.com", "XXXXXXXXXX", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "sandbox"); // General Adapt

我已经在我的razor web应用程序中使用了

\u 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";
}
@{
    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
Subscribe.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";
}
@{
    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)

谁能告诉我有什么问题吗


谢谢,我已经解决了。错误本身说明了一切,但我没有明白

我必须在按钮创建方法的
business
参数中指定正确的商户电子邮件ID,如下所示:

var payPalButton = PayPal.ButtonManager.SubscribeButton.Create(
         business: "xxx-facilitator@xxxxxxxx.com",
         itemName: "Subscribe to premium account",
         a3: "10.00",
         p3: "1",
         t3: "M");
希望这是清楚的


谢谢

我也有同样的错误。你解决了吗?是的,我已经解决了。看看下面的答案。