SETTING UP LINKLOK PAYPAL AND CREATING A CMSB PRODUCT FILE - Dec 29th, 2018


Linklok is an inexpensive program that I've used for quite a while to handle PayPal transaction verification and supply
secure links for downloads (or web pages).

Although the documentation outlines many ways to customize yourLinklok installation, for a basic implementation there
are only two files required
for linklok to operate: linklokipn.php and linklokipnret.php

linklokipn.php is the only file that you’ll need to customize, and all the user defined parameters appear at the top
of the file:

The information included in the $Products variable is: "unique_product_id,product name,product currency and minimum
price accepted,path to
your hidden directory and the URL of your "success" page,leave this one set to “0",the number of minutes until the
link sent to the
purchaser expires";

NOTE: soyerveortmvobd is the folder where you keep your downloadable files
NOTE: Do not use any special characters in your Your_Product_ID or Your Product name, and no Dollar Sign in your price,
or PayPal may not accept your transaction.


$Products[] = "Your_Product_ID,Your Product Name,USD=99.95,soyerveortmvobd/your_success_page.php,0,1440";

// Setup admin and security variables
$LinklokURL = "http://www.your_site.com/linklokipn.php"; // URL of the linlok.php page on your site
$PaypalEmail = "payments@your_site.com"; // PRIMARY Paypal email address
$SellerCompany = "Your Company"; // Your company name
$SellerEmail = "info@your_site.com"; // Your email address for order inquiries
$SellerURL = "http://www.your_site.com"; // Your website URL
$LinkKey = "orange23"; // Encryption key for download links
$PDTtoken="12876Vdwerwrol_dmYMHfewrwurjdE3QsupkkvTo4Fv39-7y"; // Auto Return PDT token from paypal-profile-website
payment preferences

$DelayEchecks = "Y"; // Set to Y to delay eCheck orders until cleared.
$EmailTemplate = ""; // Optional Email Template in either .txt or .html format
$DownloadTemplate = ""; // Optional download page template
$ErrorTemplate = ""; // Optional Error page template
$CopyEmail = "any_email@your_provider.net"; // Receive copy of order emails. email address or ""
$ManualPassword = "kookamonga"; // Password for manual order entry. "" to disable
$HTMLEmail = "Y"; // Set to Y to use HTML formatted emails or N to send in plain-text
$Txnid = ""; // Optional to stop possible multiple calls from IPN
$WarningTemplate = ""; // Check payment warning email template
$WarningTemplatePage= ""; // Check payment warning thankyou page template


To use a dynamic product file that pulls it's data from your CMSB tables:

Change the Products[] line to:


// Setup your products
$ProductCSV = "http://www.your_domain.com/your_folder/your_product_file.php";


The code for our_product_file.php file follows the format:

NOTE: Don not use head or body tags in your_products_file.php, just the code below modified to fit your needs

NOTE: You'll need to set up an editor called "Your Table" with at least a Product_ID, Product Name, and Price text
field, and an upload field that contains your downloadable product

NOTE: Do not use any special characters in your Your_Product_ID or Your Product Name fields, and no Dollar Sign in the
Price field or PayPal may not accept your transaction.


<?php
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/path_to_your_server/','','../','../../','../../../');
foreach (
$dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!
function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
list($
$templatesRecords, $$templatesMetaData) = getRecords(array(

));

?>

<?php header("Content-type: text/css");?>
Your_First_Product_ID,Your First Product name,USD=99.95,soyerveortmvobd/your_success_page.php,0,1440
Your_Second_Product_ID,Your Second Product name,USD=99.95,soyerveortmvobd/your_second_product.zip,0,2880
<?php foreach ($your_tableRecords as $record): ?><?php echo $record['product_id'] ?>,<?php echo $record['product_name']
?>,USD=<?php echo $record['price'] ?>,<?php foreach ($record['upload'] as $upload): ?>http://www.your_domain.com<?php
echo $upload['urlPath'] ?><?php endforeach; ?>,0,1440
<?php endif ?>
<?php endforeach; ?>


If you should decide to purchase linklok, or any other Vibralogic programs, I'd appreciate your using my affiliate link:

http://www.shareasale.com/r.cfm?B=12671&U=520135&M=3826



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service