jeanjerome
01-16-2004, 08:47 PM
As anyone successfuly implemented realtime Fedex shipping rate calculation using perl using Business::FedEx::DirectConnect or something else like that?
I can't seem to make it work. I am suppose to send FedEx a Subscription Transaction but it won work and keep asking me for the meter number (which I am suppose to get with subscription transaction!):
use Business::FedEx::DirectConnect;
print "Content-type: text/html\n\n";
my $t = Business::FedEx::DirectConnect->new(uri=>'https://gateway.fedex.com/GatewayDC'
,acc => '245075844' #FedEx Account Number
,meter => '' #FedEx Meter Number (This is given after you subscribe to FedEx)
,referer => 'XYZ Inc.'# Name or Company
,host=> 'gateway.fedex.com' #Host
,Debug => 1
);
$t->set_data(3003,
1 => '123456789asa',
4003 => 'John Doe',
4008 => '123 Main St',
4011 => 'Boston',
4012 => 'MA',
4013 => '02116',
4014 => 'US',
4015 => '6175551111',
) or die $t->errstr;
print "<br>result: ".$t->lookup(498);
If you have some working perl code to get Fedex shipping rate, I would be intrested too (free or inexpensive)!
Thanks.
Jean
I can't seem to make it work. I am suppose to send FedEx a Subscription Transaction but it won work and keep asking me for the meter number (which I am suppose to get with subscription transaction!):
use Business::FedEx::DirectConnect;
print "Content-type: text/html\n\n";
my $t = Business::FedEx::DirectConnect->new(uri=>'https://gateway.fedex.com/GatewayDC'
,acc => '245075844' #FedEx Account Number
,meter => '' #FedEx Meter Number (This is given after you subscribe to FedEx)
,referer => 'XYZ Inc.'# Name or Company
,host=> 'gateway.fedex.com' #Host
,Debug => 1
);
$t->set_data(3003,
1 => '123456789asa',
4003 => 'John Doe',
4008 => '123 Main St',
4011 => 'Boston',
4012 => 'MA',
4013 => '02116',
4014 => 'US',
4015 => '6175551111',
) or die $t->errstr;
print "<br>result: ".$t->lookup(498);
If you have some working perl code to get Fedex shipping rate, I would be intrested too (free or inexpensive)!
Thanks.
Jean
