Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2000 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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?

Posted

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.

  • Newbies
Posted

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.

Posted

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

This topic is 2000 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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