Receiver token generated only 50% of attempts

2 views
Skip to first unread message

Jesse

unread,
Aug 30, 2009, 5:49:20 AM8/30/09
to Remit
Please see line 32. This only works half the time. It's very
puzzling to me. I'm tempted to run it through a loop until it makes
the receiver token, but I fear that it might sprawl. Can you help?

Jesse

unread,
Aug 30, 2009, 5:50:44 AM8/30/09
to Remit

Jesse

unread,
Aug 31, 2009, 4:40:28 PM8/31/09
to Remit
I'm having much better luck with this:
:caller_reference => "#{Time.now.to_i + rand(1000)}"

rather than:
:caller_reference => Time.now.to_i.to_s

Bruz

unread,
Sep 1, 2009, 9:53:19 AM9/1/09
to Remit
Glad to hear you found a workaround for this. Is there a reason why
you need to generate the caller and recipient tokens every time? I
just generated these once and then put them in my application
settings. I'm just wondering if Amazon is giving you trouble because
you're generating a bunch of nearly identical tokens.

Jesse

unread,
Sep 1, 2009, 10:42:53 AM9/1/09
to Remit
You generate the tokens on initialize? I haven't had a problem since
changing the :caller_reference

Bruz Marzolf

unread,
Sep 1, 2009, 10:55:42 AM9/1/09
to re...@googlegroups.com
I actually just generated the tokens once in irb and then stored them
in my app settings, so all my FPS calls have used the exact same
tokens. I don't think it matters too much if you use the same tokens
all the time or generate new ones though, aside from the issues you
had getting them to generate.
Reply all
Reply to author
Forward
0 new messages