Jump to content

Integration with Post Affiliate Pro (checkoutscript.php) hangs


nerdudes

Recommended Posts

We are trying to integrate Post Affiliate Pro with WHMCS. Between us and the support people from Quality Unit We have tried a variety of ways of placing their code in checkoutscript.php. However the check out process through ordering gets hung in the checkout part. I was wondering if anyone else experienced these problems and how to get around it. the following are two examples of different codes that we have tried:

 

method #1 code in checkoutscript.php:

<?php

/*

**************************************************

************** WHMCS CheckOut Script *************

**************************************************

You may enter code here which will be run when

a user checks out if you have enabled it in

Configuration > General Configuration > Other

of your WHMCS Admin Area. The following

variables are available to you:

**************************************************

Order ID: $orderid

Order Number: $ordernumber

Invoice ID: $invoiceid

Product ID: $productid

Domains Array: $domains

Addons Array: $addons

**************************************************

*/

// You got mail!

mail($emailto, $subject, $message, $headers);

 

$result=mysql_query("SELECT * FROM tblorders WHERE ordernum = '$ordernumber' LIMIT 1");

$row = mysql_fetch_array($result);

$amount = $row['amount'];

?>

 

<script id="pap_x2s6df8d" src="http://affiliates.webservio.biz/scripts/sale.js" type="text/javascript"></script>

<script type="text/javascript">

 

var TotalCost="<?php echo $amount ?>";

var OrderID="<?php echo $orderid ?>";

var ProductID="";

papSale();

</script>

 

method #2 in checkoutscript.php:

<?php

/*

**************************************************

************** WHMCS CheckOut Script *************

**************************************************

You may enter code here which will be run when

a user checks out if you have enabled it in

Configuration > General Configuration > Other

of your WHMCS Admin Area. The following

variables are available to you:

**************************************************

Order ID: $orderid

Order Number: $ordernumber

Invoice ID: $invoiceid

Product ID: $productid

Domains Array: $domains

Addons Array: $addons

**************************************************

*/

// You got mail!

mail($emailto, $subject, $message, $headers);

 

$result=mysql_query("SELECT * FROM tblorders WHERE ordernum = '$ordernumber' LIMIT 1");

$row = mysql_fetch_array($result);

$amount = $row['amount'];

 

$result = file_get_contents("http://affiliates.webservio.biz/scripts/sale2.php?TotalCost=".$amount."&OrderID=".$ordernumber."&aid=".$_COOKIE['POSTAff2Cookie']);

?>

 

Also their integration general code to insert in shopping carts is:

 

<script id="pap_x2s6df8d" src="http://affiliates.webservio.biz/scripts/sale.js" type="text/javascript"></script>

<script type="text/javascript"><!--

 

var TotalCost="XXXXXX.XX";

var OrderID="XXXXXX";

var ProductID="XXXXXX";

papSale();

--></script>

 

We appreciate any help or hints we can get.

 

Mishi

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated