nerdudes Posted December 18, 2007 Share Posted December 18, 2007 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 0 Quote Link to comment Share on other sites More sharing options...
generic Posted December 18, 2007 Share Posted December 18, 2007 when trying to debug i find it helpful to toss in a bunch of echo statements in the code after important steps to narrow down where its hanging 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted December 18, 2007 Share Posted December 18, 2007 method #1 is not going to work method #2 will work as long as the file_get_contents doesnt srite to the screen and you have nothing in the file after the closing php marker 0 Quote Link to comment Share on other sites More sharing options...
naichunlei Posted December 19, 2007 Share Posted December 19, 2007 I think we are trying to figure out the samething. http://forum.whmcs.com/showthread.php?p=40175 Mind to share your code Webservio? 0 Quote Link to comment Share on other sites More sharing options...
unitminer Posted April 6, 2009 Share Posted April 6, 2009 BTW: Latest release of Post Affiliate Pro 4 is possible to integration with WHMCS without problems. Integration is described here: http://addons.qualityunit.com/integration-methods/_iwhmcs/ In case of problems, you can contact also support team of Quality Unit and they will help you. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.