Download Manager Documentation

Overview

Configuration

PayPal Configuration

Adding Packages

The Order Process

Overview

php Download Manager allows you to easily set up a download system for soft goods that are purchased from your website. A customer adds items to their shopping cart and then pays for the order via PayPal. The payment gateway sends back a message to the download manager. The download manager checks to see if this is a new customer (based on email address). If it is a new customer then a new member is created and the customer is sent the new member email. The download manager then checks each item ordered to see if the member (customer) had previously ordered that item and if so, it updates the item with a new expiration date based on the amount of time that was previously left on the item. If the item ordered is marked as auto-activate then the order email will contain information about that product. Once all the items are processed an order email is sent to the customer with information specific to each product that was ordered. Any items that may have been fraudulent are marked in the database for later review. Any item that requires manual activation is also marked in the database for review. Download Manager is not a shopping cart. You must have your own shopping cart or use the PayPal shopping cart or Buy-It-Now buttons.

Configuration

Configuring the Download Manager is easy. There are three parts:

  1. Edit the Connections/DownloadMan.php file with your database configuration information
  2. Edit the Configuration settings from with the Download Manager admin control panel
  3. Edit the Paypal IPN configuration at Paypal.com or in your Shopping Cart.

Once you have completed the installation you must edit the Connections/DownloadMan.php file with the proper database configuration information. This includes the MySQL server host name (usually localhost or 127.0.0.1), your database name, your database user name and your database user password.

The next step is to configure the settings in the Download Manager admin control panel. The settings that you must configure are:

  1. Company Name - The company name will appear in the title area of the Download Manager member's area and can be used as a variable (%%COMPANYNAME%%) in emails sent to members.
  2. Company Email Address - This is the email address that is used to send all correspondance. It is also the email address used to send Paypal IPN debugging information via email. This can also be used as a variable (%%COMPANYEMAIL%%) in emails sent to members.
  3. Language - This selects the language file to use.
  4. Currency - This is the currency you use from paypal. All transactions must be done in this currency.
  5. Paypal Email Address - This is the email address that paypal lists as the receiver. If the Paypal email address does not match the information posted from Paypal then the transaction will be treated as a fraudulent transaction.
  6. Transaction Email Address - This is the email address used by the Download Manager to send notification emails.
  7. Order Email Subject - This is the subject line sent to customers when they place an order.
  8. Order Email Message - This is the message body of the email sent to customers when they place an order. Each individual package that is purchased can append text to this message.
  9. HTML Emails - Set this if you want all emails to use html headers (which allows you to put html tags in the body of the email).
  10. New Member Subject - This is the subject line of the email message sent to new members. A new member is a customer that has just purchased their first item through the Download Manager.
  11. New Member Welcome Message - This is the message body of the email message sent to new members.
  12. Auto Activate Clients - If this is checked then all orders are immediately processed and emails are sent to the customers. They can download immediately. If this is not checked then you must manually approve each order.
  13. Suspend on Price Mismatch - If this is set then any order that is lower than the amount listed in the package is suspended. This helps prevent fraudulent orders when you have Auto Activate enabled. You can not use this if you use a coupon system since the coupon price will be lower than your normal price configured for the package.
  14. Send Email on Fraud Attempts - If checked the system will send an email to the Transaction Email Address with the order detail. All fraudulent orders are recorded and not processed.
  15. Debug Mode - Checking this will send an email at every step of the Paypal IPN process. This should only be used if you are having problems with your orders and are working with support to fix the problem.
  16. Download Path - Set this to the full path of your download directory. This is the directory where you rftp your files that are part of packages ready for download. This path does not need to be in your web directory.
  17. Cart Data Files - This setting is experimental and not yet fully functional. It is designed to allow other payment methods such as authorize.net

Paypal Configuration

The Download Manager uses the Paypal IPN interface to be notified of completed orders. Type typical IPN URL would be http://www.yourdomain.com/downloadmanager/paypal_ipn.php. There are two ways to tell Paypal where to send the IPN information.

  1. You can configure the Paypal IPN to be sent to a specific URL for every transaction that goes through your Paypal account. You should use this if you only have one website and all of your orders need to go through the Download Manager. If an order goes through the Download Manager and the package is not in the database it will be ignored.
  2. You can configure an individual order to send the Paypal IPN to be sent to a specific URL by modifying the Paypal Buy It Now button or modifying the Paypal Shopping Cart button. If you use a shopping cart system then that system must be able to pass the IPN url to paypal.

Adding Packages

Adding packages takes 3 easy steps:

  1. Upload via FTP all the files that you want to make available for instant download. You can put these files into directories and subdirectories as long as all files and directories are in the download directory specified in the Download Manager configuration.
  2. Add a package from the Download Manager's admin control panel.
  3. Add files to the package from the Download Manager's admin control panel.

Once you have built a package it is ready for download.

The Order Process

Packages:

Any item that you want to provide to customers as an automatic download must be entered into the download manager as a package. A package can have one or more files associated with it. A file can be associated with one or more packages. When you set up a package you determine how long the package will be available for downloads after the purchase (or after approval for pending orders). You also determine if that package will be automatically active (ready for download immediately after order) or if the package will go into a pending state that requires manual approval. Each package can have text associated with it that will be appended to the order email. The text is processed for the following tags:

%%EXPIRES%% - This is the date the package will no longer be available for download.

%%PACKAGE%% - This is the name of the package.

Ordering:

When a customer orders items and then pays for the item, the payment gateway sends back a message to the download manager with the customer information and all of the items that were ordered. The download manager creates a new customer account if required and then sets up a download record for each item. If the item is marked as "auto activate" in the database then it is ready for download immediately. When the download manager is finished processing the order an order email will be sent to the customer for all active packages.

 

Downloading:

Once the order email is received the customer can log into the download manager and view all of the packages that are available for download along with the time the download will expire. The customer can then click on one of the packages to view the files associated with that package. The customer can then click on each of the files to download them. There are no restrictions to the number of times that the customer can download the files.

 

Pending Orders

If a package is not marked as "auto activate" in the database then when the order is completed the order email will not contain any information about that particular package. Pending orders must be manually approved by the administrator. Once the pending order is approved, another order email goes to the customer with the informtion about that package.

 

Price Mismatches

If "suspend on price mismatch" is checked in the download manager configuration then when the order is processed each item is checked to see if the price that was paid is the same as the price in the database. If the price is different then that item is "suspended" and must be manually processed. All other items will be processed as usual. Note that if you use a coupon system to lower the price of an item you can't use the Price Mismatch system or it will suspend all orders that use a coupon.