Have button link directly to particular paypal page

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

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

    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!


    Here’s the code the fiscal sponsor sent me…

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

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



    <input type=”image” src=”https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif&#8221; border=”0″ name=”submit” alt=”PayPal – The safer, easier way to pay online!”>


    Bill Robbins

    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:


    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.


    Jenn Guitart

    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!!

    Bill Robbins


    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.


    Jenn Guitart

    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!

    Bill Robbins

    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"); }

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

    Jenn Guitart

    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!!!

    Bill Robbins

    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.