Running CiviCRM 4.6.3 with Drupal 7.38. In CiviEvent I am not able to get any 3 digit card verification number to pass the test payment processor in Test-drive or Live. Using 4111 1111 1111 1111 as the test card number. Continue to receive "Please enter a valid Card Verification Number".
Bert, based on the error message you report, I think your validation failure is in the three digit card verification number (CVV), not the card number (PAN). Normally I use 111 as CVV for the 4111 test card.
And the answer is... It appears the bone head admin forgot to enable any credit cards (Visa, MasterCard, etc). Once the credit cards where enabled card verification (CVV) worked as advertised. Thanks everyone! -Bert (Site Admin)
If the issue really is with the PAN, try that same test card number but without the spaces, and let us know if that works?
The payment forms ought to handle stripping those out in
civicrm_billingblock_creditcard_helper(), but it's possible they don't, or they don't specifically for Stripe (eg if the Stripe processor intercepts the form submit clientside before the aforementioned function has completed).
CiviCRM uses (at least) clientside JS to strip spaces out; if that JS doesn't fire for some reason (perhaps local JS issues, or Stripe gets there first) AND CiviCRM doesn't handle it serverside, then you might see behaviour like that with the PAN.
I would expect Stripe's API to cope fine with spaces. Are you seeing the validation error within CiviCRM?