This patch fixes the last 4 invalid credit card issue that seems to affect a lot of sites.

The issue is caused because 'last 4 ' is converted to 'last4' on posting (spaces are removed) so the compare fails and as a result the original number is not retrieved from the session.

This patch changes the the compare to last4 to prevent a comprasion error after white space is stripped.

CommentFileSizeAuthor
#4 uc_credit.module.patch657 byteshanoii
last4.patch766 bytesmarcingy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Hmm, I think this was accounted for separately in the 2.x branch... I wonder if that patch was backported and we just haven't committed to CVS yet. I'll look into it... honestly, though, we should probably change this to use strpos() instead of substr().

marcingy’s picture

I agree on the strpos usage rather than substr but I didn't want to go down that route incase there was a reason for the current approach i wasn't aware.

hanoii’s picture

Priority: Normal » Critical

I can confirm this was not backported to the D5 branch, just checked CVS. On D6 the spaces were remove.

Also the patch is reversed (it tries to add the spaces).

I think it's a kind of critical bug, at least a critical usability issue maybe making customers to be frustrated.

Attached is a fixed patch.

I also think this might be related to http://www.ubercart.org/forum/support/9716/help_users_can_not_get_review...

hanoii’s picture

FileSize
657 bytes

ops, forgot the patch

hanoii’s picture

Version: 5.x-1.7 » 5.x-1.8

just checked and this is still there on 5.x-1.8, and it's probably an existent bug. Just bumping up this issue.

marcingy’s picture

Status: Needs review » Reviewed & tested by the community
TR’s picture

Status: Reviewed & tested by the community » Fixed

Committed patch in #4.

Status: Fixed » Closed (fixed)

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