简体   繁体   中英

How to link to my PayPal donate page from within a WPF application?

Is there some simple donation URL I'm missing from PayPal?

When I generate my donate button, PayPal returns some HTML I can paste into my web page. Unfortunately this link generates some session keys and whatnot.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----Masdfasdfasdfasdfasdfasdfsadfasdfasdfasdfasdf=-----END PKCS7-----
">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Is there some simple URL I can place into my WPF application?

I'm placing an image of the donation picture:

在此处输入图片说明

And on the click of that picture:

    private void donation_MouseDown(object sender, MouseButtonEventArgs e)
    {
        try
        {
            Process.Start("http://donation page here.com/");
        }
        catch (Exception)
        {
            MessageBox.Show("Something went wrong! Rest assured the cleanup monkeys have been sent!", "Woops!", MessageBoxButton.OK, MessageBoxImage.Error);
        }
    }

Where Process.Start will open the url in the users default web browser.

Thanks for the suggestions.

When you generate your button, you should tick "Save button with PayPal" in Step 2 of the button creation tool. Then you should get two tabs in the results: Website containing the HTML button and Email containing a simple link that could be pasted into an email. You should be able to use the simple Email link in your application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM