credit.module -- Start Date & Issue Number
| Project: | Ubercart |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
As per this thread, this patch provides:
- Input boxes for start date & issue number on cart/checkout
- validation routines for the same
- code to enable these to display appropriately on cart/checkout/review
- admin option to turn these features on or off
Start date & issue number can then be accessed by payment gateways with the following "well-known" keys:
cc_start_month
cc_start_year
cc_issue
However, since these are not guaranteed to exist it is recommended to use something like, e.g.
if (isset($order->payment_details['cc_start_month']) && isset($order->payment_details['cc_start_year'])) { ... }
if (isset($order->payment_details['cc_issue'])) { ... }
In my view, payment gateways should definitely avoid testing against the admin option
if (variable_get('uc_credit_start_enabled', FALSE) { ... }
in favour of testing "well-known" names directly.
N.B. Credit card issue number must always be treated as a string, since "1" is different from "01" and will fail validation by the acquiring bank.

#1
P.S. I meant to say that, currently, Maestro cards are apparently allowed in Ubercart but that these will silently fail validation because there is no start date & issue number; hence I think this counts as a fairly critical bug.
#2
Critical would be more show stopping than just not supporting one type of CC... however, I think you forgot to attach the patch. I'll review it when you post it. : )
EDIT: n/m - you can just let me know if the one in the thread you linked is still up to date and I can go from there.
#3
Apologies -- have attached the diff I did against a recent (post 1.0) version. I think it'll still work.
I felt it was critical because it would result in a loss of custom/goodwill for shoppers. But perhaps not a huge issue, all things considered.
#4
That patch didn't address the maxlength on the CC number field. I upped that to 19 and applied the rest of the patch w/ a couple fixes for variable defaults consistency. I tested it on the Livetest with no trouble, but I am curious what payment gateway modules should do in the event of a card w/ no start date or issue number. For example, there will always be a value submitted for the start date, so there's no good way for the gateway module to detect whether or not it should be sending that data to the gateway or not...
Committing this to Bzr but will consider final pending your feedback. Obviously doesn't affect existing sites.
fwiw, I'd love to redesign the way CC fields are implemented in D6.
#5
Thanks for this, and for upping the maxlength to 19.
I can't speak for other gateways, but the one I've written only sends the start date and issue number for card types that require it.
I think the worst-case situation would only be that a blank start date would be sent to the card processing company and would be ignored, but that's just a guess.
#6
When can we get this into Ubercart?
Maestro through Cybersource requires the start date and issue number.
Currently, somehow, even though the card's not validated, the order still gets submitted. Might be a separate issue, though.
#7
I think it is a separate issue. The patch was committed a while back but probably hasn't made it into a release yet. If so it'd be the 1.3 release.
#8
Looks like this is in UC 1.3
Marking as fixed.
#9
Automatically closed -- issue fixed for two weeks with no activity.