othellotech
It was solution for order processing. Now for using cart processing.
1. Open in editor your WHMCS_install_directory/include/actionhooks.php
2. After function actionhook_ShoppingCartCheckout($vars) {
and before } add this code:
$orderid = $vars["OrderID"];
$ord_num = $vars["OrderNumber"];
$pap_query = mysql_query("select amount from tblorders WHERE id='$orderid'");
$pap_query = mysql_fetch_array($pap_query);
$pap_saleamt = $pap_query['amount'];
$url = "http://www.yourdomain.com/affiliate/scripts/sale.php?TotalCost=$pap_saleamt&OrderID=$orderid&ProductID=$ord_num";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
$result = curl_exec($ch);
curl_close($ch);
Change http://www.yourdomain.com/affiliate tou your location where PAP installed.
Hope this also helps integrate WHMCS with PAP