slscart logo

Secure Digital Download Add-on

Help on setting up and using the secure digital download program (SDD) add-on. SDD uses DropBox to manage its secure downloads.

Contents

FAQ

Q: I also had a question about with the digital downloads, so in mals-e, or elsewhere in the digital software, do those have to have the prices updated when they are changed (the prices updated in the software settings too?) in order for it to match it back to the product for download?
A: No. Once a person makes a sdd purchase, the link they are sent is to dropbox. The link does not contain any pricing information.

Q: What type of picture can I use to represent the digital download?
A: Any picture you want. It is independent of the download.

Q: If I change the prices on the website, will the person still get their download?
A: Yes. They will get the download for the price they paid.

Q: The downloadable file won't download when the link is clicked on.
A: There are many reasons why:
  - Determine if it is just one download or all downloads.
  - The Dropbox Path entered in does not match the filename in dropbox file list.
  - The filename in the dropbox file list has a leading blank in front of the name.
  - The file does not exist in Dropbox.

Customer Usage

It is assumed that install and product setup steps have been completed. This section describes how a customer orders and receives a digital download product from slscart.

Ordering

After the digital download order is complete, the customer will be taken to the return page (the one specified in $DownloadTemplate). The link can be clicked to download the product. An email is also sent to the user where they can click on a link to download the ordered product. The download link expires in the time specified in column F of the product_list.

If the product is downloaded, a notification email is sent to the $NotifyDownloadEmail email.

Errors that could occur

There are errors that can occur during ordering, mostly due to incorrect setup. The error messages and the corresponding reasons are given:

Access Denied
Incorrect Mals hash key.
Call Denied
The buyer will see this if the path (in Column D in csv file) is incorrect or dropbox is not working.
Caller Access Denied
There is a syntax error in the csv file.
The wrong location entered for dropbox file (e.g. missing or incorrect directory).
The Mals secret key is incorrect.
Price of product is less than the minimum price level.
The buyer will see this after purchase: Amount paid for products is not sufficient.
The codes, like !!!product!!!, are not converted
Not linked to linklokmeret.php in Mals: Cart setup > Customize > Return link
Missing csv file.
Incorrect catalog# entered in csv file.
!!!product!!! is not converted
Make sure the catalog number exists
Make sure the 'Show Catalog#' in Catalog Setup is set to 'Always Show' or 'Cart Only'
Order Failed
Incorrect $SellerID.

Create a Digital Download Product

It is assumed that install step has been performed. This section describes how to set up a digital download product in slscart.

Product Setup

A product needs a catalog number to work with SDD. If you do not like the catalog number showing, displaying it can be turned off under Administration > Catalog Setup. In the Items section there is a setting called Show Catalog#:

Click here for more information on using the catalog number.

slscart 10.4.1 or later

SDD is much easier to use.

1. Open your Dropbox account in a browser.

2. Upload your downloadable file(s) to your dropbox.

3. Create your product in slscart store admin. The product must have a catalog id. It does not have to be all digits; it can have upper and lowercase alphabet in it, too (e.g. STE135).

4. In the Secure Digital Download section of the product:

Here is what the short description and dropbox path entries look like for a product in store admin:

SDD short description and dropbox path

5. Save changes.

Error codes

These sdd-specific error codes can occur during updating a product.

Notes

If the file (example: mydownload.jpg) is put in dropbox then location/filename is mydownload.jpg
If the file is put in a dropbox directory (example: posters) then the location/filename is posters/mydownload.jpg
If the file is put in a subdirectory (example: posters/current) then the use posters/current/mydownload.jpg

Keeping files in Dropbox folders

If there are a lot of downloadable files, it is easier to keep them in folders.

1. Open your Dropbox account in a browser.

2. Create a folder by clicking on 'New folder' and entering in a name for it (in this example, the new folder is 'misc' (no quotes).

3. Copy the download files into the 'misc' directory. (in this example the file is 'ccubsflag.jpg'.

4. Create your product in slscart store admin. The product must have a catalog id. It does not have to be all digits; it can have upper and lowercase alphabet in it, too (e.g. STE135).

5. In the Secure Digital Download section of the product:

Here is what the short description and dropbox path using a folder look like for a product in store admin:

SDD short description and dropbox path using a folder

6. Save changes.

slscart 10.4.0 or lower

1. Open your dropbox account in a browser.

2. Upload your downloadable file(s) to your dropbox.

3. Create your product in slscart. The product must have a catalog id. It does not have to be all digits; it can have upper and lowercase alphabet in it, too (e.g. STE135).

4. Open a new spreadsheet. If you don't have Excel or LibreOffice, see Notes below.

If you have Microsoft Excel spreadsheet or LibreOffice calc open a new worksheet. We'll call it product_list

If you do not have a spreadsheet, open a new file in a simple text editor like NotePad (do not use Microsoft Word). See Notes.

5. Add the products to the spreadsheet. One product per row.

SDD sample product worksheet

6. Save the spreadsheet. Use the name product_list Note this must match what was specified in install $ProductCSV.

In Excel use Save As and save as type: CSV (MS DOS)

In LibreOffice, use Save As, select Text CSV

In NotePad, save as product_list.csv

The file saved should be named product_list.csv

7. Upload product_list.csv to the random directory created during install (X3CgJt2DNbgPgR in our example) on the server. Now there is a file called product_list.csv in directory X3CgJt2DNbgPgR Note this must match what was specified in $ProductCSV

Notes

Column C: The minimum price level for DDP. This is intended to reduce fraud. If the price of the product is below this level (i.e. someone changed it), DDP will not process the order. If you sell a product for $9.99, you can set the minimum level to 9.99 or 9 or whatever you choose. C0 is C Zero. You can add C1=, C2=, etc if there are options (explained later)

Column D: The path to the product in dropbox. For example, for a product in dropbox called abc.jpg, the path would be:  db|/abc.jpg
A product, def.jpg, in a folder called rtu the path would be:  db|/rtu/def.jpg
db|/  is interpreted as the root of dropbox.

No spreadsheet? - A csv file can be created or edited with a simple text editor like NotePad. (NOT Microsoft Word).

Here is what the product_list.csv file looks like:

IH5DG,5 dollar gold piece,C0=300.00,db|/prod1.zip,0,700
EYEPOKE8, Moe Picture,C0=5.00,db|/stooges/moe.jpg,0,60
ELFF01,Enjoy Life Flag,C0=13.00,db|/prod2.zip,0,60

Adding products to an existing

1. Open your dropbox account in a browser.

2. Upload your downloadable file(s) to your dropbox.

3.  Create your product in slscart. The product must have a catalog id. It does not have to be all digits; it can have upper and lowercase alphabet in it, too (e.g. STE135).

4. Open the existing spreadsheet. If you don't have Excel or LibreOffice, see Notes below.

If you have Microsoft Excel spreadsheet or LibreOffice calc open the existing worksheet product_list.csv

If you do not have a spreadsheet, open it in a simple text editor like NotePad (do not use Microsoft Word). See Notes.

5. Add/delete/change the products in the spreadsheet. One product per row.

SDD sample product worksheet

6. Save the spreadsheet. Use the name product_list Note this must match what was specified in install $ProductCSV.

In Excel use Save As and save as type: CSV (MS DOS)

In LibreOffice, use Save As, select Text CSV

The file saved should be named product_list.csv

7. Upload product_list.csv to the random directory created during install (X3CgJt2DNbgPgR in our example) on the server. Now there is a file called product_list.csv in directory X3CgJt2DNbgPgR Note this must match what was specified in $ProductCSV

Customizing the Return Page

Customizing the return page is mentioned here. The return page was created during install.

Install SDD

In order to have a secure digital download for your store, the store will need to have a valid SSL certificate (not self-signed).

We highly recommend using dropbox to store digital download assets. 2 GB storage for the free version. Click here to go to dropbox

Mandatory Information needed

Optional information needed

Install Digital Download

The sdd files to copied to home directory from are in the slc_addons/sdd directory.

slscart setup

  1. copy linklokme.php and linklokmeret.php to slscart root dir
  2. copy dropbox-sdk folder to root dir (not necessary for linklokme 2.8 and beyond)
  3. create a random, hard to remember directory (like RQGeQyMv72HWOZ) in root directory. This is where the product list file is kept.
  4. Run add-on installer for secure digital download
  5. In store admin Administration > Catalog Setup
    1. enter the random directory under Dir:
    2. enter product list filename (use product_list.csv)
    3. Enter in link timeout, in minutes (1440 = 1 day)
    4. Save changes
  6. create order return page in 'pages'. This will be entered on $DownloadTemplate.
  7. [opt] set up SMTP

Mals setup

Dropbox setup

Upload product to dropbox

Set up as an app in dropbox developers

linklokme.php setup

This requires editing the linklokme.php file.

* path to product list
$ProductCSV = "X3CgJt2DNbgPgR/product_list.csv";       this must match the random directory created in slscart setup step 3

// Setup admin and security variables
$LinklokURL = "https://www.mydomain.com/linklokme.php"; // URL of the linklokme.php page on your site
$SellerID = "ABC12345";                       // mals-e seller id (username)
$SellerCompany = "My Company, Inc";           // Your company name
$SellerEmail = "abc@mydomain.com";            // Your email address for order enquiries
$SellerURL = "https://www.mydomain.com/";     // Your website URL
$LinkKey = "lime122juice";                    // Encryption key for download links. Any random word.
$SecretKey="125e7323232339479c5e31b050c";     // Mals Secret key
$CopyEmail = "";                              // Receive copy of order emails. email address or ""
$ManualPassword = "";                         // Password for manual order entry. "" to disable

$HTMLEmail = "Y"; // Set to Y to use HTML formatted emails or N to send in plain-text

$ErrorEmail = ''; // any error that occurs, an email is sent here.

$NotifyDownloadEmail = ""; // notify for every download

// Setup optional template pages
//$EmailTemplate = "linklok_email_template.html";
$EmailTemplate = "";
$ErrorTemplate = "";
$WarningTemplate = "";
$WarningTemplatePage= "";
//$DownloadTemplate = "";
$DownloadTemplate = "https://www.example.com/pages/sdd_return.php";

// Optional security settings
$IPlock=0; // To enable set to 1 to 4. To disable set to 0 (default).
$OrderList=""; // Points to a list of completed transactions or extra security
$DelayCheck = "N"; // Set to Y to delay Check or (other payment methods) listed below.
$DelayFreeEmail = "Y"; // Set to Y to delay orders using free email services listed below

// OptionCart settings
$SiteBuilder="Y";
$SiteBuilderUseId="Y";
$SiteBuilderUseOptions="N";
$RemoteCallPassThru = "https://www.example.com/go/finish.php";

// use dropbox
$dropboxaccessToken="v70LVfxp2-AAAAAAAAAAGAiCG";
require_once "dropbox-sdk/Dropbox/autoload.php";
use \Dropbox as dbx;
$dbxClient = new dbx\Client($dropboxaccessToken, "DDP Downloads SLS");

slscart store admin setup

For slscart 10.4.1 or later

Under Administration > Catalog Setup > Secure Digital Download section, enter in the following:

Random Dir: Enter the random hard to remember directory created previously

Filename: Enter the csv filename. Default is product_list.csv

Link Expiration: Enter in the number of minutes before the download link expires. Default is 1440 (1 day). The countdown starts just after the download product's order is completed.

Create a return page

The return page is where the customer will end up after a digital download purchase.

In store admin, create a new page called ddp_return (you can call it something else).
Turn off 'show link'

In Content: fill in your message for customers after they complete an order. Change My Company to your company's name and mydomain to your store's domain.

Thank you for your order. For reference your order number is !!!orderno!!!.

Please use the links below to download your purchase.

!!!product!!!

If you have any questions regarding this order please contact us.

My Company
https://www.example.com/
support@example.com

There are many special entries that can be used that are automatically filled in once a purchase is completed.

!!!orderno!!!  will be replaced by the Mals order number
!!!product!!!  
will be replaced with product download link (from dropbox)

Customization notes on secure digital download add-on.

There are several more SDD variables that can be used.

ebbb

$LinklokURL - The path to the download file is added on to this. Make sure it is https:// It also shows up in email link.

The $SellerEmail is put into default download email as a mailto:

The $SellerEmail is put into default download email as a mailto:
The $SellerEmail is used as the 'from' email address when sending out the download email to the customer and notification email $NotifyDownloadEmail
The 'from' email addr should match the server or else SPF will be invalid

== extras
enable/disable phpmailer

== email template
template for email sent

Defaults and Examples

Default return page after a successful SDD order.

Note that this is all that shows. A return page should be set up because a page uses the site's template. The path to the return page needs to be set in $DownloadTemplate

Thank you for your order. For reference your order number is 4521986.

Please use the links below to download your purchase.

To download 5 dollar gold piece click the link below:
prod1.zip (180 Bytes) ~ Download link will expire in 11 hours & 40 minutes

If you have any questions regarding this order please contact us.

My Company Software
https://www.example.com/
support@example.com

Example Email

Here is an example email sent to a customer after a successful order

Thank you for your order. For reference your order number is 2837483.

Please use the links below to download your purchase.

To download Moe Picture click the link below:
moe.jpg ~ Download link will expire in 1 hour

If you have any questions regarding this order please contact us.

My Company
https://www.example.com/
support@example.com

Troubleshooting

 

***