Sell & Deliver Digital Downloads with Gravity Forms

If you already own a copy of Gravity Forms and your needs are simple, you can use Gravity Forms plus one or two other free plugins to sell and securely deliver digital files, using Amazon S3.

Here’s what you’ll need:

  1. The files you want to deliver
  2. Gravity Forms
  3. A Gravity Forms payment add-on: Stripe, PayPal, Authorize.net, etc.
  4. An Amazon S3 account
  5. A method for uploading your files to Amazon S3
  6. A method for controlling access to the files

Assuming you already have Gravity Forms and a payment add-on installed and setup, and you’ve created an Amazon S3 account, IAM user, and bucket, let’s walk through it!

  1. Upload your files to an Amazon S3 bucket, keeping the default to private. You can either do this directly or use a plugin that will automatically send any media file you upload to WordPress to Amazon S3. Here are a few plugins I found from a quick search:

    http://wordpress.org/plugins/amazon-s3-uploads
    http://wordpress.org/plugins/wp-s3/
    http://wordpress.org/plugins/amazon-s3-and-cloudfront
    http://wordpress.org/plugins/aws-for-wp/

    sell-deliver-digital-content-s3-bucket
  2. Install the free Expiring Amazon S3 Links by Fat Panda WordPress plugin for controlling access to your files. Be sure to add your AWS Access Key ID and Secret Access Key to your wp-config.php file (replacing the stars below with your account information:

    define( 'FPEAS3_AWS_S3_ACCESS_ID', '***************' );
    define( 'FPEAS3_AWS_S3_SECRET', '***************' );



    If you’re serving videos specifically, you might try these plugins:

    http://wordpress.org/plugins/s3-video/
    http://wordpress.org/plugins/smarts3/

  3.  Create your Gravity Forms payment form

    sell-deliver-digital-content-form

  4. In the Gravity Forms ‘Confirmation’ (or User Notification) for your form, enter the shortcode to link to your file:

    [s3 bucket="your-S3-bucket" path="/path/to/file" expires="60"]Download![/s3]

    It’s worth noting that the path to your file is relative to your bucket. So if your bucket name is ‘my-bucket’ and you’ve uploaded your file into a folder called ‘purchases’, the path will be ‘/purchases/file-name’. Also, the expires attribute is in minutes, with the default being 5 minutes and you would change it to 120 minutes if you wanted the link to be accessible for two hours.

    sell-deliver-digital-content-confirmation-setup

Here’s an example of a form submission confirmation with a download link for a PDF file: sell-deliver-digital-content-confirmation

Here’s the delivered file: sell-deliver-digital-content-file

And here is the result of someone trying to use a link after it expires: sell-deliver-digital-content-expired-link

Enjoy! 🙂

Questions? Email Me