Have button link directly to particular paypal page

Support Area Forums Progress Have button link directly to particular paypal page

This topic contains 7 replies, has 2 voices, and was last updated by  Bill Robbins 3 years, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
URL to the page in question: http://bacheinfo.org/wordpress
  • Author
    Posts
  • #18833

    Jenn Guitart
    Participant

    Hi Bill!

    I would like the donate buttons on our site to link to a paypal page that is somehow a sub-page of our fiscal sponsor’s page. The fiscal sponsor has said to use some code (see below) which generates a paypal button that takes me to a paypal page that would mark the donation as for our particular project. But I have a few problems with it:

    Problem 1: I don’t want users to click donate and then go to a page where they have to click donate again, so people donating don’t have a chance to change their minds. I could create a “donate” page, but I want to somehow put the code directly into the buttons — but I don’t know which parts of the code to put in, or where to put it.

    Problem 2: I don’t like the ugly paypal button — I want to use the two buttons that I already have on the site (the one on the front page, and the one I generated using a “buttons” plugin), and have those link directly to the paypal donation page.

    I can’t just put in the paypal email address, because the donation would then go, undifferentiated, to our fiscal sponsor, and our project would never see the money. Unless there is some way to mark the donation as specifically for our project.

    Thank you & best wishes!

    Jenn

    Here’s the code the fiscal sponsor sent me…

    <form action=”https://www.paypal.com/cgi-bin/webscr” method=”post” target=”_top”>

    <input type=”hidden” name=”cmd” value=”_s-xclick”>

    <input type=”hidden” name=”encrypted” value=”—–BEGIN PKCS7—–MIIHdwYJKoZIhvcNAQcEoIIHaDCCB2QCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBZ+LOkCAP+hoVr72wM1rBw8y8DkreBzytzT/+2+xGdJJeftxgkzFdjF15/599XcFcZX+dVHGGRuCZgusCjap9eGRrFGUP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05JZvvUZOLNCCkYcI54pTC5E/oWAqK6I6zwbV8Jlj8739GU2HQWpvElbvw==—–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!”>

    </form>

    #18841

    Bill Robbins
    Moderator

    Hello Jenn,

    Great question. We can change the donation button so that it takes people directly to your page. Here’s what you’ll want to do:

    1. Go to the Appearance section in your WordPress control panel and select Edit.
    2. From the list of files on your right, choose donation-bar.php
    3. Replace everything there with this:


      Be sure to copy the code from the support site directly and not the notification email.

    4. Save your changes.

    One caveat. As I was testing this, I received an error message from PayPal saying they were unable to decrypt the certificate ID. I think there may be something wrong with how part of that code has been transmitted around. I had to replace all the curly quotes with straight quotes in the code. It’s possible something has also changed in this section:

    
    —–BEGIN
    		PKCS7—–MIIHdwYJKoZIhvcNAQcEoIIHaDCCB2QCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBZ+LOkCAP+hoVr72wM1rBw8y8DkreBzytzT/+2+xGdJJeftxgkzFdjF15/599XcFcZX+dVHGGRuCZgusCjap9eGRrFGUP0KtbmAB2qAPx5nhgwk2e1BDkgzxJyZw9ROZvcs44iVWMWAXHyvWCb+hZW9BYO9oYuVap4KqoHKTPvCzELMAkGBSsOAwIaBQAwgfQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIKb0VZVH3k76AgdDV/69Ark8yCnIlHZgSvJWvvl8tDnblPGkmYomSO35P/+MUUASXRmuWBwunukjAxO+12R5vYM8HzaUhA3i2IuGAlofU6KY5J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VQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKn
    		nLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTQwNDEwMTkzMDI3WjAjBgkqhkiG9w0BCQQxFgQUTTCDO8ogLTg8wNXCLiVwGCvkXlwwDQYJKoZIhvcNAQEBBQAEgYAU2/t+JtjWUj0mtIrd3VXhyl/zngeMZLhCjJ3BZokFwjde2iwyasD1OWo9uSaUN1pJOQlJ/Ydz4TBrO+cFgl2Ro5H46EE/CApiwJYv+x90SEsyLAWV05JZvvUZOLNCCkYcI54pTC5E/oWAqK6I6zwbV8Jlj8739GU2HQWpvElbvw==—–END PKCS7—–
    

    I would double check that portion. If possible copy that directly from PayPal and replace that section in the snippet I posted with theirs.

    I think that should do it for you. If you have any trouble, let me know.

    Thanks,
    Bill

    #18879

    Jenn Guitart
    Participant

    Thank you so much, Bill — that totally worked! Yippee!!

    I was wondering if you could also help me figure out also where to put the code for the button that I have on the subpages. (the “Donate Now” button you see on this page:
    http://bacheinfo.org/wordpress/?page_id=72 )

    (I created the button using MaxButtons.)

    Thank you!!
    Jenn

    #18882

    Bill Robbins
    Moderator

    Jenn,

    You should be able to do that. The easiest option would be to add it via a text widget. Just enter this into the widget:


    Copy the code from the support site instead of the notification email.

    and that should give you a donation button that goes directly to the PayPal account like the last one. It still has the old certificate code so you’ll have to update that, but that should do it.

    If you need to add it to the body of a page or post you can. The only catch is you’ll need to add it using the text editor instead of the visual one (there is a tab at the top of the main content box when you’re writing a page). Make sure not to switch back to the visual editor while working on that page or the code will get stripped out.

    Let me know if you need any help.

    Thanks,
    Bill

    #18886

    Jenn Guitart
    Participant

    Thank you, Bill!

    I was able to add a button using a text widget, and the link works great, but I couldn’t figure out how to get the button to look like the maxbutton that I had made. I tried pasting the maxbutton code into my stylesheet and changing where it said class=”button” to class=”maxbutton-1″ which I thought might work, but it didn’t. If you look at the page I now have one text widget that has the maxbutton and another text widget that has the regular button. Honestly, I don’t really care if the button looks exactly like the maxbutton, but I just need it to be really big and bright, and am not sure how to do that.

    Here’s the link… http://bacheinfo.org/wordpress/?page_id=72

    Thank you so much!
    Jenn

    #18888

    Bill Robbins
    Moderator

    That was good thinking. It looks like those styles were tied to a link instead of a form input. Let’s try this:

    
    <style type="text/css">
    
    	 input.button { text-decoration: none !important; color: #f7f7f7 !important; font-family: Arial !important; font-size: 26px !important; font-style: normal !important; font-weight: bold !important; padding-top: 15px !important; padding-right: 25px !important; padding-bottom: 15px !important; padding-left: 25px !important; background-color: #f7ae03 !important; background: linear-gradient(rgba(247, 174, 3, 1) 45%, rgba(255, 204, 0, 1)); background: -moz-linear-gradient(rgba(247, 174, 3, 1) 45%, rgba(255, 204, 0, 1)); background: -o-linear-gradient(rgba(247, 174, 3, 1) 45%, rgba(255, 204, 0, 1)); background: -webkit-gradient(linear, left top, left bottom, color-stop(.45, rgba(247, 174, 3, 1)), color-stop(1, rgba(255, 204, 0, 1))); border-style: solid !important; border-width: 1px !important; border-color: #618926 !important; border-radius: 20px !important; -moz-border-radius: 20px !important; -webkit-border-radius: 20px !important; text-shadow: -1px -1px 0px #527024 !important; box-shadow: 0px 0px 2px #333333 !important; -pie-background: linear-gradient(rgba(247, 174, 3, 1) 45%, rgba(255, 204, 0, 1)); position: relative !important; behavior: url("http://bacheinfo.org/wordpress/wp-content/plugins/maxbuttons/pie/PIE.htc"); }
    	  
    </style>
    

    Try adding to that to the text widget along with the code from earlier.

    #18900

    Jenn Guitart
    Participant

    It worked. You da bomb. I swear, when the code works, I get a rush of oxytocin. I can see the appeal of being a programmer!

    Thank you!!!

    #18901

    Bill Robbins
    Moderator

    Now that’s funny 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Have button link directly to particular paypal page’ is closed to new replies.