include "include.php" ;
$randomstring = $rand;
// change the affiliate sales to direct sales
$q = "update visitor_stats set referrer='0' where randomstring='$randomstring'";
$db->insert($q);
// Get the product details
$q = "select p.* from visitor_stats vs
LEFT JOIN products p on p.id=vs.product_id
where vs.randomstring='$randomstring'";
$v = $db->get_a_line($q);
$pid = $v[id];
$price = $v['price'];
$short = $v['product_shortname'];
$pname = $v['product_name'];
$template = $v['template_page'];
$comm = $v['commission'];
$ref_comm = ($comm*$price)/100;
$ref_comm = number_format($ref_comm,2);
// Title
echo "
Wait! You are not done. |
  |
Proceed to Re-Payment |
  |
You are not done yet!! Since you have used your own affiliate URL to purchase, you are not allowed to get the product. To get the Product Please pay your affiliate commission back to the Admin. |
  |
After you make Payment, you'll access ".$pname." instantly. |
  |
"; // Collect Admin account settings $q = "select paypal_email, stormpay_email from admin_settings where id=1"; $v = $db->get_a_line($q); $admin_paypal_email = $v['paypal_email']; $admin_stormpay_email = $v['stormpay_email']; // Frame Paypal button $amount = $ref_comm; $receiver = $admin_paypal_email; $return_url = $http_path."member/index.php"; $notify_url = $http_path."ipn/paypal/payment_ipn.php"; $cancel_url = $http_path."cancel.php"; $itemname = $pname." - Payment 2 of 2"; $paypath = "https://www.paypal.com/cgi-bin/webscr"; $paypal_image = $http_path."http://affiliationempire.tk/images/AddtoCart.gif"; // $paypath = $return_url; $paypal_button = " "; echo $paypal_button; // Frame Stormpay Button $returnrand = $returnrand.$randomstring; $amount = $ref_comm; $receiver = $admin_stormpay_email; $return_url = $http_path."member/index.php?rr=".$returnrand; $notify_url = $http_path."ipn/stormpay/payment_ipn.php"; $cancel_url = $http_path."cancel.php"; $itemname = $pname." - Payment 2 of 2"; $paypath = "https://www.stormpay.com/stormpay/handle_gen.php"; $stormpay_image = $http_path."images/stormpay.jpg"; // $paypath = $return_url; $stormpay_button = " "; echo $stormpay_button; echo " |