Friday, January 21, 2011

Alertpay ™ PHP Shopping Page v3.0

So as I mentioned earlier I have made some changes like you don't need a separate download and cancel page all is done in just one page. Script is easy to change you have to just edit the all.js file everytime you add a new product.

all.js

// Alertpay PHP Shopping Page Script v3.0
// Script written By Tanmay Das
// © Copyright Designinline.com. All rights reserved.
// http://www.designinline.elementfx.com
listDisplay([
// 'name of the thumbshot, screenshot and .zip file to be downloaded', 'name of the product','author','price',
'H5p9O33k7Uf5','HTML Template','Tanmay Das','18',
'2','www.123.com','Link2','17',
'3','www.123.com','Link3','19',
'4','www.123.com','Link4','25']);
function listDisplay(dataArr)
{
var furl, name, author, r1, l, v;
v = 4;
l = (dataArr.length / v)-(dataArr.length / v);
while(l<[dataArr.length/v])
{
furl = dataArr[l * v];
name = dataArr[(l * v)+1];
author = dataArr[(l * v)+2];
r1 = dataArr[(l * v)+3];
r2 = dataArr[(l * v)+4];

document.write('<div id="thumb_div">');
document.write('<table width="200" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr><td>'+name+'</td></tr>');
document.write('<tr><td><img src="template/thumbs/'+furl+'.jpg" width="200" height="150" /></td></tr>');
document.write('<tr><td width="53">Author : '+author+'</td></tr>');
document.write('<tr><td>Price : $'+r1+'</td></tr>');
document.write('<tr><td height="20" align="center"><a href="http://www.titan4119.110mb.com/buy.php?');
document.write('id='+furl+'&amp;name='+name+'&amp;aut='+author+'&amp;r1='+r1+'" target="_self">');
document.write('View Template</a></td></tr>');
document.write('<tr><td align="center"><a href="http://www.yoursite.com/template/buy.php?');
document.write('id='+furl+'&amp;name='+name+'&amp;aut='+author+'&amp;r1='+r1+'" target="_self">');
document.write('<img src="../images/buy_small.gif" width="115" height="27" border="0" /></a></td></tr>');
document.write('</table>');
document.write('</div>');
l++;
}
}
Copy it, save it as all.js (for now) and change the links given in bold


buy.php

<?php
// Alertpay PHP Shopping Page Script v3.0
// Script written By Tanmay Das
// © Copyright Designinline.com. All rights reserved.
// http://www.designinline.elementfx.com
$default0 = 'all';
$dbase = isset($_GET['db']) ? $_GET['db'] : $default0;
$dbase = basename($dbase);
$default1 = 'test';
$furl = isset($_GET['id']) ? $_GET['id'] : $default1;
$furl = basename($furl);
$default2 = 'Name of the Template';
$fname = isset($_GET['name']) ? $_GET['name'] : $default2;
$fname = basename($fname);
$default3 = 'Tanmay Das';
$author = isset($_GET['aut']) ? $_GET['aut'] : $default3;
$author = basename($author);
$default4 = '0';
$price1 = isset($_GET['r1']) ? $_GET['r1'] : $default4;
$price1 = basename($price1);
$default5 = '0';
if (file_exists('download/'.$furl.'.zip'))    {
echo('<table width="1000" border="0" cellspacing="0" cellpadding="0">');
echo('<tr><td width="75%"><img src="preview/'.$furl.'.jpg" /></td>');
echo('<td width="25%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">');
echo('<tr><td>'.$fname.'</td></tr><tr><td>&nbsp;</td></tr>');
echo('<tr><td>Author : '.$author.'</td></tr><tr><td>&nbsp;</td></tr>');
echo('<tr><td>Commercial Licence (Price : $'.$price1.')</td></tr><tr><td align="center">');
echo('<form method="post" action="https://www.alertpay.com/checkout" >');
echo('<input type="hidden" name="ap_purchasetype" value="item-goods"/>');
echo('<input type="hidden" name="ap_merchant" value="you@yoursite.com"/>');
echo('<input type="hidden" name="ap_itemname" value="'.$fname.' (Commercial Licence)"/>');
echo('<input type="hidden" name="ap_currency" value="USD"/>');
echo('<input type="hidden" name="ap_returnurl" value="http://www.yoursite.com/download.php?s=0&name='.$fname.'&aut='.$author.'&rs='.$r1.'&id='.$furl.'"/>');
echo('<input type="hidden" name="ap_itemcode" value="'.$furl.'"/>');
echo('<input type="hidden" name="ap_quantity" value="1"/>');
echo('<input type="hidden" name="ap_amount" value="'.$price1.'"/>');
echo('<input type="hidden" name="ap_cancelurl" value="http://www.yoursite.com/download.php?s=1&name='.$fname.'&aut='.$author.'&rs='.$r1.'&id='.$furl.'"/>');
echo('<input type="image" name="ap_image" src="buy.gif"/>');
echo('</form></td></tr><tr><td>&nbsp;</td></tr></table>');
}
else if(!file_exists('template/dbase/'.$dbase.'.js'))
{
echo('<h5>There has been an ERROR</h5>');
}
else
{
echo('<script type="text/javascript" src="template/dbase/all.js"></script>');
}
?>
Copy it save it as buy.php (for now) and edit everything in bold


download.php

<?php
// Alertpay PHP Shopping Page Script v3.0
// Script written By Tanmay Das
// © Copyright Designinline.com. All rights reserved.
// http://www.designinline.elementfx.com
$default0 = 'home';
$furl = isset($_GET['id']) ? $_GET['id'] : $default0;
$furl = basename($furl);
$default1 = 'name';
$fname = isset($_GET['name']) ? $_GET['name'] : $default1;
$fname = basename($fname);
$default3 = 'Tanmay Das';
$author = isset($_GET['aut']) ? $_GET['aut'] : $default3;
$author = basename($author);
$default4 = '0';
$price = isset($_GET['rs']) ? $_GET['rs'] : $default4;
$price = basename($price);
$default5 = '5';
$status = isset($_GET['s']) ? $_GET['s'] : $default5;
$status = basename($status);
if ($status == '0')
{
header('Location: http://www.yoursite.com/download/'.$furl.'C.zip');
echo ('Thank You for Purchasing HTML Template named '.$fname.' by '.$author.' with  Commercial Licence priced $'.$price);
echo ('<div align="center"><b>Download is in progress</b><br />');
echo ('<img src="../images/load.gif" width="32" height="32" /><br />');
echo ('If the download doesn&acute;t starts within 5sec<br>');
echo ('<a href="http://www.yoursite.com/download/'.$furl.'C.zip">Click Here</a> to download manually</div>');
}
else if ($status == '1')
{
echo ('Sorry but the transaction was not successfull');
}
else
{
echo ('You have some error');
}
?>
Copy and save it as download.php (for now) and change everything in bold


That's it important thing is to just go through the codes and change the links to where you have placed each file. The thumbnail image, screenshot image and the .zip file to be downloaded have the same name for ease of use, hence they are placed in different folders e.g.-thumbs, preview and download.
The buy buttons you can download from AlertPay™. Just go to Bussiness Tools > Generate a "Buy Now" Button and then select the button and copy it's url.

3 comments:

  1. hello can u give me alertpay phisging script my friend hacked my alertpay account and i wan to do same with them

    ReplyDelete
  2. reply at myperesonal460@yahoo.com



    waitng for your kind reply

    ReplyDelete
  3. HELLO! DEAR BROTHER,

    PLEASE HELP ME MORE 1,
    I WANT TO ADD BUY/SUBSCRIBEING OPTION IN MY SITE VIA PAYPAL, ALERTPAY, LIBERTY ETC.
    I KNOW ABOUT BUY BUTTON AND I KNOW HOW CAN MAKE IT.

    BUT I WANT THAT *WHEN ANYONE CLICK BUY BUTON, ATFIRST THEY NEED TO FILLUP A FROM.

    THAN THEY ARE CHOOSE PAYMENT OPTION AND THAN PAY ME,
    AND AUTOMETICLY ALL PAYMENT DETAILS WILL MAIL TO CLIENT AND ME.

    PLEASE GIVE ME FULL DETAILS ABOUT THIS PAYMENT GATEWAY TO ADD IN MY SITE.

    THANK YOU BROTHER. WAITING FOR YOUR REPLY.

    PLEASE ADD ME IN GTALK> tapasfun@gmail.com

    I'M BENGALI, FROM WESTBENGAL, KOCHBEHAR DIST.

    ReplyDelete