How to implement Loan SA, Life Insurance & Funeral Cover into your Wordpress site

On behalf of Affiliate.co.za, I would personally like to thank you for your interest in marketing the Loan SA Personal Loan, Life Insurance & Funeral Cover products on your website.

In this document you will learn how to setup your form and the API (that is attached with this document) on your WordPress website.

This will enable you to easily send leads to the Loan SA campaign, and depending on the choice a visitor makes on your site send to either or both of the Life Insurance and Funeral Cover campaigns.

It is important to follow the guide step-by-step, otherwise you will find yourself sending leads, which doesn’t get tracked – thus loosing out on some great commission.

What you will need

The following files and plugins is crucial to install in your WordPress website, otherwise the whole API will not work.

Plugins:

Files:

  • loansa.php – your own unique API PHP file (attached together with this Setup Guide)

Other stuff you will need:

  • Your FTP details
  • Access to your WordPress site
  • Some patience
Step 1: Upload your API file (loansa.php)

Open up your FTP programme and upload the API file to your domain.

Keep note of the url of the API file as you will need to insert it as a confirmation URL in your web form.

Step 3: Create a landing page

It is important that you create a landing page. This is where Loan-SA’s iframe will reside.

This iframe allows applicants to sign the application and if your skip this part, your lead will not track in your dashboard.

Keep the URL of the landing page nearby as you will need it when you setup your web form

Install PHP code

Copy and paste the following code into you landing page.

This PHP code takes the information that the API send to your landing page and send them to Loan-SA’s web service, which return with an iframe that the visitor needs to sign.

IMPORTANT:

  • Switch to “Text” view (top right) before you paste the code
  • Add “” after the code
  • Replace the ‘XXX’ with your Loan-SA “access_id” & “access_key”
  • Keep a copy of the code in a text file for when the code gets decoded when you accidentally switch to “Visual” mode in WordPress
[php]

$AccessID = $_GET[‘access_id’];
$AccessKey = $_GET[‘access_key’];
$FirstName = $_GET[‘firstName’];
$LastName = $_GET[‘lastName’];
$NationalID = $_GET[‘id’];
$EmailAdress = $_GET[’email’];
$CellNumber = $_GET[‘cell’];
$LoanAmount = $_GET[‘amount’];
$EmploymentStatus = $_GET[’employmentStatus’];
$NettSalary = $_GET[‘nettSalary’];
$SalaryFrequency = $_GET[‘salaryFreq’];
$SalaryDate = $_GET[‘debitDate’];
$BankName = $_GET[‘bankName’];
$AccountType = $_GET[‘accountType’];
$BranchCode = $_GET[‘branchCode’];
$AccountNumber = $_GET[‘accountNo’];

$loansa_array = array(
‘access_id’ => ‘84267’,
‘access_key’ => ‘6e9483995499aae619f9c9c4c2a73a90’,
‘firstName’ => $FirstName,
‘lastName’ => $LastName,
‘id’ => $NationalID,
’email’ => $EmailAdress,
‘cell’ => $CellNumber,
‘amount’ => $LoanAmount,
’employmentStatus’ => $EmploymentStatus,
‘nettSalary’ => $NettSalary,
‘salaryFreq’ => $SalaryFrequency,
‘debitDate’ => $SalaryDate,
‘bankName’ => $BankName,
‘accountType’ => $AccountType,
‘branchCode’ => $BranchCode,
‘accountNo’ => $AccountNumber
);

// convert the data into a URL
foreach($loansa_array as $key=>$value) {
$loansa_array_string .= $key.’=’.$value.’&’;
}

// remove the first ‘&’ from the URL
$loansa_array_string = rtrim($loansa_array_string, ‘&’);

// echo the loan-sa iframe code
echo ‘<iframe src="https://loan-sa.co.za/webapi/submit.php?’.$loansa_array_string.’" width="100%" height="1200px" frameborder="no"></iframe>’;

[/php]