Using the lasted Ubercart DEV, Jun 12, unpatched, I get this behavior:
When using Ubercart 7.x-3.1 and credit card number: 4111111111111111, a valid expiration, and code: 111, I get to the review page with an error message "did not pass validation" (see screenshot).
When using Ubercart 7.x-3.x-dev. I enter credit card: 4111111111111111, a valid expiration, and code: 111, I get to the review page with NO validation error. Only after I click "Submit" do I get an error. When I click the Back button (back to /cart/checkout) from the review page (where the credit card number field changes to: (Last) 1111), and click 'Submit' again, I get invalid credit card number on the /cart/checkout page. So, the validation on the /cart/checkout page works for "Last(4) 1111" but not for "4111111111111111".
I might also add that I experienced something really weird when using a valid PayPal Gateway account (note the scenario above was tested using PayPal Pro Payment method, but not with PayPal Gateway account credentials). I was testing this same scenario (using credit card number 411111111111111), and when I clicked "Submit", it went through!!! PayPal actually processed the transaction using my Bank funds (not the invalid credit card)!! I couldn't believe it. I'm not sure if this is a PayPal 'rule' or something in the ubercart code. But it should be looked into?
Comments
Comment #1
longwaveScreenshot is at http://drupal.org/files/Screen%20shot%202012-06-11%20at%209.57.23%20AM.png
"The credit card type did not pass validation" comes from the PayPal module if the credit card type field is disabled and the card number does not begin with 3 4 5 or 6.
4111111111111111 may be a valid card number in the PayPal sandbox?
Comment #2
tr commentedUbercart validation checks only that the credit card number passes the Luhn algorithm and that the expiration date is in the future. These check help prevent submitting bad information to the credit card company. 411111111111111 is a valid test number, so it will always pass Ubercart validation. There are automated test cases to ensure this.
I don't really understand your post because there are inconsistencies with what I know, namely the gateway is not contacted when going from the checkout page to the review page - the information is sent to the gateway only after the submit button is pressed on the review page. So in your first case, where you have the screenshot, that's an error from the PayPal WPP gateway, from code that should not be run between checkout and review. For your second case, there *should* be no validation error when you go to the review page - that should pass the Ubercart checks.
If you continue to have issues here, please first test with the test gateway and try to reproduce the problem, then try with WPP on a clean install, without a lot of other modules. One thing you could look at is, if you have a WYSIWYG editor installed, maybe that's wrapping the card number input in <p></p> - that's the sort of configuration issue that might be causing your site a problem.
Comment #3
longwaveNo further info provided.