I recently had a need to add the cc owner field to a view, and found that it is not stored along with the other encrypted cc data along with the order.

I'll upload a patch that does that in the first comment.

Comments

jeffam’s picture

Status: Active » Needs review
StatusFileSize
new742 bytes

Here's the patch.

I'm no PCI expert, but a quick search revealed that the cardholder name may be stored as long as it is encrypted. I think this patch fulfills that requirement.

No worries if you don't think that this should be included. I could probably implement hook_order() in my own module to store the data on order save just like uc_credit_order() does. It would be nice to avoid the duplicate order data load and re-save, though.

longwave’s picture

StatusFileSize
new1.69 KB

This alternative patch backports the method used in 7.x; instead of including selected fields, it includes all fields then truncates the card number and wipes the CVV. This will cover the start date, issue number and bank fields as well.

tr’s picture

@jeffam: Does longwave's patch fix the issue for you?

jeffam’s picture

I haven't had a chance to test longwave's patch, but looking it over, it seems like it's a bit better than my approach since it includes all fields that are present and only cleans out data that one shouldn't store.

So yes, longwave's patch is the way to go.

Thanks!

longwave’s picture

Status: Needs review » Fixed

Committed #2

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.