Solved

Authorize.Net

Posted on 2011-03-16
5
773 Views
Last Modified: 2012-05-11
Below you will find my code.
I am using Coldfusion. My Error is

X_RESPONSE_CODE 3
X_RESPONSE_REASON_CODE 97

Error code 97 says this
Applicable only to SIM API. Fingerprints are only valid for a short period of time. This code indicates that the transaction fingerprint has expired.
<cfset timestamp=DateDiff("s", "January 1 1970 00:00", DateConvert('local2UTC', Now())) >
<cfset x_exp_date = Month & Year>
<cfset loginID = "XXXXXXXXXXX">
<cfset sequence = orderHeader.orderid>
<cfset amount = orderHeader.total>
<cfset transactionKey = "XXXXXXXXXXXXXXXX">
<cf_hmac data="#loginID#^#sequence#^#timestamp#^#amount#^" key="#transactionKey#">
<cfset fingerprint=#digest#> 


Post Submitted

<CFHTTP URL="https://test.authorize.net/gateway/transact.dll" method="post" delimiter="," resolveurl="yes" redirect="yes">
<cfhttpparam type="formfield" name="x_card_code" value="#x_card_code#">
<cfhttpparam type="formfield" name="x_exp_date" value="#x_exp_date#">
<cfhttpparam type="formfield" name="x_card_num" value="#x_card_num#">
<cfhttpparam type="formfield" name="X_ADDRESS" value="#orderHeader.address#">
<cfhttpparam type="formfield" name="X_CITY" value="#orderHeader.city#">
<cfhttpparam type="formfield" name="X_STATE" value="#orderHeader.st#">
<cfhttpparam type="formfield" name="X_ZIP" value="#orderHeader.zip#">
<cfhttpparam type="formfield" name="x_amount" value="#amount#">
<cfhttpparam type="formfield" name="x_freight" value="#orderHeader.fright#">
<cfhttpparam type="formfield" name="x_tax" value="#orderHeader.tax#">
<cfhttpparam type="formfield" name="x_invoice_num" value="#orderHeader.orderid#">
<cfhttpparam type="formfield" name="x_tax" value="#orderHeader.tax#">
<cfhttpparam type="formfield" name="x_relay_response" value="TRUE">
<cfhttpparam type="formfield" name="x_relay_url" value="https://www.xxxxxxx.com/payment/paymentresp.cfm">
<cfhttpparam type="formfield" name="x_login" value="#loginID#">
<cfhttpparam type="formfield" name="x_fp_sequence" value="#sequence#">
<cfhttpparam type="formfield" name="x_fp_timestamp" value="#timestamp#">
<cfhttpparam type="formfield" name="x_fp_hash" value="#fingerprint#">
<cfhttpparam type="formfield" name="x_version" value="3.1">
<cfhttpparam type="formfield" name="x_method" value="CC">
<cfhttpparam type="formfield" name="x_type" value="AUTH_CAPTURE">
<cfhttpparam type="formfield" name="x_test_request" value="FALSE">
<cfhttpparam type="formfield" name="x_transml" value="#oid#">
</cfhttp>

Open in new window

0
Comment
Question by:RickEpnet
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:gdemaria
Comment Utility
seems to be an error returned by authorize.net indicating that your session had expired

0
 
LVL 14

Author Comment

by:RickEpnet
Comment Utility
Ok I do not think it is that but I am willing to try. How do I fix that? The transaction happens in less that 5 sec.
0
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
Comment Utility
http://developer.authorize.net/tools/responsecode97/


Response Code 97 indicates that the transaction fingerprint created to authenticate a Simple Integration Method (SIM) transaction has expired. This error is received when the timestamp value submitted in x_fp_timestamp is either 15 minutes ahead, or 15 minutes behind in Greenwich Mean Time (GMT) (this is the equivalent of 900 seconds ahead or 900 seconds behind in Coordinated Universal Time, or UTC).

The Response Code 97 troubleshooting tool validates whether the value you submitted to Authorize.Net for x_fp_timestamp is a valid timestamp. Valid timestamps must be formatted in UTC, which is the number of seconds since 12 AM, January 1, 1970.

To troubleshoot a Response Code 97, check the following:

Verify that the time on the Web server that hosts the SIM script is configured correctly to the GMT time zone. You can also modify the SIM script to format UTC.
If you are having consistent problems with your timestamp, make sure that the Web server that hosts your SIM script employs a Network Time Protocol (NTP) to regularly update the time.
Be sure to account for daylight savings time.
0
 
LVL 14

Author Comment

by:RickEpnet
Comment Utility
Ok I tested something but it does not make any sense to me why it worked.

See my script below. This should convert my time to UTC time yet it does not. If I add 3600 Sec to it (1 hour) it works. My server has the correct time I checked. It has the correct time even for daylight savings time. The server has the exact right time it gets it time from 2.north-america.pool.ntp.org and 1.north-america.pool.ntp.org.

Why would it be an hour off.
<cfset timestamp=DateDiff("s", "January 1 1970 00:00", DateConvert('local2UTC', Now())) >

Open in new window

0
 
LVL 14

Author Closing Comment

by:RickEpnet
Comment Utility
Although this was not complete it did lead me in the right direction. Basically I switched methods to AIM.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now