Authorize.net has a fraud detection suite. Its filters can perform certain checks (e.g. billing address check, CVV check etc) on the transaction. The authorize.net UI allows selecting one of 4 possibilities on how to react in case the filter detects fraud. These are:
- Process as normal and report filter(s) triggered
- Authorize and hold for review.
- Do not authorize, but hold for review.
- Declined
In case 1. the drupal payment should be authorized (and captured, if the payment gateway setting says so). The response message code is 1.
In case 2. the drupal payment should be only authorized, no matter what the payment gateway setting is. The response message code is 253.
In case 3. the drupal payment should stay in status 'new'. The response message code is 252.
In case 4. no payment should be created on the drupal side. The response message code is 251.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 2985568-9-add-fraud-handling.patch | 11.41 KB | bojanz |
| #8 | commerce_authnet-2985568-fraud-7.patch | 11.28 KB | czigor |
Comments
Comment #2
czigor commentedComment #3
mglamanWe're going to need a "hold" state in Commerce itself. It's not a new transaction but in a transitionary status.
It's also a non-Authnet problem, as Braintree has Kount integration for fruad.
Comment #4
bojanz commentedUploading patch provided by mglaman. Review to follow.
Comment #5
bojanz commentedThe name of the workflow is too generic, it would conflict with a similarly-intentioned workflow in a different module.
When the payment type and workflow are custom for a payment gateway, we should name them after the gateway.
In this case, payment_acceptjs, or payment_authnet (if usable on multiple authnet gateway plugins).
So, we have "review" meaning "results in authorization" and "authorization_review" meaning "results in a completed payment".
I was initially confused by this, but have no better alternative. "Unauthorized but flagged for review" still feels like an unnatural state to have on the remote side.
We have no success transitions.
We need to allow "void" for in-review payments, and to add a custom "approve" operation which calls the matching gateway method.
Comment #6
bojanz commentedI see that our initial spec called for:
Maybe this makes more sense? Worth bikeshedding
Comment #7
bojanz commentedBikeshedding results:
We agreed that the workflow should be "payment_acceptjs", the payment type should be "acceptjs". The "review" state should become "unauthorized_review" to match its label.
Comment #8
czigor commentedA patch updating the void and adding the approve payment operation. It's untested, don't know how to achieve these states with cardinal and authnet, since their test credit card numbers do not overlap. Naming has not been fixed.
Comment #9
bojanz commentedThis patch adds the renames mentioned in #7.
Comment #11
bojanz commentedRebuilt the patch, committed.