Friday, 23 August 2013

Need Help for Cold Fusion SessionToken and AIM for Authorize.net

Need Help for Cold Fusion SessionToken and AIM for Authorize.net

I am trying to solve a problem that occurs with Authorize.net. The
SessionToken is generated while in test mode through a test account. Now,
a new SessionToken is generated each time the form is previewed through
the test account or the actual account.
A hidden input field is shown each time when the form is accessed in
preview mode. I have generated a hidden input field on my form by using a
toBase64() string combined from the x_login and the x_tran_key. The output
is this: in the forms hidden input field for SessionToken as you can see
above.
When generating my own SessionToken for processing, the error shown after
trying to process the https://test.authorize.net/gateway/transact.dll
shows this: (46) Your session has expired or does not exist. You must log
in again to continue working.
The only way for the form to actually work is after grabbing the
SessionToken code from the form in preview mode. For example: Go to
Account --> Settings --> Payment Form --> Preview --> and viewing and
copying the code from view frame source. It looks like this:
Finally, if I use the value:
jMsCez2DId$VvgF4s4Hbjbe$Uv6WnJh8cEKBD5HqTUEqlHoRBebKZ07bp4RZdpwOPnGabB3pbcWFppJCph7dg6HjQeroJvlay6mQm5ocjkZPq44uT4nqeg2zWhX13b7Blp$qN7ZDzQ5HF1abfukJTQAA
as the SessionToken as
and process the form it works. But it only works one time for the current
session if signed into the Test Account.
All help is appreciated of course. This is the last part to the code I
need and just can not figure out how to make it work. I need to fetch the
response for the SessionToken to populate the SessionToken hidden field
input on the form.
I am not using the CFHTTP method because the form is on the website and
when the payment form loads the SessionToken is needed. Meaning that the
submit/sending... button on the form is submitted it then processes the
payment and displays the receipt.

No comments:

Post a Comment