[ic] Error during creation of order routing log [PROBLEM SOLVED]

Kevin Old interchange-users@icdevgroup.org
Tue Mar 11 12:14:01 2003


On Mon, 2003-03-10 at 17:08, Kevin Old wrote:
> Hello everyone,
> 
> I'm having trouble with the log Route that is suppose to put the
> transaction in the database.  I'm running IC 4.9.6 and Postgresql 7.1. 
> I am using the iTransact module for transactions.  Even with these
> errors the transaction makes it to iTransact, and generates the email
> from the route copy_user, and displays the proper receipt.html page. 
> This is what I'm getting in the error.log:
> 
> 172.16.8.14 d6IV2s7e:172.16.8.14 - [10/March/2003:16:32:33 -0500]
> entermagicdev /cgi-bin/entermagicdev/process.html Route log failed.
> 172.16.8.14 d6IV2s7e:172.16.8.14 - [10/March/2003:16:32:33 -0500]
> entermagicdev /cgi-bin/entermagicdev/process.html ERRORS on ORDER
> TEST0017:
> > Error during creation of order routing log:
> > Route log failed. at /usr/local/interchange/lib/Vend/Order.pm line
> 1735.
> 
> Line 1735 is the closing brace...but I thought it might be referring to
> the above it:
> 
>         else {
>                 $cart = $Vend::Items;
>         }
> 
> How can I go about seeing what is being passed to the log route?  Anyone
> have any similar problems?
> 
> Any help is appreciated,
> Kevin

Hello everyone,

Well, I've finally fixed it!!!!  I started searching the archives (for
the millionth time) and came across two posts that say that Postgresql
7.2.1 doesn't truncate fields anymore and that you have to force it
too.  
http://www.icdevgroup.org/pipermail/interchange-users/2002-July/022861.html
http://www.icdevgroup.org/pipermail/interchange-users/2002-August/025037.html


I didn't use the code they have in the posts, though.

To solve the problem, I turned on Debugging and set DataTrace to 1 in my
/usr/local/interchange/interchange.cfg file.

Then I tested a transaction while doing a "tail -f /tmp/icdebug" and
searched for the INSERT statement.  It showed the errors there and I
just adjusted my table accordingly.  In my case the string "Real-time
Credit Card (mc -- itransact)" couldn't fit into the payment_method
field as it is only set varchar(32).  I changed it to varchar(64).  

I've found that this won't happen if you're not using one of the Payment
gateways (iTransact, AuthorizeNet, etc) as what's written to that field
is "Credit Card (mc)".

Another option is to change the line in profiles.order under the
credit_card profile: 

&set=mv_payment Real-time Credit Card (%c -- [var MV_PAYMENT_MODE])

Hope this helps someone!

Kevin

-- 
Kevin Old <kold@carolina.rr.com>