Credit card start date and issue number

Project: 
Ubercart
Category: 
feature request
Priority: 
normal
Status: 
active

We're using the credit card module to take payments while I figure out how to build our payment gateway. We need to contact a lot of our customers to ask them for their credit card's start date and issue number when applicable. Any chance this can be added to the module before 1.0 or should I build a module to facilitate this?

Re: Credit card start date and issue number

I'm not very proud of my theme function for the credit card details form, but you can always change the theme function for this form using hook_form_alter(). Basically, I'd use the form alter to add in the fields you need for this, too, and then re-theme that form to make sure they all get in and look uniform.

Re: Re: Credit card start date and issue number

I see what you mean about the theme_uc_payment_method_credit_form function, it's quite ugly.

So what you're saying is that I should:

1. hook_form_alter() uc_payment_method_credit_form() to add in my custom fields.
2. Override theme_uc_payment_method_credit_form() to ensure proper display.

Then it's up to me to do something with $form_values? Sorry for the noob questions.

EDIT: Do I just add another submit handler to the form? That way I can call my own submit function and job's a good 'en. I guess I could just add the info as an admin comment to the order or maybe extend the uc_payment_credit table. hmm

EDIT2: It seems I *can* add another submit handler to the form, which solves this issue for me (and many more in the future I'm sure).

EDIT3: I am happy to create a module that provides this functionality for UK businesses but I do still think it should be part of the core module, what do you think?

Re: Re: Re: Credit card start date and issue number

Alrighty, so here's why I'm at...

I do think that core should accept Maestro cards. It was just something I was unaware of here in the U.S. at the time the module was developed. In fact, it should accommodate any sort of card. I'm just not sure how much we want to get into validating input for all the different card types in the core module.

In any event, I am trying to stand by the feature freeze for a 1.0 release later this week. Solarian seems to have come up with a patch for the credit module that adds the necessary functionality, and my recommendation is to turn that patch into a Maestro module and distribute that on d.o. Include in it a form alter to change the CC number length, and use that to add in the extra fields and what not.

For processing, I'm not sure if simply adding another submit handler is going to work. Try it out, but you might have to define a custom checkout pane that doesn't display anything but has a 'process' $op to deal with the extra CC fields you're creating.

Sorry I couldn't get to it in time, but we'll be moving on to 2.0 soon enough. Eye-wink

Re: Re: Re: Re: Credit card start date and issue number

No worries. I'm almost finished creating the payment module now and won't need this right away. If I end up needing it create the module you described.