Jump to content
Sign in to follow this  
Mike Beargie

Plastic auth.net transactionID blank or zero

Recommended Posts

I've been struggling to get more verbose error logging from the CCProcessPaymentProfile script step in Plastic version 3.1

Here's the calculation I'm using to log the response to JSON:

JSONSetElement ( "" ; 
	[ "Success" ; (true or false depending on case) ; "JSONBoolean" ];
	[ "ResponseMessage" ; (custom message depending on case) ; "JSONSTRING" ];
	[ "TransactionID" ; CCLastPaymentTransactionID ; "JSONSTRING" ];
	[ "ResultCode" ; Let(result = CCLastChargeResult ; If(result = "ERROR" ; CCLastError ; result)) ; "JSONSTRING" ];
	[ "AuthorizationCode" ; Let(result = CCLastPaymentAuthCode ; If(result = "ERROR" ; CCLastError ; result)) ; "JSONSTRING" ];
	[ "AVSResponse" ; Let(result = CCLastAVS ; If(result = "ERROR" ; CCLastError ; result)) ; "JSONSTRING" ];
	[ "CCVResponse" ; Let(result = CCLastCCV ; If(result = "ERROR" ; CCLastError ; result)) ; "JSONSTRING" ];
	[ "ApprovedAmount" ; Let(result = CCLastAmountApproved ; If(result = "ERROR" ; CCLastError ; result)) ; "JSONSTRING" ];
	[ "RawResponse" ; Let(result = CCLastRawResponse ; If(result = "ERROR" ; CCLastError ; result)) ; "JSONSTRING" ]
)

And here is a sample response I get back from a declined transaction:

{
	"AVSResponse" : "P",
	"ApprovedAmount" : 200,
	"AuthorizationCode" : "",
	"CCVResponse" : "",
	"RawResponse" : 2,
	"ResponseMessage" : "Transaction Succeeded",
	"ResultCode" : 2,
	"Success" : 1,
	"TransactionID" : ""
}

What weirds me out on this is that there are two indicators (ApprovedAmount, ResponseMessage) that would indicate that this is a good transaction. But the TransactionID is empty so I wouldn't be able to re-query that transaction record to check if it was declined or not. I have trapped where CCLastPaymentTransactionID returns an empty value.

A second "false positive" I am getting is a TransactionID being returned as zero:

{
	"AVSResponse" : "P",
	"ApprovedAmount" : 200,
	"AuthorizationCode" : "",
	"CCVResponse" : "",
	"RawResponse" : 3,
	"ResponseMessage" : "No Transaction ID ",
	"ResultCode" : 3,
	"Success" : 0,
	"TransactionID" : 0
}

This settles as a successful transaction in authorize.net with a valid TransactionID, but doesn't allow me to further track or query that transaction. This is happening maybe 2-3 times per 200 transactions I run.

Documentation from Authorize.net indicates that the API endpoint URL may be incorrect if you are receiving false positive responses, but I'm not sure if that's true or not.

Is there anything I'm missing for getting more verbose logging that I can decipher?

Share this post


Link to post
Share on other sites

Hi Mike,

The response to your CCProfileProcessPayment call should return the TransactionID, assuming the payment went through.(http://docs.360works.com/index.php/Authorize.Net#To_check_if_a_transaction_succeeded) Are you not finding this to be the case? If is returning the TransactionID properly, you can probably just set that value to a variable, and use that to set the value for your TransactionID prop in your JSON.

Share this post


Link to post
Share on other sites

Hi Sean,

As noted in my documentation above, I am NOT receiving a transaction ID back from CCLastPaymentTransactionID when the transaction is declined. Also, in some (seemingly random) cases, that function is returning zero as a result. 

There is a sample response of each type of suspicious result in my original post.

Share this post


Link to post
Share on other sites

 Hi Mike,

I apologize for not clarifying. I consulted with the Plastic developer, and he recommends you just reference the return value of CCProcessPayment/CCProfileProcessPayment to achieve the TransactionID. If you get a 0 or an empty result, then it's likely the transaction was declined and the gateway does not assign a TransactionID to failed transactions.

There is a table you can reference in our docs at the link below to get more detail from the transaction response, specific for CCLastAVS:
http://docs.360works.com/index.php/Authorize.Net#Getting_Response_Information_and_Using_Helper_Functions

You can also check the raw response number against Authorize.net's key to get more details on the transaction.
https://support.authorize.net/s/article/What-Is-the-Decline-Reason-Code-for-a-Transaction

For the first declined transaction and the second transaction that returned a 0 for the TransactionID, referencing AVS code P says "Postal code matches, but street address not verified."

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.