Search code examples
phpfedex

Could any one explain What is FEDEX ACC # and Meter # in FEDEX Integration


ship file is:


include('fedexdc.php');

// create new fedex object
//$fed = new FedExDC('FedEx ACC #','Meter #');
$fed = new FedExDC('...','...'); // removed possible personal data

$ship_data = array(
75=> 'LBS'
,16=> 'Ma'
,13=> ''
,5=> ''
,1273=> '01'
,1274=> '01'
,18=> ''
,15=> 'Boston'
,23=> '1'
,9=> '02134'
,183=> ''
,8=> 'MA'
,117=> 'US'
,17=> ''
,50=> 'US'
,4=> 'Vermonster LLC'
,7=> 'Boston'
,1369=> '1'
,12=> ''
,1333=> '1'
,1401=> '1.0'
,116 => 1
,68 => 'USD'
,1368 => 1
,1369 => 1
,1370 => 5
,3025 => 'FDXG' // This I have added
);

// Ship example
$ship_Ret = $fed->ship_express($ship_data);

if ($error = $fed->getError()) {
echo "ERROR :". $error;
} else {
// Save the label to disk
$fed->label('mylabel.png');

}


/* tracking example

$track_Ret = $fed->track(
array(
29 => 790344664540,
));

*/



echo $fed->debug_str. "\n<BR>";
echo "Price ".$ship_Ret[1419];

Could any one explain What is FEDEX ACC # and Meter #

Any help will appreciable...

Thanks in Advance

Fero


Solution

  • What about adding something like this to your _sendCurl() function :

    curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); 
    

    After the call to curl_init, and before curl_exec -- should be the easiest way to get rid of that kind of error ; even if probably not the most secure one...

    This article might be a good read : Curl: SSL certificate problem, verify that the CA cert is OK : it explains why the error, and also gives some explanations on the kind of security risk the two lines I posted imply -- and also gives some probably safer solution.