Get Authorize.Net transaction detail with the refId - authorize.net

I am passing the order id from my website to the Authorize.Net as refid but when i try to get the transaction by passing refid in getTransactionDetailsRequest method then it is not recognizable.

If you read the documentation you will see you cannot retrieve transaction information using the refId value. You must pass the transaction ID to successfully retrieve a transactions. Passing the refId:
If included in the request, this value is included in the response. This feature might be especially useful for multi-threaded applications.
But it cannot be using in place of a transaction ID.

Related

How to refund transaction via VBA with Authorize.net?

I'm using VBA in an Access application to pass credit card applications to Authorize.net.
In the Sandbox, when I issue a request and get a response, the response looks like:
1|1|1|This transaction has been approved.|MKCE58|Y|60138643909|06731|Company name|15.00|CC|auth_capture|||||||||||||||||||||||||||P|2|||||||||||XXXX1111|Visa|||||||1UMB1CSPUW5QIHHZIATBZCO||||||||||
Which element of this response string is the value that I must capture and use when issuing a refund of this transaction?
When I attempt to refund the transaction using either the "MKCE58" or "60138643909" as the TransactionID in:
post_string = post_string & "x_trans_id=" & URLEncode(strTransID) & "&"
I get a response of:
"The referenced transaction does not meet the criteria for issuing a credit."
I found a very old post here on SO that indicates that I need to change my account mode from Live to Test, and I did that. But that has not resolved this situation.
It looks like you are using the AIM API, so the seventh value in that pipe delimited field, 60138643909, is the transaction ID which is what you will use to request a refund.
To issue a refund the following criteria must all be met:
The transaction was originally processed and successfully settled through the payment gateway (Authorize.Net).
The transaction is submitted with the valid transaction ID (x_trans_id) of an original,
successfully settled transaction.
The amount being requested for refund is less than or equal to the original settled
amount.
The sum of multiple Credit transactions submitted against the original transaction is less than or equal to the original settled amount.
At least the last four digits of the credit card number (x_card_num) used for the original, successfully settled transaction are submitted. An expiration date is not required.
The transaction is submitted within 120 days of the settlement date of the original transaction.

How to get a transaction details using invoice number?

We are using authorize.net for payments in our checkout but in some cases we are not getting any response from authorize.net so we are unable to store transaction details in our database and also customers are being charged more than once. So to resolve this we are planning to get the transaction details before sending the payment but we don't have transaction id in our side, so we need a API to get the transaction details using invoice number.
I have searched lot in the API documentation but couldn't able to find it, so any reference might be helpful.
You cannot retrieve transaction information through their API with an invoice number. If you know the dates, and other helpful information about these missing transactions, you can use their Transaction Reporting API to get those day's transaction and retrieve the necessary information that way.
One way to avoid this in the future is to use either Silent Post1 or their new Webhooks API to get notified whenever a payment is made (and any other event you specify).
1 I am the author of that article.

How to get the transaction id of a duplicate transaction in authorize.net?

Some time I get duplicate transaction error (error code 11) in authorize.net. How can I get to know the duplicate transaction id so that I can verify it. Or, is there any way to get the transaction id by sending the invoice number or any other parameters? I am using AIM wrapper.
Unfortunately Authorize.Net does not report the ID of the duplicate transaction. The best you can do is get a transaction history and look for a very recent transaction that contains the same payment information. You can use their reporting API and make a call to getUnsettledTransactionListRequest.

Is there a "ThisVisit" timestamp in ColdFusion?

Coldfusion has a system created client variable called lastvisit.
Is there a way to get the value of that variable during the request that it is actually set (i.e. client.thisvisit)?
The idea would be that I can store the "ThisVisit" timestamp in session and then compare it to lastvisit when the next request is made. This would tell me if another request was made in the session.
The purpose is that we have a page that we use an ajax record lock on which refreshes the lock every minute. After sixty minutes the ajax lock code will automatically log the user out of the website (due to inactivity). The issue arises where the user is executing tasks in other windows/tabs (indication of activity).
Sense all requests update LastVisit, I would like to have the ajax lock code save the save a "thisvisit" value so that the next time it runs it can compare it to the LastVisit client variable.
A couple requirements:
Set up to use a DB rather than registry for your client vars (trust
me).
Client vars have to have "global variables" enabled
Your cfapplication or application.cfc has to have client management enabled.
If you have those three things you can select a query like the following:
<cfquery name="getLvisit" datasource="myClientVarsDB">
SELECT lvist
FROM cglobal
WHERE cfid =
<cfqueryparam type="CF_SQL_CHAR" value="#urltoken#"/>
</cfquery>
urltoken might be wrong... it may need the jsessionID or CFID but my memory tells me cftoken. I'd have to hunt down a site using Client DBs to give you a definitive answer.
So that would give you the current value of the lvisit variable. you would store this in the session and then compare it against the value from the table on subsequent queries before you overwrite it again (if that makes sense).
Note - this value is updated on each request - so your query get's the current value (before it has been updated). I previously thought this it was updated first but according to Tom it's actually updated last.

How to send customerId (x_cust_id) to authorize.net ARB?

I know, this is [normally] an RTFM question, except, well, we're talking about Authorize.net so the FM is hardly R-able.
I noticed when looking at the all the fields that get sent during the Silent Post, Authorize.net returns an item called "x_cust_id". It is not addressed in their sample code, and I can't find out where in the XML document that field would get posted. I'd like to use it!
So, how exactly do I add "customer Id" when I create a new ARB subscription?
Furthermore, is there any documentation that actually shows all the information I can send to ARB? I don't even know what my options are!
Silent Post != ARB. They are two different things. Silent Post is triggered whenever a transaction is processed by Authorize.Net. They send the results of each transaction to a script on your server notifying it of the results of the transaction. This allows you to manage subscriptions that fail programatically. It is very similar to Paypal's IPN. x_cust_id will be populated from the <customer/><id/> field in the ARBCreateSubscriptionRequest API call.
FYI, this is explained on pages 20 and 21 of the ARB guide.