简体   繁体   English

如何从WPF应用程序链接到我的PayPal捐赠页面?

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

Is there some simple donation URL I'm missing from PayPal? PayPal是否缺少一些简单的捐赠URL?

When I generate my donate button, PayPal returns some HTML I can paste into my web page. 当我生成捐赠按钮时,PayPal返回一些HTML,可以将其粘贴到我的网页中。 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? 我可以在WPF应用程序中放入一些简单的URL吗?

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. 其中Process.Start将在用户默认的Web浏览器中打开URL。

Thanks for the suggestions. 感谢您的建议。

When you generate your button, you should tick "Save button with PayPal" in Step 2 of the button creation tool. 生成按钮时,应在按钮创建工具的第2步中选中“使用PayPal保存按钮”。 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. 然后,您应该在结果中获得两个选项卡:包含HTML按钮的网站和包含可粘贴到电子邮件中的简单链接的电子邮件。 You should be able to use the simple Email link in your application. 您应该可以在应用程序中使用简单的电子邮件链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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