Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | uc_credit.module.patch | 657 bytes | hanoii |
last4.patch | 766 bytes | marcingy | |
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedHmm, 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().
Comment #2
marcingy CreditAttribution: marcingy commentedI 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.
Comment #3
hanoiiI 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...
Comment #4
hanoiiops, forgot the patch
Comment #5
hanoiijust checked and this is still there on 5.x-1.8, and it's probably an existent bug. Just bumping up this issue.
Comment #6
marcingy CreditAttribution: marcingy commentedComment #7
TR CreditAttribution: TR commentedCommitted patch in #4.