Transfer and Google Checkout Order Numbers

4 views
Skip to first unread message

gabriel

unread,
Nov 18, 2009, 8:53:30 PM11/18/09
to transfer-dev
A. Problem

I'm currently working with Google Checkout order numbers and they're
being turned into, well, whatever that's called (scientific
notation? ) when I output the memento in the view.

Order Number in databse: 519517672080148
Memento Value: 5.1951767208E+014

Database Colum Type: Bigint
Transfer data type: "numeric"

B. Analysis

From what I've found so far the problem may be related to the
precision of floats in Coldfusion, java, and/or Sql Server.

I think that I should be able to use strings (fingers crossed) as the
data type as a worst case workaround but I'm trying to understand more
about why it's doing this and how others have dealt with Google
Checkout order numbers or larger numbers in general with Transfer. Any
2 cents are appreciated.

C. Setup

Transfer: Pluggable Cache SVN
CFML: CF9
OS: Windows
DB: SQL Server 2005

Thank you,
Gabriel

Mark Mandel

unread,
Nov 18, 2009, 8:58:42 PM11/18/09
to transf...@googlegroups.com
Why are you using the memento?

Just do a getValue() from the object.

Then if you need to format it - decorate that method with whatever numeric formatting you need.

Mark


--
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To post to this group, send email to transf...@googlegroups.com
To unsubscribe from this group, send email to transfer-dev...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en



--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

Dorioo

unread,
Nov 18, 2009, 9:12:30 PM11/18/09
to transf...@googlegroups.com
I just referenced the memento but calling getOrderNumber() gives me
the same funky value.

For example, the value is coming in from the URL, passed to a
'get(URL.orderNumber)' function, and the desired trasnfer object is
returned. But TO.getOrderNumber() or TO.getMemento() returns the funky
value.

- Gabriel

Mark Mandel

unread,
Nov 18, 2009, 9:16:14 PM11/18/09
to transf...@googlegroups.com
That's how ColdFusion handles large numbers. Any reason why you can't use numberFormat() to display it nicely?

Mark

Dorioo

unread,
Nov 18, 2009, 9:44:03 PM11/18/09
to transf...@googlegroups.com
Thank you, Mark. numberFormat() turns it into what I expect.

I didn't know it was still a number behind the scenes and that
coldfusion just displays them like that. Thank you for the knowledge
and help.

- Gabriel
Reply all
Reply to author
Forward
0 new messages