4.
In order to integrate AWeber with our software, first you have to setup the shopping cart. Navigate to My Lists > Confirmed Opt-In. Here, you should setup email text, but most importantly insert a link to the page that will contain your lead tracking code - essentially an 'after confirmation' page. You can name this page anything you want, but it must be a '.php' file. For example if you were to name the page 'leadtrack.php', you would enter 'http://www.yourdomain.com/leadtrack.php' into the Confirmation Sucess Page field.
Next, add the following code to your leadtrack.php file:
<script>
function hideIF() {
document.getElementById('IF').style.display = '';
}
function getSaleInfo() {
document.getElementById('st_code').innerHTML='<iframe src="http://tariehk.firsttimebuyershub.com/affiliateold/salejs.php?amount=<?php echo $_GET['meta_message']; ?>&transaction=<?php echo $_GET['unit']; ?>" alt="" id=IF width=50 height=50 border="0" frameborder="0" onload="hideIF()">';
}
window.onload = getSaleInfo;
</script>
<div id="st_code"></div>
<?php
$content = '<?xml version="1.0"?>
<xmlrequest>
<username>admin</username>
<usertoken>21232f297a57a5a743894a0e4a801fc3</usertoken>
<requestmethod>InsertAffiliate</requestmethod>
<details>
<usergroup>youruser group</usergroup>
<referredby>[email protected]</referredby>
<affiliateprogram>affiliate program</affiliateprogram>
<status>Approved</status>
<customfields>
<item>
<fieldname>First Name:</fieldname>
<value>your first name</value>
</item>
<item>
<fieldname>Last Name:</fieldname>
<value>your last name</value>
</item>
<item>
<fieldname>Choose Password:</fieldname>
<value>123456</value>
</item>
<item>
<fieldname>Confirm Password:</fieldname>
<value>123456</value>
</item>
<item>
<fieldname>Email:</fieldname>
<value>[email protected]</value>
</item>
<item>
<fieldname>Company:</fieldname>
<value>companyname</value>
</item>
</customfields> <
/details>
</xmlrequest>';
$ch = curl_init("http://www.yourdomain.com/affiliate/xml.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "xml=$content");
$result = @curl_exec($ch);
if($result === false) {
echo "Error performing request";
}
else {
$xml_doc = simplexml_load_string($result);
echo 'Status is ', $xml_doc->status, '<br/>';
if ($xml_doc->status == 'SUCCESS') {
echo 'Data is <br />', $xml_doc->data, '<br/>';
} else {
echo 'Error is <br />', $xml_doc->errormessage, '<br/>';
}
}
curl_close($ch);
?>
Note
xmlrequest (Required) This is the root document tag name.
username (Required) This is the admin user name.
usertoken (Required) This is user token number like password for using the API.
Those are the main requirements for your software. Just click 'Finish' to complete the wizard