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 = "[email protected]"; // 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 +
"¤cy_code=" + currency +
"&bn=" + "PP%2dDonationsBF";
System.Diagnostics.Process.Start(url);
}
答
我认为你需要打开一个浏览器,定义一个网站位置?并提供您的PayPal收件人参数?
您是否对Google C#“打开浏览器窗口”或“打开浏览器URL”?
我在哪里可以找到此网址所需的值?我的意思是,我可以猜出我的国家字符串,但其他的呢?在此先感谢 –
@BtcSources和未来读者只需FYI即可:如果您需要预设金额(例如'...&lc = US&amount = 1.99&currency_code = USD ...),您也可以添加'“&amount =”+ amount'。 ..') – derekantrican