0) { $record['noDownloads'] = 0; $record['expire'] = time()+$config['dnLoadExpire']; $where = 'id = '.$_GET['reset']; $update = $db->update($glob['dbprefix']."CubeCart_Downloads", $record, $where); httpredir($glob['adminFile'].'?_g=orders/orderBuilder&edit='.$_GET['edit']); } if (isset($_POST['cart_order_id']) && !isset($_POST['prodRowsSubmit']) && $_POST['customer_id']>0) { $cache = new cache(); $cache->clearCache(); // ORDER INVENTORY if (count($_POST['prodName'])>0) { for ($i=0;$i<=count($_POST['prodName']);$i++) { if ((!empty($_POST['prodName'][$i]) && !empty($_POST['quantity'][$i]) && !empty($_POST['price'][$i])) || $_POST['delId'][$i] == 1) { $newOrderInv['name'] = $db->mySQLSafe($_POST['prodName'][$i]); $newOrderInv['productCode'] = $db->mySQLSafe($_POST['productCode'][$i]); $newOrderInv['product_options'] = $db->mySQLSafe($_POST['product_options'][$i]); $newOrderInv['quantity'] = $db->mySQLSafe($_POST['quantity'][$i]); $newOrderInv['price'] = $db->mySQLSafe($_POST['price'][$i]); $newOrderInv['cart_order_id'] = $db->mySQLSafe($_POST['cart_order_id']); if ($_POST['delId'][$i] == 1) { $where = "id = ".$db->mySQLSafe($_POST['id'][$i]); $delete = $db->delete($glob['dbprefix']."CubeCart_order_inv", $where); } else if ($_POST['id'][$i]>0) { $where = "id = ".$db->mySQLSafe($_POST['id'][$i]); $update = $db->update($glob['dbprefix']."CubeCart_order_inv", $newOrderInv, $where); } else { $insert = $db->insert($glob['dbprefix']."CubeCart_order_inv", $newOrderInv); } } } } // ORDER SUMMARY $newOrderSum['cart_order_id'] = $db->mySQLSafe($_POST['cart_order_id']); $newOrderSum['customer_id'] = $db->mySQLSafe($_POST['customer_id']); $newOrderSum['name'] = $db->mySQLSafe($_POST['name']); $newOrderSum['add_1'] = $db->mySQLSafe($_POST['add_1']); $newOrderSum['add_2'] = $db->mySQLSafe($_POST['add_2']); $newOrderSum['town'] = $db->mySQLSafe($_POST['town']); $newOrderSum['county'] = $db->mySQLSafe($_POST['county']); $newOrderSum['postcode'] = $db->mySQLSafe($_POST['postcode']); $newOrderSum['country'] = $db->mySQLSafe($_POST['country']); $newOrderSum['name_d'] = $db->mySQLSafe($_POST['name_d']); $newOrderSum['companyName'] = $db->mySQLSafe($_POST['companyName']); $newOrderSum['companyName_d'] = $db->mySQLSafe($_POST['companyName_d']); $newOrderSum['add_1_d'] = $db->mySQLSafe($_POST['add_1_d']); $newOrderSum['add_2_d'] = $db->mySQLSafe($_POST['add_2_d']); $newOrderSum['town_d'] = $db->mySQLSafe($_POST['town_d']); $newOrderSum['county_d'] = $db->mySQLSafe($_POST['county_d']); $newOrderSum['postcode_d'] = $db->mySQLSafe($_POST['postcode_d']); $newOrderSum['country_d'] = $db->mySQLSafe($_POST['country_d']); $newOrderSum['phone'] = $db->mySQLSafe($_POST['phone']); $newOrderSum['mobile'] = $db->mySQLSafe($_POST['mobile']); $newOrderSum['subtotal'] = $db->mySQLSafe($_POST['subtotal']); $newOrderSum['discount'] = $db->mySQLSafe($_POST['discount']); $newOrderSum['prod_total'] = $db->mySQLSafe($_POST['prod_total']); $newOrderSum['total_tax'] = $db->mySQLSafe($_POST['total_tax']); $newOrderSum['total_ship'] = $db->mySQLSafe($_POST['total_ship']); // removed as this is done further down $newOrderSum['status'] = $db->mySQLSafe($_POST['status']); $newOrderSum['email'] = $db->mySQLSafe($_POST['email']); $newOrderSum['comments'] = $db->mySQLSafe($_POST['comments']); $newOrderSum['customer_comments'] = $db->mySQLSafe($_POST['customer_comments']); $newOrderSum['ship_date'] = $db->mySQLSafe($_POST['ship_date']); $newOrderSum['shipMethod'] = $db->mySQLSafe($_POST['shipMethod']); $newOrderSum['gateway'] = $db->mySQLSafe($_POST['gateway']); $newOrderSum['courier_tracking'] = $db->mySQLsafe($_POST['courier_tracking']); if (isset($_GET['edit'])) { $where = "cart_order_id = ".$db->mySQLSafe($_GET['edit']); $update = $db->update($glob['dbprefix']."CubeCart_order_sum", $newOrderSum, $where); if (isset($_POST['card_number'])) { $cardData = array( 'card_type' => $_POST['card_type'], 'card_number' => $_POST['card_number'], 'card_expire' => $_POST['card_expire'], 'card_valid' => $_POST['card_valid'], 'card_issue' => $_POST['card_issue'], ); if (function_exists('mcrypt_module_open')) { require "classes".CC_DS."cart".CC_DS."encrypt.inc.php"; $crypt = new encryption($keyArray); $record['offline_capture'] = "'".base64_encode($crypt->encrypt(serialize($cardData)))."'"; } $db->update($glob['dbprefix'].'CubeCart_order_sum', $record, array('customer_id' => $orderSum['customer_id'], 'cart_order_id' => $orderSum['cart_order_id'])); } if ($update == true) { $msg .= "

".sprintf($lang['admin']['orders_updated_successfully'],$_GET['edit'])."

"; }/* else { $msg .= "

".sprintf($lang['admin']['orders_update_failed'], $_GET['edit'])."

"; } */ } else { $newOrderSum['ip'] = $db->mySQLSafe(get_ip_address()); $newOrderSum['time'] = $db->mySQLSafe(time()); $insert = $db->insert($glob['dbprefix']."CubeCart_order_sum", $newOrderSum); if ($_POST['customer_id']>0) { $record['noOrders'] = "noOrders + 1"; $where = "customer_id = ".$_POST['customer_id']; $update = $db->update($glob['dbprefix']."CubeCart_customer", $record, $where); } if ($insert == true) { $msg .= "

".sprintf($lang['admin']['orders_add_success'],$_POST['cart_order_id'])."

"; // send email confirmation $order->newOrderEmail($_POST['cart_order_id']); } else { $msg .= "

".sprintf($lang['admin']['orders_add_fail'],$_POST['cart_order_id'])."

"; } } // update order status email etc $order->orderStatus($_POST['status'], $_POST['cart_order_id'], true); if ($_POST['cart_order_id']!==$_GET['edit']) { httpredir($glob['adminFile']."?_g=orders/orderBuilder&edit=".$_POST['cart_order_id']); } } if (isset($_GET['edit'])) { $orderSum = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum WHERE cart_order_id = ".$db->mySQLSafe($_GET['edit'])); $orderInv = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_inv WHERE cart_order_id = ".$db->mySQLSafe($_GET['edit'])); } if (count($orderInv) < 1 && !empty($_GET['edit'])) { $msg .= "

".sprintf($lang['admin']['orders_no_products'], $_GET['edit'])."

"; } $customers = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_customer WHERE `type` > 0 ORDER BY lastName, firstName ASC"); $countries = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_iso_countries"); if ($countries == true) { $countriesArray = array(); for($i=0;$i<=count($countries);$i++){ $countriesArray[$countries[$i]['id']] = $countries[$i]['printable_name']; } } if(isset($_GET['PayPal-Pro']) && !empty($_GET['PayPal-Pro'])) { // Get Module Config $module = fetchDbConfig("PayPal_Pro"); $basePPPath = "modules".CC_DS."altCheckout".CC_DS."PayPal_Pro".CC_DS."wpp-".$module['mode'].CC_DS; $order_id = $_GET['edit']; $ppfunction = ereg_replace("[^A-Za-z]", "", $_GET['PayPal-Pro']); switch($ppfunction) { case "doCapture": require($basePPPath."DoCaptureReceipt.php"); break; case "doAuth": case "doReAuth": require($basePPPath."DoReauthorizationReceipt.php"); break; case "doRefund": require($basePPPath."RefundReceipt.php"); break; case "doVoidAuth": require($basePPPath."DoVoidReceipt.php"); break; } } require($glob['adminFolder'].CC_DS."includes".CC_DS."header.inc.php"); ?>

Integrated Packing Slip IconSingle Integrated Label Sheets
Speed up the dispatch process with compatible single integrated label sheets. These can be used to peel off a delivery address which can be stuck straight on to the package.
Purchase | Learn More »
   
   
   
   
   
       

" />
   
" /> " />    

:

decrypt(base64_decode($orderSum[0]['offline_capture']))); $card = (!empty($card)) ? $card : array('card_type' => '', 'card_number' => '', 'card_expire' => '', 'card_valid' => '', 'card_issue' => ''); foreach ($card as $field => $value) { echo sprintf('', $lang['admin']['orders_'.$field], $value); } ?>
%1$s

$_POST['prodName'][$i], 'productCode' => $_POST['productCode'][$i], 'product_options' => $_POST['product_options'][$i], 'quantity' => $_POST['quantity'][$i], 'price' => $_POST['price'][$i], ); } ?>
 
0) { ?>  
  mySQLSafe($_GET['edit'])." AND D.productId = ".$db->mySQLSafe($orderInv[$i]['productId']); $download = $db->select($query); ?>
[]

 
 
mySQLsafe($_GET['edit'])); $results = $db->select($query); $thisPage = currentPage(array("PayPal-Pro"=>0, "form"=>0)); ?>

PayPal Website Payments Pro Functionality

The functions below are specifically for orders purchased with PayPal Express Checkout without the need to login to your PayPal account.

Void Authorization ID: `".$authorizationID."`

Message to customer:

"; return $htmlOut; } function doCaptureForm ($authorizationID, $exampleAmount, $id, $TENDER, $remainder) { global $thisPage,$module; $maxAmount = sprintf("%.2f",$exampleAmount - $remainder); $htmlOut = "

Capture all or part of Authorization ID `".$authorizationID."`

Final Capture:

Capture Amount:

"; if($remainder>0) { $htmlOut .= "(Max: ".$maxAmount.") ".sprintf("%.2f",$remainder)." has already been captured from this transaction."; } $htmlOut .= "

Message to customer:

"; return $htmlOut; } function doReAuthForm ($originalAuthorizationID, $exampleAmount,$id, $TENDER) { global $thisPage; $htmlOut = "

Reauthorize ID `".$originalAuthorizationID."`

Reauthorization Amount:

"; return $htmlOut; } function doAuthForm ($originalAuthorizationID, $exampleAmount,$id, $TENDER) { global $thisPage; $htmlOut = "

Authorize ID `".$originalAuthorizationID."`

Authorization Amount:

"; return $htmlOut; } function doRefundForm ($transactionId,$exampleAmount,$id, $TENDER) { global $thisPage; $htmlOut = "

Refund all or partial amount of transaction ID `".$transactionId."`

Refund Amount:

Message to customer:

"; return $htmlOut; } ?>
Details Action
Time:
Action:
Transaction Id:
0) { ?>Amount:
Notes:
"; switch ($results[$i]['gateway']) { case "PayPal Website Payments Pro (Authorization)": case "PayPal Website Payments Pro (Order)": if($results[$i]['amount'] > $results[$i]['remainder']) { $links .= "Capture | "; $action = true; // reauth only possible if the initial auth is three days old or more $threeDaysAgo = time()-259200; if($results[$i]['time']<$threeDaysAgo) { $links .= "ReAuthorize | "; } if($results[$i]['gateway']=="PayPal Website Payments Pro (Order)") { $links .= "Authorize | "; } $links .= "Void | "; echo substr($links,0,-2).""; if($_GET['form']=="doCaptureForm".$results[$i]['id'] && !isset($_POST['order_capture'])) { echo "
"; echo doCaptureForm($results[$i]['trans_id'],$results[$i]['amount'],$results[$i]['id'], $results[$i]['extra'], $results[$i]['remainder']); } elseif($_GET['form']=="doVoidForm".$results[$i]['id'] && !isset($_POST['order_void'])) { echo "
"; echo doVoidForm ($results[$i]['trans_id'], $results[$i]['id'], $results[$i]['extra']); } elseif($_GET['form']=="doReAuthForm".$results[$i]['id'] && !isset($_POST['order_auth'])) { echo "
"; echo doReAuthForm($results[$i]['trans_id'],$results[$i]['amount'],$results[$i]['id'], $results[$i]['extra']); } elseif($_GET['form']=="doAuthForm".$results[$i]['id'] && !isset($_POST['order_auth'])) { echo "
"; echo doAuthForm($results[$i]['trans_id'],$results[$i]['amount'],$results[$i]['id'], $results[$i]['extra']); } } break; case "PayPal Website Payments Pro (Sale)": case "PayPal Website Payments Pro (DoCapture)": if($results[$i]['amount'] > $results[$i]['remainder']) { echo "
Refund
"; if($_GET['form']=="doRefundForm".$results[$i]['id'] && !isset($_POST['order_refund'])) { echo "
"; echo doRefundForm($results[$i]['trans_id'],$results[$i]['amount'],$results[$i]['id'], $results[$i]['extra']); } $action = true; } break; /* case "PayPal Website Payments Pro (DoRefund)": echo " "; break; */ case "PayPal Website Payments Pro (DoAuthorization)": $action = true; $links .= "Capture | "; $links .= "ReAuthorize | "; $links .= "Void | "; echo substr($links,0,-2).""; if($_GET['form']=="doCaptureForm".$results[$i]['id'] && !isset($_POST['order_capture'])) { echo "
"; echo doCaptureForm($results[$i]['trans_id'],$results[$i]['amount'],$results[$i]['id'], $results[$i]['extra'], $results[$i]['remainder']); } elseif($_GET['form']=="doVoidForm".$results[$i]['id'] && !isset($_POST['order_void'])) { echo "
"; echo doVoidForm ($results[$i]['trans_id'], $results[$i]['id'], $results[$i]['extra']); } elseif($_GET['form']=="doReAuthForm".$results[$i]['id'] && !isset($_POST['order_auth'])) { echo "
"; echo doReAuthForm($results[$i]['trans_id'],$results[$i]['amount'],$results[$i]['id'], $results[$i]['extra']); } break; /* case "PayPal Website Payments Pro (DoVoid)": echo " "; break; */ } if($action==false) echo "
Complete
"; ?>