close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Checkout won't calculate shipping

Thread began 2/22/2010 12:45 pm by wilyumcj205276 | Last modified 3/25/2010 3:34 pm by Eric Mittman | 8091 views | 41 replies |

wilyumcj205276

Checkout won't calculate shipping

I can not get real time fedex shipping quote in checkout. The shipping failure page displays, and can not complete the order. As far as I can tell , all of my api credentials are correct. You can view the site at williamcj.com
I'm in the final stages and want to test the gateway as well. I can not test the gateway locally and complete a purchase, can I?

Sign in to reply to this post

Eric Mittman

You should check the full request and response to see some more detail about the error. To get this info add the following code into you shipping_failure page where you would like to see the error messages:

php:
<?php

//WA eCart UPS Shipping Include
require_once("WA_eCart/WA_eCart_FedEx_PHP.php");
?>
The full FedEx request is:<?php echo $_SESSION["WA_Cart_Coupons_FedEx_FullRequest"]; ?><br/><br/>
The full FedEx response is: <?php echo $_SESSION["WA_Cart_Coupons_FedEx_FullResponse"]; ?>
Sign in to reply to this post

wilyumcj205276

Eric. I added the code and I still can't complete the order. The failure(Shipping Quote Failed) page now says: The full Fedex request is:
The full Fedex response is:

Sign in to reply to this post

Eric Mittman

If you are sure that you are using FedEx you should be able to use these session variables to see the full request and full response:

php:
full request: <?php echo $_SESSION["testCart_FedEx_FullRequest"]; ?><br/><br/>
full response: <?php echo $_SESSION["testCart_FedEx_FullResponse"]; ?>



This should get the full FedEx request and response. If you are using a different shipping provider this will not work though. If you still cannot get the full request and response to show please post back with a copy of the shipping failure page.

Based on my test of your site the error is saying 'no packages to ship'. How do you have the packages setup in this server behavior?

Sign in to reply to this post

wilyumcj205276

It's still not working. I know my shipping is Fedex. Here are the api credentilas for my gateway and Fedex

LinkPoint/First Data store # 1216141

Authentication Key: 2eGzFnOD9Y5PqXFX

Meter Number: 101616993

Account# 459873384

smpt smptout.secureserver.net

I have not been asked to use the authentication Key. There already is some link in that area that shows up there automatically. Maybe this is a problem.

Sign in to reply to this post

Eric Mittman

Please post back with a copy of your shipping failure page and the confirm page minus the sensitive details. I will look at these to determine what is happening.

Sign in to reply to this post

wilyumcj205276

Shipping failure

<?php
//WA eCart Include
require_once("WA_eCart/eCart1_PHP.php");
?><?php
$eCart1->GetContent();
?>
<?php
if ($eCart1->IsEmpty()) {
$eCart1->redirStr = "cart.php";
$eCart1->cartAction = "RedirectIfEmpty";
}
?>
<?php
// WA eCart Redirect
if ($eCart1->redirStr != "") {
header("Location: ".$eCart1->redirStr);
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<link href="WA_eCart/CSS/eC_Power_Pacifica_Arial.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div class="eC_Power_Pacifica_Arial" >
<h2>Shipping Quote Failed</h2>
<h3 class="eC_InfoHeader" >We're sorry</h3>
<div class="eC_InfoContainer" >
<p class="eC_OrderInfo"><?php echo $_SESSION["eCart1_FedEx_ErrorDescription"]; ?>
</p>
</div>
</div>
</body>
</html>
<?php
//WA eCart UPS Shipping Include
require_once("WA_eCart/WA_eCart_FedEx_PHP.php");
?>
The full FedEx request is:<?php echo $_SESSION["WA_Cart_Coupons_FedEx_FullRequest"]; ?><br/><br/>
The full FedEx response is: <?php echo $_SESSION["WA_Cart_Coupons_FedEx_FullResponse"]; ?>
full request: <?php echo $_SESSION["testCart_FedEx_FullRequest"]; ?><br/><br/>
full response: <?php echo $_SESSION["testCart_FedEx_FullResponse"]; ?>

Sign in to reply to this post

wilyumcj205276

Confirm

<?php
//WA eCart Include
require_once("WA_eCart/eCart1_PHP.php");
?>
<?php require_once('Connections/connStore.php'); ?><?php
$eCart1->GetContent();
?>
<?php
require_once("WA_eCart/Adv_CO_Scripts/LinkPointAPI_PHP.php");
?>
<?php
//WA eCart Include
require_once("WA_eCart/WA_eCart_Database_PHP.php");
?>
<?php
if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_country"] = "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_postcode"] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_state_province"] = "".((isset($_POST["shipping_state_province"]))?$_POST["shipping_state_province"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_city"] = "".((isset($_POST["shipping_city"]))?$_POST["shipping_city"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_street2"] = "".((isset($_POST["shipping_street2"]))?$_POST["shipping_street2"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_street1"] = "".((isset($_POST["shipping_street1"]))?$_POST["shipping_street1"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_fax"] = "".((isset($_POST["shipping_fax"]))?$_POST["shipping_fax"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_phone"] = "".((isset($_POST["shipping_phone"]))?$_POST["shipping_phone"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_email"] = "".((isset($_POST["shipping_email"]))?$_POST["shipping_email"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_lastname"] = "".((isset($_POST["shipping_lastname"]))?$_POST["shipping_lastname"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_shipping_firstname"] = "".((isset($_POST["shipping_firstname"]))?$_POST["shipping_firstname"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_country"] = "".((isset($_POST["country"]))?$_POST["country"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_postcode"] = "".((isset($_POST["postcode"]))?$_POST["postcode"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_state_province"] = "".((isset($_POST["state_province"]))?$_POST["state_province"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_city"] = "".((isset($_POST["city"]))?$_POST["city"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_street2"] = "".((isset($_POST["street2"]))?$_POST["street2"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_street1"] = "".((isset($_POST["street1"]))?$_POST["street1"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_fax"] = "".((isset($_POST["fax"]))?$_POST["fax"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_phone"] = "".((isset($_POST["phone"]))?$_POST["phone"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_email"] = "".((isset($_POST["email"]))?$_POST["email"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_lastname"] = "".((isset($_POST["lastname"]))?$_POST["lastname"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_firstname"] = "".((isset($_POST["firstname"]))?$_POST["firstname"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_cvv"] = "".((isset($_POST["cvv"]))?$_POST["cvv"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_exp_year"] = "".((isset($_POST["exp_year"]))?$_POST["exp_year"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_exp_month"] = "".((isset($_POST["exp_month"]))?$_POST["exp_month"]:"") ."";
}
?>
<?php

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_cc_number"] = "".((isset($_POST["cc_number"]))?$_POST["cc_number"]:"") ."";
}
?>
<?php

Sign in to reply to this post

wilyumcj205276

if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_cc_type"] = "".((isset($_POST["cc_type"]))?$_POST["cc_type"]:"") ."";
}
?>
<?php

if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) {
$LinkPointAPI_required = array();
$LinkPointAPI_required[0] = array();
$LinkPointAPI_required[1] = array();
$LinkPointAPI_itemized = array();
$LinkPointAPI_itemized[0] = array();
$LinkPointAPI_itemized[1] = array();
$LinkPointAPI_optional = array();
$LinkPointAPI_optional[0] = array();
$LinkPointAPI_optional[1] = array();
$cartIndex = 0;
$nextIndex = 0;
$nextIndex = count($LinkPointAPI_required[0]);
$LinkPointAPI_required[0][$nextIndex] = "merchantinfo->configfile";
$LinkPointAPI_required[1][$nextIndex] = "1216hidden";
$nextIndex = count($LinkPointAPI_required[0]);
$LinkPointAPI_required[0][$nextIndex] = "orderoptions->ordertype";
$LinkPointAPI_required[1][$nextIndex] = "SALE";
$nextIndex = count($LinkPointAPI_required[0]);
$LinkPointAPI_required[0][$nextIndex] = "orderoptions->result";
$LinkPointAPI_required[1][$nextIndex] = "LIVE";
$nextIndex = count($LinkPointAPI_required[0]);
$LinkPointAPI_required[0][$nextIndex] = "merchantinfo->keyfile";
$LinkPointAPI_required[1][$nextIndex] = "".realpath("../linkpoint/test.pem") ."";
$nextIndex = count($LinkPointAPI_required[0]);
$LinkPointAPI_required[0][$nextIndex] = "merchantinfo->host";
$LinkPointAPI_required[1][$nextIndex] = "staging.linkpt.net";
$nextIndex = count($LinkPointAPI_required[0]);
$LinkPointAPI_required[0][$nextIndex] = "merchantinfo->port";
$LinkPointAPI_required[1][$nextIndex] = "1129";

$LinkPointAPI_itemized[0][0] = "payment->chargetotal";
$LinkPointAPI_itemized[1][0] = "".$eCart1->GrandTotal() ."";
$LinkPointAPI_itemized[0][1] = "transactiondetails->oid";
$LinkPointAPI_itemized[1][1] = "".session_id() ."";
while ( !$eCart1->EOF() ) {
$nextIndex = count($LinkPointAPI_itemized[0]);
$LinkPointAPI_itemized[0][$nextIndex] = "id" . strval($cartIndex+1) . "";
$LinkPointAPI_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("ID") ."";
$nextIndex = count($LinkPointAPI_itemized[0]);
$LinkPointAPI_itemized[0][$nextIndex] = "description" . strval($cartIndex+1) . "";
$LinkPointAPI_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Name") ."";
$nextIndex = count($LinkPointAPI_itemized[0]);
$LinkPointAPI_itemized[0][$nextIndex] = "price" . strval($cartIndex+1) . "";
$LinkPointAPI_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Price") ."";
$nextIndex = count($LinkPointAPI_itemized[0]);
$LinkPointAPI_itemized[0][$nextIndex] = "quantity" . strval($cartIndex+1) . "";
$LinkPointAPI_itemized[1][$nextIndex] = "".$eCart1->DisplayInfo("Quantity") ."";

$eCart1->MoveNext();
$cartIndex ++;
}
$eCart1->MoveFirst();
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "payment->tax";
$LinkPointAPI_optional[1][$nextIndex] = "".$eCart1->GetTax() ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "payment->shipping";
$LinkPointAPI_optional[1][$nextIndex] = "".$eCart1->GetShipping() ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "payment->subtotal";
$LinkPointAPI_optional[1][$nextIndex] = "".($eCart1->TotalColumn("TotalPrice") - $eCart1->GetDiscounts()) ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->name";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["firstname"]))?$_POST["firstname"]:"") ." ".((isset($_POST["lastname"]))?$_POST["lastname"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "creditcard->cardnumber";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["cc_number"]))?$_POST["cc_number"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "creditcard->cardexpmonth";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["exp_month"]))?$_POST["exp_month"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "creditcard->cardexpyear";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["exp_year"]))?$_POST["exp_year"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "creditcard->cvmvalue";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["cvv"]))?$_POST["cvv"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->address1";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["street1"]))?$_POST["street1"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->address2";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["street2"]))?$_POST["street2"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->city";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["city"]))?$_POST["city"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->state";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["state_province"]))?$_POST["state_province"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->zip";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["postcode"]))?$_POST["postcode"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->country";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["country"]))?$_POST["country"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->phone";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["phone"]))?$_POST["phone"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->fax";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["fax"]))?$_POST["fax"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "billing->email";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["email"]))?$_POST["email"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->name";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["shipping_firstname"]))?$_POST["shipping_firstname"]:"") ." ".((isset($_POST["shipping_lastname"]))?$_POST["shipping_lastname"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->address1";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["shipping_street1"]))?$_POST["shipping_street1"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->address2";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["shipping_street2"]))?$_POST["shipping_street2"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->city";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["shipping_city"]))?$_POST["shipping_city"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->state";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["shipping_state_province"]))?$_POST["shipping_state_province"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->zip";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->country";
$LinkPointAPI_optional[1][$nextIndex] = "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->items";
$LinkPointAPI_optional[1][$nextIndex] = "".$eCart1->TotalColumn("Quantity") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->weight";
$LinkPointAPI_optional[1][$nextIndex] = "".$eCart1->TotalColumn("TotalWeight") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "shipping->total";
$LinkPointAPI_optional[1][$nextIndex] = "".$eCart1->TotalColumn("TotalPrice") ."";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "transactiondetails->taxexempt";
$LinkPointAPI_optional[1][$nextIndex] = "N";
$nextIndex = count($LinkPointAPI_optional[0]);
$LinkPointAPI_optional[0][$nextIndex] = "transactiondetails->terminaltype";
$LinkPointAPI_optional[1][$nextIndex] = "UNSPECIFIED";

Sign in to reply to this post

wilyumcj205276

$WAGatewayResponse = LinkPointAPI_Post($LinkPointAPI_required,$LinkPointAPI_itemized,$LinkPointAPI_optional);
if ($WAGatewayResponse) {
$eCart1->redirStr = "checkout_success.php";
}
else if ("checkout_failure.php" != "") {
header("Location: ". "checkout_failure.php");
exit();
}
}
?>
<?php require_once("WA_Universal_Email/mail_PHP.php"); ?>
<?php require_once("WA_Universal_Email/MailFormatting_PHP.php"); ?>
<?php
//WA eCart UPS Shipping Include
require_once("WA_eCart/WA_eCart_FedEx_PHP.php");
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
//WA eCart (Copyright 2007, WebAssist)
//WA eCart FedEx Shipping - FedEx
$Shipping_SuccessURL = "";
$Shipping_FailureURL = "shipping_failure.php";
$Shipping_Packaging = 0;
$Shipping_PackageArray = array();
$Shipping_PackageIndex = 0;
$Shipping_Counter = 0;
$Shipping_Parameters = array();
$Shipping_Parameters["ShiptoState"] = "".((isset($_POST["shipping_state_province"]))?$_POST["shipping_state_province"]:"") ."";
$Shipping_Parameters["ShiptoZip"] = "".((isset($_POST["shipping_postcode"]))?$_POST["shipping_postcode"]:"") ."";
$Shipping_Parameters["ShiptoCountry"] = "".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."";
$Shipping_Parameters["FedExAccount"] = "4598hidden";
$Shipping_Parameters["FedExMeter"] = "10161hidden";
$Shipping_Parameters["FedExServer"] = "https://gateway.fedex.com:443/GatewayDC";
$Shipping_Parameters["CarrierCode"] = "FDXG";
$Shipping_Parameters["FedExService"] = "FEDEXGROUND";
$Shipping_Parameters["FedExPickUp"] = "REGULARPICKUP";
$Shipping_Parameters["ReturnShipmentIndicator"] = "none";
$Shipping_Parameters["ShipperState"] = "GA";
$Shipping_Parameters["ShipperZip"] = "30312";
$Shipping_Parameters["ShipperCountry"] = "US";
while (($Shipping_Packaging == 1 && !$eCart1->EOF()) || ($Shipping_Packaging == 0 && $Shipping_Counter == 0)) {
if (WA_eCart_FedEx_IsTrueValue("true")) {
$Shipping_PackageArray[] = array();
$Shipping_PackageIndex = sizeof($Shipping_PackageArray)-1;
$Shipping_PackageArray[$Shipping_PackageIndex]["eCart_Quantity"] = (($Shipping_Packaging == 1)?$eCart1->DisplayInfo("Quantity"):1);
$Shipping_PackageArray[$Shipping_PackageIndex]["IsPackage"] = "true";
$Shipping_PackageArray[$Shipping_PackageIndex]["Quantity"] = "1";
$Shipping_PackageArray[$Shipping_PackageIndex]["DeclaredValue"] = "".$eCart1->DisplayInfo("Price") ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["WeightUnits"] = "".strtoupper($eCart1->WeightUnits)."S" ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".WA_eCart_FormatNumber($eCart1->TotalColumn('TotalWeight'), true, 1) ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "YOURPACKAGING";
$Shipping_PackageArray[$Shipping_PackageIndex]["SizeUnits"] = "IN";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageLength"] = "11";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWidth"] = "11";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageHeight"] = "11";
//Special Services
$Shipping_PackageArray[$Shipping_PackageIndex]["RESIDENTIALDELIVERY"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["RESIDENTIALPICKUP"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["INSIDEDELIVERY"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["INSIDEPICKUP"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["SATURDAYDELIVERY"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["SATURDAYPICKUP"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["HOLDATLOCATION"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["DRYICE"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["DANGEROUSGOODS"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["HOMEDELIVERYTYPE"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["SIGNATUREREQUIRED"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["AOD"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["AUTOPOD"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["NONSTANDARDPACKAGE"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["COD"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["CODCOLLECTAMOUNT"] = "";
$Shipping_PackageArray[$Shipping_PackageIndex]["CODCOLLECTTYPE"] = "";
}
$Shipping_Counter++;
if ($Shipping_Packaging == 1) $eCart1->MoveNext();
}
if ($Shipping_Packaging == 1) $eCart1->MoveFirst();
$Shipping_Result = WA_eCart_FedEx_GetRateQuote($eCart1, $Shipping_Parameters, $Shipping_PackageArray);
if ($Shipping_Result && $Shipping_SuccessURL != "")
$eCart1->redirStr = $Shipping_SuccessURL;
else if (!$Shipping_Result && $Shipping_FailureURL != "") {
Header("Location: " . $Shipping_FailureURL); exit;
}
}
else if (!isset($_SESSION["eCart1_FedEx_Success"])) {
WA_eCart_FedEx_SetSessionDefaults($eCart1);
}
?>
<?php
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {
//WA Universal Email object="mail"
//Send Loop Once Per Entry
$RecipientEmail = "".((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ." ".((isset($_SESSION["eCartCheckoutForm_lastname"]))?$_SESSION["eCartCheckoutForm_lastname"]:"") ."|WA|".((isset($_SESSION["eCartCheckoutForm_email"]))?$_SESSION["eCartCheckoutForm_email"]:"") ."";include("WA_Universal_Email/WAUE_confirm_1.php");

//Send Mail All Entries
if (""!="") {
header("Location: ");
}
}
?>
<?php
// WA eCart Store Cart Summary in Db
if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) // Trigger
{
$WA_connection = $connStore;
$WA_table = "orders";
$WA_redirectURL = "";
$WA_indexField = "OrderCountry";
$WA_fieldNamesStr = "OrderID|OrderAmount|OrderShipName|OrderShipAddress|OrderShipAddress2|OrderCity|OrderState|OrderZip|OrderCountry|OrderPhone|OrderFax|OrderShipping|OrderTax|OrderEmail|OrderDate";
$WA_fieldValuesStr = WA_eCDB_ConvertNumber("".((isset($_POST["shipping_country"]))?$_POST["shipping_country"]:"") ."") . "|" . WA_eCDB_ConvertNumber("".$eCart1->GrandTotal() ."") . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_firstname'])?$_SESSION['eCartCheckoutForm_shipping_firstname']:$_SESSION['eCartCheckoutForm_firstname']) ." ".(isset($_SESSION['eCartCheckoutForm_shipping_lastname'])?$_SESSION['eCartCheckoutForm_shipping_lastname']:$_SESSION['eCartCheckoutForm_lastname']) ."" . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_street1'])?$_SESSION['eCartCheckoutForm_shipping_street1']:$_SESSION['eCartCheckoutForm_street1']) ."" . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_street2'])?$_SESSION['eCartCheckoutForm_shipping_street2']:$_SESSION['eCartCheckoutForm_street2']) ."" . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_city'])?$_SESSION['eCartCheckoutForm_shipping_city']:$_SESSION['eCartCheckoutForm_city']) ."" . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_state_province'])?$_SESSION['eCartCheckoutForm_shipping_state_province']:$_SESSION['eCartCheckoutForm_state_province']) ."" . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_postcode'])?$_SESSION['eCartCheckoutForm_shipping_postcode']:$_SESSION['eCartCheckoutForm_postcode']) ."" . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_country'])?$_SESSION['eCartCheckoutForm_shipping_country']:$_SESSION['eCartCheckoutForm_country']) ."" . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_phone'])?$_SESSION['eCartCheckoutForm_shipping_phone']:$_SESSION['eCartCheckoutForm_phone']) ."" . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_fax'])?$_SESSION['eCartCheckoutForm_shipping_fax']:$_SESSION['eCartCheckoutForm_fax']) ."" . "|" . WA_eCDB_ConvertNumber("".$eCart1->GetShipping() ."") . "|" . WA_eCDB_ConvertNumber("".$eCart1->GetTax() ."") . "|" . "".(isset($_SESSION['eCartCheckoutForm_shipping_email'])?$_SESSION['eCartCheckoutForm_shipping_email']:$_SESSION['eCartCheckoutForm_email']) ."" . "|" . "".(date('Y-m-d h:i:s')) ."";
$WA_columnTypesStr = "none,none,NULL|none,none,NULL|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|',none,''|none,none,NULL|none,none,NULL|',none,''|',none,''";
$WA_sessionName = "eCart1_OrderID";
$WA_Sql = "";
$NeedInsert = false;
$indexFieldIndex = -1;
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_connStore;
$updateFieldValue = "";
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
if ($WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos('?', $WA_redirectURL) === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
for ($i = 0; $i < sizeof($WA_fieldNames); $i++)
{
if ($WA_indexField == $WA_fieldNames[$i])
{
$indexFieldIndex = $i;
break;

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...