Jump to content

Recommended Posts

This link is for the fedex api to integrate the  below php class.

https://www.fedex.com/cgi-bin/shipapiDownload.cgi?link=4&first=y

 

This link is for the php class.

http://freshmeat.net/projects/fedexdc/

 

 

Ok mate, I read all the information and got the links you need, according to fedex the best,

way foward is to install there api and then use a class to controll the api.

 

I have provided the links for the programs needed.

 

The api is a server program that fedex has designed for users to get there orders.

 

If you want to setup a online store with using there fedex service you must install the fedex

aplication as provided above then use the php class as provided above to talk to the fedex aplication to take orders.

 

good luck sounds even easer then paypal.

Thanks redarrow for the reply.

Infact I have downloaded the code written by the same author that is provided in link that you had given.

I downloaded the documents from fedex website also. i got the entire tag documentation. But here I got struccked every time- please see the below code-

 

 

I have to provide the calculation for both domestic and International with the following options-

 

For Us Domestic I have to provide- 1) FedEx Ground 2) FedEx 2 day express 3) FedEx Overnight Express.

 

 

 

And for International – 1) International Priority Express

 

                                2) International Economy.

 

 

 

Here is the code

 

 

include('fedexdc.php');// This is the class file which does the linking to FedEx and calculation

 

 

if ($_POST['uSubmit']!=""){

 

            // create new fedex object

 

            $fed = new FedExDC('342464483','0');// I have not yet get the meter number

 

            $sType = $_POST['sType'];

 

            $ship_data = array(

 

                        75=>  'LBS'

 

                        ,16=>  'Ma'

 

                        ,13=>  '44 Main street'

 

                        ,5=>    '312 stuart st'

 

                        ,1273=> '01'

 

                        ,1274=> '01'

 

                        ,18=>  '6173335555'

 

                        ,15=>  'Boston'

 

                        ,23=>  '1'

 

                        ,9=>    '02134'

 

                        ,183=>  '6175556985'

 

                        ,8=>    'MA'

 

                        ,117=>  'US'

 

                        ,17=>  '02116'

 

                        ,50=>  'US'

 

                        ,4=>    'Vermonster LLC'

 

                        ,7=>    'Boston'

 

                        ,1369=> '1'

 

                        ,12=>  'Jay Powers'

 

                        ,1333=> '1'

 

                        ,1401=> '1.0'

 

                        ,116 => 1

 

                        ,68 =>  'USD'

 

                        ,1368 => 1

 

                        ,1369 => 1

 

                        ,1370 => 5

 

                        ,3025 => $sType // This I have added and here is the problem what should I add for other options

 

            );

 

         

 

            // 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];

 

 

 

 

 

?>

Below is the html User Interface

<table>

 

<form method="post" action="">

 

<tr>

 

<td>US Customers :</td>

 

<td>  </td>

 

<td><input type="radio" name="sType" value="FDXG">  Fedex Ground</td>

 

</tr>

 

<tr>

 

<td>  </td>

 

<td>  </td>

 

<td><input type="radio" name="sType" value="">  Fedex 2 Day Express</td>

 

</tr>

 

<tr>

 

<td>  </td>

 

<td>  </td>

 

<td><input type="radio" name="sType" value="FDXE">  Fedex Overnight Express</td>

 

</tr>

 

<tr>

 

<td>International Customers :</td>

 

<td>  </td>

 

<td><input type="radio" name="sType" value="">  International Priority Express</td>

 

</tr>

 

<tr>

 

<td>  </td>

 

<td>  </td>

 

<td><input type="radio" name="sType" value="">  International Economy</td>

 

</tr>

 

 

 

<tr>

 

<td>

 

<input type="submit" name="uSubmit" value="Calculate">

 

</td>

 

</tr> FDXE/FDXG

 

</form>

 

</table>

 

Here in the above code I have given radio button values FDXG and FDXE for FedEx ground and over night express. I am not able to understand what value I shall pass for the other radio buttons. From the PDF documentation I do not really understand what value I shall use for tag field 3025 for all the above options.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.