c# 在应用程序中添加一个 PayPal 捐赠按钮 [英] c# add a PayPal donate button in application

查看:27
本文介绍了c# 在应用程序中添加一个 PayPal 捐赠按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序中添加 PayPal Donate 按钮,但我不知道如何添加.我尝试在 google 和 PayPal 网站上搜索,但没有找到解决方案.你有什么建议吗 ?

I want to add PayPal Donate button to my application, but I don't know how. I tried to search in google and on PayPal site, but I didn't found a solution. Do you have any suggestions ?

推荐答案

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

I found solution on that site : 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);
}

这篇关于c# 在应用程序中添加一个 PayPal 捐赠按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆