Using authorize.net with ARB.
It appears the Automated Recurring Billing subscription is created before the credit card information has been checked. As such the ARB will exist even if the card is declined and the initial charge is rejected.
12/29/2011 10:23:06 AM - Authorize.Net: ARB subscription created - 11779219
12/29/2011 10:23:06 AM - Recurring fee 239 added to order.
12/29/2011 10:23:08 AM - Authorization and capture
REJECTED: The transaction has been declined because of an AVS mismatch. The address provided does not match billing address of cardholder.
Amount: $25.00
AVS response: N - No Match on Address (Street) or ZIP12/29/2011 10:28:21 AM - Authorize.Net: Recurring fee for failed.
E00012 - You have submitted a duplicate of Subscription 11779219. A duplicate subscription will not be created.
Any suggestions?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | uc_recurring-adjust-weight-so-cc-verification-occurs-first-1394050.patch | 907 bytes | douglasmiller |
| #4 | errorgenerationguide.pdf | 662.92 KB | jasonawant |
Comments
Comment #1
ferdinand.bardamu commentedThat doesn't sound like behavior Authorize.net should be allowing, no matter what's coming from the uc_recurring module. I suggest following up with Authorize on this issue.
Comment #2
shaundychkoPlease test the patch in http://drupal.org/node/1458128
Comment #3
jasonawantHi,
I think this issue is different than the issue found in http://drupal.org/node/1458128.
This issue occurs during the initial checkout process. If a customer attempts to submit an order that is declined, the transaction is declined. However, this module has already created a recurring fee and posted to Authorize.net, which creates an ARB Subscription with credit card details that will be declined at renewal time.
I think the uc_recurring could avoid this by processing after checkout is complete.
The issue described in http://drupal.org/node/1458128 occurs after the initial checkout and subscription is created when the subscription renewal.
Comment #4
jasonawantHi,
For anyone testing this with their developer authorize.net account, use the following zip code, 46282, in the billing address along with the test card #4444333322221111, to simulate a declined transaction. You can use other zip codes and CVVs to simulate other decline codes, see attached.
Using this zip code, your initial checkout will fail. However, if you check your ARB Subscriptions in your developer authorize.net account (found at sandbox.authorize.net under Tools > Recurring Billing), you will find a new subscription has been created.
Thanks, Jason.
Comment #5
jasonawantJust changing title.
Comment #6
douglasmiller commentedIt appears that the uc_cart_checkout_review_form_submit function invokes the hook_order function by iterating over the list of modules returned by module_list(). Because uc_recurring_product has the same weight as uc_credit, uc_recurring_product_order can be executed before uc_credit_order. This means that the subscription will be validated and created before the CC validation occurs. This is a non-issue if the CC information is all correct, but creates problems if the CC information is invalid.
In comment #1: #1394050-1: Authorize.net ARB subscription created before card is validated, ferdinand.bardamu suggests that this is a problem with how authorize.net functions. This is probably true, but their issue can be avoided by validating the CC first. Either way, the CC should be determined to be valid before any attempt to create subscription in my opinion.
If we adjust the module weight of uc_recurring_product from 0 to 1, then uc_recurring_product_order is guaranteed to be executed after uc_credit_order has completed the CC verification. This seems like the best solution to me and I have seen no issues in my own testing, but I am unsure of any other impact that adjusting the weight of the module will have outside of my own testing. I suspect that there will be no impact, but could use some community testing.
I'm attaching a patch that will add a new update function to uc_recurring_product.install. Apply the patch then run update.php to test.