Troubleshooting the WordPress Printable Gift Certificates Plugin

So, this plugin has been fairly handy, but I ran into some trouble getting it going and couldn’t find much help on the web. So I figure I’ll write down what I had to do here, in case someone else runs into trouble. I can’t even remember all of the things I had to tweak over time (this was a very drawn-out project) but I figured I’d note the big ones here, and if you or I run into others we can share them here as well.

– You probably need to enable Paypal’s IPN for this to work. From the merchant account in Paypal, click the profile tab, then click the payments option, and choose IPN settings. Enable IPN and set the listener URL to the URL of your WordPress installation.

– In my case, we then had to deal with Internal Server Errors on the listener. I still don’t know why that was, but the site worked fine on other servers. I had the host move from FreeBSD to a linux server, and it worked well after that.

– Disable the built-in CSS so you can make the buttons as you’d like them, then go back and add in your own CSS plus whatever you deem necessary from their CSS to make the site look fine.

– Form Fields won’t line up in IE:
The form page was showing up in quirks mode; if I used the Developer Tools to display in strict mode, it worked fine. As it turns out, there were some hidden input fields above the DTD. IE didn’t know how to deal with this, so into quirks mode it went. I talked to my super wordpress guru friend, Tyrel, and he pointed out that wpnonce was echoing rather than returning. So I had to change wpgft_processOrder.php like so, from:

if( function_exists(‘wp_nonce_field’) ) $post_content .= wp_nonce_field($nonceID);

to

if( function_exists(‘wp_nonce_field’) ) $post_content .= wp_nonce_field($nonceID,’_wpnonce’,true,false);

Currently, I’m trying to see whether I can find a way to display gift certificate information such as the name of the gift, rather than its purchase cost, on the printable emailed certificate. I’ll share details there once I have them.

20 Comments

    1. velda

      Hey there, I’m still working on making the email look lovely and say the things I want, but overall it’s working alright. Just not quite as I expected it to right out of the box. What trouble are you currently running into?

      Like

    2. velda

      Okay, I’ve got it working just so now. Finally 🙂 I’ll update the article with what I’ve learned, but in the meantime if you have specific questions, let me know.

      Like

    1. velda

      Hi Peter,

      Yes, I did get the wp-gift-cert email printing up the way I wanted it to, with a description and a neatly formatted HTML message, but I had to edit the files directly.

      Like

    1. velda

      Interesting, I’d tried that URL and didn’t have much luck, but that was when I was on the BSD server. By the time I’d switched over to Linux I was using just the installation URL and it was fine. Glad you got it working!

      Like

  1. Paulo Pinto

    Guys I’m having trouble getting the IPN to work. The transaction goes through but no IPN is received by the plugin so the gift cert is not delivered. I have tried different combinations: wordpress install root and also pointing to wpgft_ipnHandler.php but no success

    Any help is appreciated.
    Thanks

    Like

  2. Christian Naccour

    what do u mean the wordpress instalation url?

    I am being able to buy a gift card, and the payment is going through, but no certificate email is being sent to the buyer, which means he buys pays and gets a confirmation from paypal but not from my website! and the IPN isnt working??? i pointed it to my http://mydomain.com//wp-content/plugins/wp-gift-cert/wpgft_ipnHandler.php

    and i can see it in the ipn history on paypal but not in the plugin could u pls advise 😦

    Like

  3. Alex

    Hi,

    My certificates are not arriving by email now, everything was working perfectly. But I think since I made a couple of upgrades to wordpress, one of them might have broke the mecanism of sending the certificate by email. I am not sure exactly when it started having problems, a client who bought one let me know two weeks ago. I can see the transactions reflecting on paypal and on the plugin transactions sold certificate section, but the email not arriving. I try resending and also never arrives. If anyone gets the solution to this, let us know. Thanks!

    Like

  4. Captain G

    This plugin works?
    WP 3.5.1
    Plugin version 1.1.1

    VELDA, you mentioned the IPN should be the site url ? ok, tried that.

    This would be nice if this worked.
    PayPal gets the xaction, no cert ever gets mailed to the purchaser.
    The money part works, the certificate getting mailed doesn’t.
    DB says ‘No certificates have been sold’
    Website using email wp_mail, phpmail, no problems.
    Tried changing the smtp params.. no joy..

    Hard to believe that 3 yrs later, people are still interested in this.

    If there are any recommendations for a replacement, count me in.
    Thanks
    CaptG

    Like

  5. Velda

    Hi CaptG; no replacements to recommend (not any I can recommend anyway; I haven’t used anything like this since then), and not so many updates either so far as I can tell. Maybe someone should fork it?

    I’ve just had the one client using it, and yes it did take quite a bit of work to make it just so. I can say if you’re not seeing the purchase in the admin area, you’ve definitely got some sort of misconfiguration.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s