Solved

Authorize.Net

Posted on 2011-03-16
5
783 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

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

0
 
LVL 14

Author Comment

by:RickEpnet
ID: 35153335
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
ID: 35153381
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
ID: 35153422
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
ID: 35156080
Although this was not complete it did lead me in the right direction. Basically I switched methods to AIM.
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

696 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