FEDEX Response parsing errors
I have had a couple sites using the fedex calculator having shipping fail recently.
In looking at the response from fedex, it looked like a rate was sent, but eCart was not properly parsing the response.
I am using 5.06, so the most current release.
After a couple hours of tweaking and trying a few things, it looks like the xml structure has changed slightly?
To get a successful response, I had to change line 334 from
$respCode = (isset($WA_FedEx_params["V10:SEVERITY"]) && ($WA_FedEx_params["V10:SEVERITY"] == "SUCCESS")?1:0);
to
$respCode = (isset($WA_FedEx_params["V10:NOTIFICATIONS"]["V10:SEVERITY"]) && ($WA_FedEx_params["V10:NOTIFICATIONS"]["V10:SEVERITY"] == "SUCCESS")?1:0);
(severity was nested inside the notifications node)
and to get the rate, I had to change line 353 from
$_SESSION[$FedEx_eCart->CartName . "_FedEx" . "_Quote"] += ($WA_FedEx_params["V10:RATEDSHIPMENTDETAILS"]["V10:SHIPMENTRATEDETAIL"]["V10:TOTALNETCHARGE"]["V10:AMOUNT"]);
to
$_SESSION[$FedEx_eCart->CartName . "_FedEx" . "_Quote"] += ($WA_FedEx_params["V10:RATEREPLYDETAILS"]["V10:RATEDSHIPMENTDETAILS"]["V10:SHIPMENTRATEDETAIL"]["V10:TOTALNETCHARGE"]["V10:AMOUNT"]);
The amount was nested inside the RATEREPLYDETAILS node.
Is anyone else experiencing this?
Tom