cancel
Showing results for 
Search instead for 
Did you mean: 

(97) This transaction cannot be accepted. SIM API.

Hi. Does someone have some time to advise me, please? I'm getting a (97) This transaction cannot be accepted." I do not have SSL, so I am using the SIM API.

 

I am using the sample SIM code. I run it, and get this (97) error. I have been reading that the fingerprint has expired.

 

My server is in the Pacific Coast USA time zone -- 7 hours behind GMT.

 

How can I make sure the fingerprint stays current?

 

I repeat the sample code, below. Thank you for your advice.

 

best from Eric

 

<cfsetting enablecfoutputonly="true">
<cfoutput>
<!--
This sample code is designed to connect to Authorize.net using the SIM method.
For API documentation or additional sample code, please visit:
http://developer.authorize.net

Most of this page below (and including) this comment can be modified using any
standard html. The parts of the page that cannot be modified are noted in the
comments.  This file can be renamed as long as the file extension remains .cfm
-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<HTML lang='en'>
<HEAD>
    <TITLE> Sample SIM Implementation </TITLE>
</HEAD>
<BODY>


<!-- This section generates the "Submit Payment" button using Coldfusion     -->
</cfoutput>
<!--- the parameters for the payment can be configured here --->
<!--- the API Login ID and Transaction Key must be replaced with valid values --->
<cfset loginID="xxxxxxxx">
<cfset transactionKey="yyyyyyy">
<cfset amount="19.99">
<cfset description="Sample Transaction">
<cfset label="Submit Payment"> <!--- This is the label on the 'submit' button --->
<cfset testMode="false">


<cfset posturl="https://secure.authorize.net/gateway/transact.dll">

<!--- If an amount or description were posted to this page, the defaults are overidden --->
<cfif IsDefined("FORM.amount")>
  <cfset amount=FORM.amount>
</cfif>
<cfif IsDefined("FORM.description")>
  <cfset description=FORM.description>
</cfif>
<!--- also check to see if the amount or description were sent using the GET method --->
<cfif IsDefined("URL.amount")>
  <cfset amount=URL.amount>
</cfif>
<cfif IsDefined("URL.description")>
  <cfset description=URL.description>
</cfif>

<!--- an invoice is generated using the date and time --->
<cfset invoice=DateFormat(Now(),"yyyymmdd") & TimeFormat(Now(),"HHmmss")>

<!--- a sequence number is randomly generated --->
<cfset sequence=RandRange(1, 1000)>

<!--- a timestamp is generated --->
<cfset timestamp=DateDiff("s", "January 1 1970 00:00", DateConvert('local2UTC', Now())) >

<!--- The following lines generate the SIM fingerprint --->

<cf_hmac data="#loginID#^#sequence#^#timestamp#^#amount#^" key="#transactionKey#">

<cfset fingerprint=#digest#>

<cfoutput>

<!--- Print the Amount and Description to the screen.--->
Amount: #amount# <br />
Description: #description# <br />

<!--- Create the HTML form containing necessary SIM post values --->
<FORM method='post' action='#posturl#' >
<!--- Additional fields can be added here as outlined in the SIM integration
guide at http://developer.authorize.net --->
<INPUT type='hidden' name='x_login' value='#loginID#' />
    <INPUT type='hidden' name='x_amount' value='#amount#' />
    <INPUT type='hidden' name='x_description' value='#description#' />
    <INPUT type='hidden' name='x_invoice_num' value='#invoice#' />
    <INPUT type='hidden' name='x_fp_sequence' value='#sequence#' />
    <INPUT type='hidden' name='x_fp_timestamp' value='#timeStamp#' />
    <INPUT type='hidden' name='x_fp_hash' value='#fingerprint#' />
    <INPUT type='hidden' name='x_test_request' value='#testMode#' />
    <INPUT type='hidden' name='x_show_form' value='PAYMENT_FORM' />
    <input type='submit' value='#label#' />
</FORM>
<!-- This is the end of the code generating the "submit payment" button.    -->

</BODY>
</HTML>
<!-- The last line is a necessary part of the coldfusion script -->
</cfoutput>

EricBourland
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

I solved this (97) error by editing the jvm.config file on my Windows server. I changed the timezone to GMT:

 

# Arguments to VM
java.args=-server -Xmx512m -XX:MaxPermSize=192m -XX:+UseParallelGC -Duser.timezone=GMT -Dsun.io.useCanonCaches=false -Xbatch -Dcoldfusion.rootDir={application.home}/../ -Djava.security.policy={application.home}/../lib/coldfusion.policy -Djava.security.auth.policy={application.home}/../lib/neo_jaas.policy -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/cfform/jars,{application.home}/../wwwroot/WEB-INF/flex/jars -Dcoldfusion.libPath={application.home}/../lib

 

I was not able to solve the problem in the code. But this workaround seems OK.

 

Thanks very much for your help. I really appreciate your time.

 

Eric

View solution in original post

EricBourland
Contributor
8 REPLIES 8

I have been working on this (97) problem for a few days now. The problem has stopped the entire project. I could use some help. =)

I think the problem is still a mismatch between the time reported from the server, and the UTC time that authorize.net expects.

 

I know that authorize.net expects the timestamp to be reported in seconds, as a difference from the number of seconds elapsed since January 1, 1970.

 

I wonder -- does anyone have an example that I can follow?

 

If my server reports a timestamp of 08/14/2014 04:52 PM in Eastern daylight time, the current UTC/GMT would be 08/14/2014 08:52 PM.

 

What value in seconds would authorize.net expect to receive, if the server that submits a request to authorize.net is on USA EST?

Thank you again for any advice.

 

best from Eric

 

 

EricBourland
Contributor

Have you use the http://developer.authorize.net/tools/responsecode97/ tool to see how different the # is?

Thanks for this reply!

I have seen that tool -- but am not sure how to derive a timestamp value in units of seconds to enter into that field.

 

In the past, how have you arrived at this value to enter into this field?

Thanks again for your help. =) Really grateful.

 

Eric

  <INPUT type='hidden' name='x_fp_timestamp' value='#timeStamp#' />

That the value that you will put in to the test to see the time is.

I got these results:

 

http://nnvawi.org/test.cfm

 

Amount: 19.99
Description: Sample Transaction
Timestamp: 1408119798

 

That's useful information. Next, in the Response Code 97 Tool, I get these results:

 

Your timestamp = 1408119798 seconds.
The Authorize.Net system timestamp is 1408123416 seconds.
The difference is -3618 seconds.

 

So, I am looking at some way to offset the difference of -3618 seconds, which must be what is causing this (97) error.

 

Are you aware of any ColdFusion sample code that would allow me to do this?

 

I am trying different things with the DateDiff and DateConvert functions for variable #timestamp#.

 

I really appreciate your help.

 

Eric

That is helpful!

I am still struggling with this (97) error after several days of troubleshooting. I am trying a few more ideas this evening.

 

I'll let you know how I fare. Thank you again for your time and help.

 

Best from Eric

I solved this (97) error by editing the jvm.config file on my Windows server. I changed the timezone to GMT:

 

# Arguments to VM
java.args=-server -Xmx512m -XX:MaxPermSize=192m -XX:+UseParallelGC -Duser.timezone=GMT -Dsun.io.useCanonCaches=false -Xbatch -Dcoldfusion.rootDir={application.home}/../ -Djava.security.policy={application.home}/../lib/coldfusion.policy -Djava.security.auth.policy={application.home}/../lib/neo_jaas.policy -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/cfform/jars,{application.home}/../wwwroot/WEB-INF/flex/jars -Dcoldfusion.libPath={application.home}/../lib

 

I was not able to solve the problem in the code. But this workaround seems OK.

 

Thanks very much for your help. I really appreciate your time.

 

Eric

EricBourland
Contributor