Just Get the Plugin

Gravity Forms is my go-to plugin for any form-related tasks on WordPress. It does everything.

Well, almost everything. Recently, I leveraged it to create an online signup form for Camas Swale Farm’s community-supported agriculture (CSA) program. If you aren’t familiar with CSAs, it’s a way for people to buy into a local farm. Their membership gets them a box of fresh produce every week. Camas Swale had been limited to a paper form, but Gravity Forms made it super easy to add a few options to an online signup and let users pay that way. It was perfect.

Abandoned Forms

Well, almost. They quickly got entries to the form, but only 3 of the first 7 actually paid. How come?

The Gravity Forms PayPal Standard Add-On processes payments offsite, at PayPal. Someone can submit a form, get sent to PayPal, but never actually pay, and Amber at Camas Swale had to follow up with everyone who did just that. Gravity Forms also doesn’t offer a way to have a user pick up where they left off. Instead, payment must be manually collected and the entry manually updated.

Exposing the PayPal URL

I decided to fix that. Sterner Stuff’s new plugin adds a new meta box to Gravity Forms form entries. If the form has a PayPal Standard feed attached and the entry payment is listed as “Processing”, this box pops up with a convenient URL to copy and complete payment. Couldn’t be easier. This is great for follow-ups and drip campaigns.

More to Come!

  • Add support for other gateways
  • Add an API endpoint for automation of drip campaign configuration

Have other ideas? Want to help? Feel free to submit a pull request to the Github repository! A huge thanks to Travis Lopes on the Gravity Forms team for adding docblocks and making sure this thing adheres to Gravity Forms’s Add-On standards!

10 Comments

  1. Guilamu on May 3, 2017 at 3:34 pm

    Hello Sterner,

    This plugin is a must own for anyone with a PayPal payment form.

    It’s a marvel, I can’t thank you enough for your work!

    A very nice feature would be to able to send a “notification” email containing the link and everything to finalize the payment with a single click.

    That special kind of notification would be designed in the notificaiton panel of gravity forms.

    What do you think?

    • Ethan Clevenger on May 4, 2017 at 7:08 pm

      Thanks for the kind words!

      The plugin actually includes a merge tag that can be used in any of Gravity Forms’s built-in notifications or confirmation emails. If you have the plugin installed alongside the GF PayPal Standard plugin, you should actually see it in the merge tags dropdown while composing new notifications or confirmations!

      • Guilamu on May 5, 2017 at 8:25 am

        That’s excellent news! I just need to find a way to schedule those notifications and it would be perfect.

        Thank you again, Ethan!

      • Michael on July 27, 2017 at 10:48 am

        Love this plugin, but can’t get it to be inserted into a notification without the link breaking, meaning only HALF of the link is active – forcing the user to try and copy/paste for it to work :-(.

        Is there a fix?

        • Michael on July 27, 2017 at 10:51 am

          ps.
          I have tried with “Disable auto-formatting” on and off

        • Ethan Clevenger on July 27, 2017 at 10:54 am

          Hey Michael,

          Sounds odd. Can you forward me an example of the email you’re getting with the broken link? Send it to “ethan” at this site’s domain.

  2. Guilamu on May 3, 2017 at 3:43 pm

    One more thing while I’m at it, if the notification thing I just suggested was to work, it would be awesome to be able to send it automatically after a certain amount of time.

    Thanks again!

  3. Fredrik Sundlöf on January 29, 2018 at 7:02 am

    Hi, great snippet!
    I have the same problem with forms that gets submitted entries but not payed for. Do you have any idea on how to remove these entries, say, after 3 days if they are not payed for. And maybe automatically send a reminder email?

    Please point me in the right direction on how to accomplish this and I will send you the code for you to use, maybe in a snippet in the future!

    Thanks
    Fredrik Sundlöf

    • Ethan Clevenger on January 29, 2018 at 12:02 pm

      Hey Fredrik,

      I can’t speak for removing the entries.

      What you’ve described for automatic reminder emails sounds a lot like a drip campaign. I would Google around for a Gravity Forms drip campaign plugin (there are a few, I think), and then get creative with hooks to only send on unpaid submissions. For the conditional, you’ll need both the form and entry objects. If you set this up properly as a GF add-on, you can do:

      if ( $this->has_processing_payment($form, $entry) ) {

      and…


      public function has_processing_payment($form, $entry) {
      $payment_status = apply_filters( 'gform_payment_status', $entry['payment_status'], $form, $entry );
      // If active feeds were found and payment status is processing, display meta box.
      return ( $this->gateway->get_active_feeds( $form['id'] ) && 'Paid' !== $payment_status );
      }

      And `gateway` is a property of any class that extends GFAddOn.

      Hopefully that gets you started in the right direction!

  4. qmintek on October 11, 2019 at 4:17 am

    Hi, how can I get the link from GFPayPal::redirect_url(): Sending to PayPal? I want to save it to entry meta.

Leave a Comment