There is a feature request for Commerce Card on File to provide the ability to add a card BEFORE checkout #1812740: Give user the ability to add a card on file BEFORE checkout. And a forked/sandboxed version of this module (which may get merged into the official project) has added this functionality (see "Add a new card" at http://drupal.org/sandbox/recrit/1810130). The only issue is that the individual payment gateways must provide a "create callback". This module provides and "update callback" and a "delete callback."
Therefore, I'm submitting this as a feature request to add in this callback. I can potentially work on this, but I'm still evaluating the level of effort/difficulty required to take this on.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1850100-commerce_authnet-create-callback-2.patch | 2.48 KB | rickmanelius |
Comments
Comment #1
rickmanelius commentedUpdating the title...
Comment #2
rickmanelius commentedAlright, this patch requires the SANDBOX version of commerce_cardonfile (http://drupal.org/sandbox/recrit/1810130) as noted in this issue #1812740: Give user the ability to add a card on file BEFORE checkout in the official project. Basically it adds the "create callback" function so that a person can add a card on file prior to actually going through the order process. It appears that authorize.net charges $1 in order to do this, so we may want to add that little warning so developers/users/customers are not surprised.
I know this is an edge case... so I'll notify the maintainer of the cardonfile module because it'll probably take them way less time to review and provide feedback!
As a side note: the code in this patch could probably use a little bit of streamlining and/or error checking (but most of that is handled by the form validate functions).
Comment #3
rickmanelius commentedPing :)
Comment #4
iLLin commentedThis patch works if its your first card you are adding that has a unique description. If you add the same description for a different card it fails. If you delete one card and add a new card under the same description it fails.
I have updated the create hook to either create the whole profile or if it exists then add to the existing profile id. I haven't done a patch only provide code for review.
Comment #5
oadaeh commented#1812740: Give user the ability to add a card on file BEFORE checkout is now in the 2.x branch of Commerce Card on File. The patch should probably be rewritten to depend on that.
Comment #6
oadaeh commentedActually, after reviewing what really went into the 2.x branch, it doesn't look like the code this patch depends on made the cut.
Comment #7
andyg5000Duplicate of #2051357: Add card on file outside of the checkout process