Credit Card: card - type - select - field on checkout form messed up

Posts: 12
Joined: 01/17/2008

Bug or feature: I have just "Enabled card type field on checkout form" (uc_credit_type_enabled) but the HTML-output seems a bit weird to me:

<div class="form-item">
<select id="edit-cc-type" class="form-select" name="cc_type">
<option value="&amp;lt;p&amp;gt;Visa Mastercard American Express&amp;lt;/p&amp;gt;">

&lt;p&gt;Visa Mastercard American Express&lt;/p&gt;

</option>
</select>
</div>

Besides I have only chosen 2 credit cards to be processed.(Visa and Mastercard, Amex should not be in the pulldown)

Lots of questions...

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Thanks for bringing that up... I don't use it on the Livetest, so it very well may be a bug. In the meantime, if you look at the CC settings you'll see a textarea that lists credit card types. The settings are a little confusing in that the checkboxes are just for icons while the textarea is for that select box. Try adjusting the values there to remove the others. I'll look into the bug on Monday!

Posts: 16
Joined: 01/10/2008

Why ask for the customer to check off which cc they are using when the type of card it is is contained in the number itself? 3=amex, 4=visa etc

Posts: 12
Joined: 01/17/2008

Jodo, I supposed there ought to be an identification-code-system somehow. Where can I get further information on that?

Posts: 16
Joined: 01/10/2008

Ragazzo, the four major cards each start with a unique number:

Amex 3xxx
Visa 4xxx
MC 5xxx
Disc 6xxx
Don't really know about any of the others but I would assume they follow the convention.

Posts: 12
Joined: 01/17/2008

@Jodo: thank you for your information! The coding system will be very useful for shops that offer the whole range of (all four major) credit cards. As we are going to limit the choice to only two cards I will want to visualize the limitation by a pulldown containing only the accepted credit card types.

@Ryan,
putting the card-types into separate lines in the text area improves the situation dramatically. There remains only one thing to be solved: the <p>...</p>-Tags on the beginning and end of each option-line:

<option value="&amp;lt;p&amp;gt;Mastercardxxx&amp;lt;/p&amp;gt;">
&lt;p&gt;Mastercard&lt;/p&gt;
</option>
<option value="&amp;lt;p&amp;gt;Visa&amp;lt;/p&amp;gt;">
&lt;p&gt;Visa&lt;/p&gt;
</option>

Unfortunately I was not able to find the code implementing the variable_set for

uc_credit_accepted_types 
==========================
s:33:"<p>Mastercardxxx</p>
<p>Visa</p>";

where the annoying p-tags are stored.

Posts: 5367
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I tested this on the Livetest and could not duplicate the p tags... so let me take a shot in the dark and ask if you're using a module to add WYSIWYG capabilities to textareas... if so, then you need to disable it on that textarea and enter the card types in plaintext. That's a likely cause of the problem... others had this difficulty with the EDI contrib.

Posts: 8
Joined: 11/08/2008

What exactly is the purpose of the card-type select? It appears it isn't necessary to complete a transaction (at least not with Authorize.net) since if the select field is not enabled, the transactions can still go through. And while I might not be looking in the right place, I can't find anywhere in the database where it is saving the card-type.

My dilemma: My client needs to know by looking at the orders what type of card was used (have no idea why). It seems odd that the user specifically enters that information through a select yet it doesn't appear to be used or stored. Is there anyway to access this from the /orders or /payments screens that I don't know about? If not, have suggestions on what would probably be the easiest way to implement this?

Thank you,
Stephen

Posts: 8
Joined: 11/08/2008

Okay, I know the CC type is being stored somewhere because if you go to edit an order, the payment pane shows the credit card information including the credit card type (Visa, AMEX, etc.).

But where is it in the database?

If I know where it is, I could perhaps add something into the /orders View that displays the CC type on that page as well.