Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

Plastic auth.net transactionID blank or zero

Featured Replies

  • Newbies

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?

  • Author
  • Newbies

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.

 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."

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.