Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#26 11-10-2006 08:48:48

jclanin
Member
From: Atlanta, GA
Registered: 05-05-2004
Posts: 164
Website

Re: Ups Webapi Problems

webmaster wrote:

A way to see what is going on is presented below.  In the file ./cgi-bin/library/modules/ste_ship.pl in the routine 'ste_ship_rate_upswebapi_proc' look for:

Code:

my $response = $ua->request($req);

And right below it, add:

Code:

print <<ENDOFTEXT;

<PRE>

Info Sent to UPS:

$field_agreeacc => $agreeacc,
$field_action => $action,
$field_service => $service_name,
$field_ziporigin => $orig_postalzip,
$field_zipdest => $dest_postalzip,
$field_pounds => $weight,
$field_country => $dest_countrycode,
$field_length => $length,
$field_width => $width,
$field_height => $height

</PRE>

ENDOFTEXT

Then, right below:

Code:

my @reply_array = split (/\%/, $reply);

Add:

Code:

print "<PRE>\n\n";
print "Info Sent From UPS\n\n";

foreach $line(@reply_array) {print "$line\n";}

print "\n</PRE>\n\n";

This will tell you what's being sent & sent back for all UPS Web API calls.  Perhpas this will help pinpoint the issue.

When I plug-in this code where am I supposed to see the results?

--JC


Jim Clanin

Offline

 

#27 11-10-2006 11:33:27

csherwood123
Member
Registered: 10-22-2002
Posts: 235

Re: Ups Webapi Problems

John,

In your example of UPS rate quotes, did you LOG IN to your UPS account online or did you simply submit the info as John. Q. Public? The reason I ask is because the rates returned via the API should reflect any discounts you get on your UPS account. If you didn't log in on the UPS site when you retrieved your sample data, you would have been given standard retail rates (and not your specific discounted rates). If that's true, of course the API rates are going to be lower.

Offline

 

Board footer