C#: PayPal Donate Button
If you have a PayPal account and would like to add a donate button to your application you can use the following code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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 + "¤cy_code=" + currency + "&bn=" + "PP%2dDonationsBF"; System.Diagnostics.Process.Start(url); } |
Tags: .Net, C#, Donate, PayPal, Visual Studio
I attempted to use this code but am unable to get it to work. I have tried:
https://www.paypal.com/en/cgi-bin/webscr” instead, still no luck.
Just loads up the paypal login screen.
Help…
Can you show me what your url looks like? Feel free to use the contact page if you don’t want to post it here.
I have asked another person to test it and also tested it myself just now and I can confirm that it works for me.
Resolved dethknite’s issue. There was a typo in the URL.
Thanks man!
Really useful.
Thanks that worked for me.
When i add the button it wont direct me to anything, as far as i ca see i did not forget anything. is it changed maybe for the 2010 version?
It should work. I have just tested it out in 2010 by copy/pasting the above code.
Have you been thinking how to obfuscate this code? If someone opens your app in decompiler, code can be changed (email) and donation can be sent to someone else.
محتوا ی این پیام از نظر کثرت از افراد
کم ارزش و کامل نیست ولی فداکار از مطالب کارخانه ها و بلاگ ها پیرامون این مطلب
در وب وجود دارند که می توان از آنها استفاده بهتری داشت
من آسوده خاطری هستم که درون تمام اینترنت مطلب
مشابه بوسیله این یادداشت حیات ندارد برای
این که مطلب کامل و جامع ی پیرامون این
مبحث است
سلام . کنیز قسم می خورم که این مطلب فصیح است و محتملاً هیچوقت نفر نتواند
نبا مشابه به این مطلب را اندر وبلاگ ظاهر کند برای این
که چقدر طولانی است
معنای مطلب ی این یادداشت از نظر هنگفت از افراد مناسب و کامل نیست ولی فداکار از مطالب
محل استقرار رادار ها و بلاگ ها پیرامون این مطلب
در وب وجود دارند که می توان از
آنها استفاده بهتری داشت
It’s awesome to pay a quick visit this web site and reading the views of all mates concerning this piece of writing,
while I am also zealous of getting experience.
این پیغام مشاوره و پیشنهاد مناسب برای کسانی است که می خواهند دوروبر محتویات
متشابه بوسیله این مطلب مطالعه بیشتری داشته باشند
سلام . عبد قسم می خورم که
این مطلب فصیح است و محتملاً هیچوقت
نفر نتواند پیغام مشابه به این مطلب را تو وبلاگ برملا کند برای این که بی
نهایت کامل است
A professional wagerer knows that there can come a interval when it will
lose a wager as a result of it’s part of the game and it
can not move in the identical manner and the identical system will make them win a higher amount also
at good instances. If that doesn’t persuade you, an easy strategy
to see it’s to look at the expected worth of the $a hundred parlay versus the anticipated value of
two $50 unfold bets, all at -a hundred and ten prices.
Whether you wish to parlay our model picks towards the unfold,
totals picks for this weekend, or picks from our crew of experts, it’s simpler
to identify good bets and parlay them collectively for big
income. BetQL will have you lined all school soccer season choosing games against the spread, but
you need to at all times be knowledgeable as to what each bet means.
You possibly can parlay picks together for a higher payout, however always be weary,
because you have to win each wager in a parlay to receive the winnings.
Each week, we can have 3-four free plays through the faculty football
season, so you will have the prospect to construct a profitable parlay each single week of the
2021 faculty soccer season, regardless of subscription standing.