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

问题描述:

我想向我的应用程序添加PayPal捐赠按钮,但我不知道如何。我试图在谷歌和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  = "[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 + 
     "&currency_code=" + currency + 
     "&bn=" + "PP%2dDonationsBF"; 

    System.Diagnostics.Process.Start(url); 
} 
+0

我在哪里可以找到此网址所需的值?我的意思是,我可以猜出我的国家字符串,但其他的呢?在此先感谢 –

+1

@BtcSources和未来读者只需FYI即可:如果您需要预设金额(例如'...&lc = US&amount = 1.99&currency_code = USD ...),您也可以添加'“&amount =”+ amount'。 ..') – derekantrican

我认为你需要打开一个浏览器,定义一个网站位置?并提供您的PayPal收件人参数?

您是否对Google C#“打开浏览器窗口”或“打开浏览器URL”?

你检查了他们的开发者api吗? https://developer.paypal.com/webapps/developer/docs/

至少提及Android和IO。

检查thisthis将帮助你实现。