c#在应用程序中添加PayPal捐赠按钮

本文关键字:按钮 PayPal 添加 应用程序 | 更新日期: 2023-09-27 18:28:42

我想在我的应用程序中添加PayPal捐赠按钮,但我不知道如何添加。我试着在谷歌和贝宝网站上搜索,但没有找到解决方案。你有什么建议吗?

c#在应用程序中添加PayPal捐赠按钮

我在那个网站上找到了解决方案:http://www.gorancic.com/blog/net/c-paypal-donate-button:

private void btnDonate_Click(object sender, System.EventArgs e)
{
    string url = "";
    string business     = "my@paypalemail.com";  // your paypal email
    string description  = "Donation";            // '%20' represents a space. remember HTML!
    string country      = "AU";                  // AU, US, etc.
    string currency     = "AUD";                 // AUD, USD, etc.
    url += "https://www.paypal.com/cgi-bin/webscr" +
        "?cmd=" + "_donations" +
        "&business=" + business +
        "&lc=" + country +
        "&item_name=" + description +
        "&currency_code=" + currency +
        "&bn=" + "PP%2dDonationsBF";
    System.Diagnostics.Process.Start(url);
}