Documentation

Intro

Disclaimer

We are constantly improving our script by adding new features and fixing bugs. Please keep the script updated and always use latest version. This documentation is related to actual version of the plugin, so don't forget to check it from time to time.
  • Initial release: July 16th, 2013
  • Latest update: June 11th, 2023
  • Version: 2.06

Back To Top

Requirements

Your server must match the following requirements. All modern servers already do it.
  • PHP version 5.5 or higher.
  • MySQL version 5.0 or higher.
Your WordPress-driven website and server must match the following requirements.
  • WordPress version 4.2 or higher.
  • PHP version 5.5 or higher.
  • MySQL version 5.0 or higher.

Back To Top

Installation

We created Wizard which helps to install script properly.
  1. Unpack downloaded archive and upload files to your server.
  2. Open it in your browser – Wizard will be launched automatically.
  3. Wizard ask for couple questions. Nothing special – MySQL parameters and admin credentials to access Admin Panel.
  4. Once finished, go to Dashboard and click “Green Downloads” box under “Installed Plugins” section. It activates the plugin.
  5. Once activated, plugin adds relevant item to Left Side Menu.
  6. Find "How To Use" submenu. It explains how to embed plugin into your website – nothing difficult, just paste couple JS/HTML-snippets.
Green Forms is a WordPress plugin and it is installed as regular WordPress plugin:
  1. Go to WordPress dashboard and click left side menu "Plugins >> Add New".
  2. Click "Upload" link and upload zip-archive downloaded from CodeCanyon.
  3. Activate uploaded plugin.
If you have any difficulties with uploading zip-archive, please do it manually using FTP:
  1. Use any FTP-client to connect your server.
  2. Unzip archive downloaded from CodeCanyon.
  3. Upload unzipped folder to plugins directory: /wp-content/plugins/
  4. Go to WordPress dashboard, click left side menu "Plugins" and activate uploaded plugin.
Once installed and activated, plugin creates "Green Downloads" menu section in left side menu. All further actions, related to plugin functionality, are done through this menu section.

Back To Top

Updates

Updating the script is a manual procedure. It's pretty simple. Don't worry.
  1. Download latest version of the script from CodeCanyon.
  2. Overwrite existing files on your server, except file /inc/config.php and folder /content/data/.
You won't lose data and settings. They are stored in MySQL database.
Updating the plugin is a manual procedure. It's pretty simple. Don't worry. Download latest version of the plugin from CodeCanyon and overwrite exiting files in folder /wp-content/plugins/halfdata-stripe-green-downloads/ by new ones. You won't lose data and settings. They are stored in MySQL database.

Back To Top

Migrating from version 1.xx

Migrating from old version (1.xx only!) is a manual procedure. It's pretty simple. Don't worry.
  1. Deactivate plugin "Stripe Instant Downloads" in admin Dashboard.
  2. Remove folder /content/plugins/stripe-instant-downloads/.
  3. Rename folder /content/data/sid-files/ into /content/data/green-downloads/.
  4. Install new version of the plugin.
  5. Check plugin settings and update payment settings.
Migrating from old version (1.xx only!) is a manual procedure. It's pretty simple. Don't worry.
  1. Deactivate and remove plugin "Stripe Instant Downloads" in WordPress Dashboard.
  2. Rename folder /wp-content/uploads/sid-files/ into /wp-content/uploads/green-downloads/.
  3. Install and activate new version of the plugin.
  4. Check plugin settings and update payment settings.

Back To Top

Configuring the plugin

Settings

Plugin settings are divided into several groups. You can reach them through left-side menu "Green Downloads >> Settings" and clicking relevant tab.

Payment Settings

Set of parameters in this section depends on type of the plugin.
PayPal Parameters
  • Email ID. Enter a valid PayPal email ID.
  • Sandbox. Use this option to test payments with PayPal sandbox account.
Stripe Parameters
First of all make sure that you created webhook with the URL provided by plugin for event checkout.session.completed in your Stripe Dashboard.
  • Publishable Key. Enter valid Publishable Key. Find it on API Keys page in Stripe Dashboard.
  • Secret Key. Enter valid Secret Key. Find it on API Keys page in Stripe Dashboard.
  • Signing secret. Enter a valid Signing secret for webhook that you created earlier. Find it on Webhooks page in Stripe Dashboard. Click webhook that you created earlier, and find "Signing secret" parameter.
WePay Parameters
  • Access Token. Enter valid Access Token. You can find Access Token on the "API Keys" tab of your app dashboard.
  • Account ID. Please enter valid Account ID. You can find Account ID on the "API Keys" tab of your app dashboard.

Mailing Settings

Configure mailing parameters if you would like plugin to send user and/or admin notifications in case of successful and cleared payments. This group of settings consists of 2 sections.
General Mailing Parameters
All email messages sent by plugin use the following parameters for "FROM:" header.
  • Sender Name. All messages from the plugin are sent using this name as "FROM:" header value.
  • Sender Email. All messages from the plugin are sent using this email address as "FROM:" header value.
User Notification
Plugin can send message about successful payment (and temporary download link) to email address associated with payer's account and provided by payment gateway (if available). This is global settings. You can override these parameters for each file.
  • Subject. In case of successful and cleared payment, your customers receive email message about successful payment. This is the subject field of the message.
  • Message. This email message is sent to your customers in case of successful and cleared payment. You can use the following keywords: {payer-email}, {product-title}, {product-price}, {product-currency}, {download-link}, {download-link-lifetime}.
Admin Notification
Plugin can send notification about successful payment (and temporary download link) to certain email addresses.
  • Recipient email. Enter email address. All alerts about completed payments are sent to this email address. You can set several comma-separated emails.
  • Subject. In case of successful and cleared payment, administrator receives email message about successful payment. This is the subject field of the message.
  • Message. This email message is sent to administrator in case of successful and cleared payment. You can use the following keywords: {payer-email}, {product-title}, {product-price}, {product-currency}, {download-link}, {download-link-lifetime}, {transaction-date}.

Button Settings

These group of parameters allows you configure native "Buy Now" button.
Button Labels
Configure button label for different button states.
  • Label. Enter button label. You can use the following keywords: {title}, {price}, {currency}.
  • Processing label. This label is used while plugin is getting confirmation from payment provider. You can use the following keywords: {title}, {price}, {currency}.
  • Download label. This label is used when payment successfully completed. You can use the following keywords: {title}, {price}, {currency}.
Button Style
Configure and preview button style.
  • Size. Configure button size: either fixed, or flexible.
  • Responsiveness. At what width of the container the button will be stretched to the container width.
  • Button text. Adjust the text style (font, color, size, etc.) of the button. You can do it for different button states (normal, hover, active).
  • Input background. Adjust the background style of the button. You can do it for different input states (normal, hover, active).
  • Input border. Adjust the border style of the button. You can do it for different input states (normal, hover, active).
  • Input shadow. Adjust the shadow style of the button. You can do it for different input states (normal, hover, active).

Amazon S3 Settings

You can host files in Amazon S3 buckets. Configure access to bucket in this section.
  • Access Key. Please enter Amazon Access Key. Ignore it, if you do not host files on Amazon S3.
  • Secret Key. Please enter Amazon Secret Key. Ignore it, if you do not host files on Amazon S3.
  • Bucket. Please enter Amazon S3 Bucket. Ignore it, if you do not host files on Amazon S3.

Miscellaneous Settings

General Parameters
  • Error messages. Enter error messages for different error states.
  • Download link lifetime. Set period of download link validity.
  • CSV column separator. Select CSV column separator.
Advanced Parameters
  • Cross-domain calls. Enable this option if you want to use cross-domain embedding, i.e. plugin installed on domain1, and button is used on domain2.
  • Enable X-Sendfile. Use this option to enable X-SendFile mode to download huge files. Please contact your hosting provider to make sure that mod_xsendfile module installed on your server. Do not activate this option if mod_xsendfile module is not installed.
  • Admin menu items. Show or hide menu item "Stats" in Left Side admin menu.

Back To Top

Adding a file

To start selling files your need add them to the plugin. Do it through Left Side menu "Green Downloads >> Add File". This is a pretty obvious workflow. When you open "Add file" page, you will be asked for several parameters.
  • Title. The title of the file. Put your own title or leave this field empty, then original file name will be the title.
  • Source. Source of the file. Plugin support following sources:
    • File. Files are located in protected (by .htaccess) folder on your server. You can upload files there using FTP or through plugin interface by clicking "Upload File" button.
    • Server Path. Absolute path (must begin with symbol "/") to the file on your server. It's your responsibility protect file against of direct access using URL.
    • Media Library. File from Media Library (available in WordPress plugin only.). This is NOT SECURE source. Everyone who knows direct URL can download file without payment.
    • URL. URL of the file that you want to sell. This is NOT SECURE source. Everyone who knows this URL can download file without payment.
    • Amazon S3. File located in certain bucket on Amazon S3 servers. Do not forget to set Amazon S3 parameters on Settings page.
  • Payment provider. Select payment provider to sell the file.
  • Price. Set the price of the file.
  • Custom User Notification. By default User Notification os configured on "Settings" page "Mailing" tab. If you want to customize email message, do it here.

Back To Top

File management

Manage files through Left Side menu "Green Downloads >> Files". This page contains full list of added files. The following actions are allowed for each file.
  • Edit. Edit the file record (for example, price or payment gateway).
  • Activate/Deactivate. When activated, the appropriate button is displayed, file can be purchased and downloaded. Othewise - file doesn't exist for visitors.
  • Transactions. View all transactions (and download links) related to this file. Whole list of transactions (for all files) is also available through Left Side menu "Green Downloads >> Transactions".
  • Export transactions into CSV. Download all transactions (and download links), related to this file, as CSV-file. CSV column separator is configured on Settings page.
  • Generate transaction. Generate new transaction and download link related to this file.
  • Statistics. View statistics related to this file (impressions, payments, downloads). Statistics for all files is also available through Left Side menu "Green Downloads >> Stats".
  • Reset statistics. Reset statistics related to this file (impressions, payments, downloads).
  • Download. Download the file.
  • Delete. Delete the file record (only record, not file).

Back To Top

Using the plugin

Using the plugin

  1. Read page "Green Downloads >> How To Use" in admin panel and perform the steps described there.
  2. Go to "Green Downloads >> Files" and pay attention to "Shortcode" column. Use shortcode to embed native payment button wherever you want.
  3. If you want to attach functionality to some existing link, button or menu item, click icon in Shortcode column, copy special URL and use it as a value of href attribute for link, button or menu item.
Go to "Green Downloads >> Files" and pay attention to "Shortcode" column. Use shortcode to embed native payment button wherever you want. For more options click icon in Shortcode column.

Back To Top