Making osCommerce Checkout Payment More user Friendly

On the checkout Payment page in osCommerce we have a field that collects Credit card Number.
The number displayed On credit card looks like this

4111-1111-1111-1111 or 4111-1111-1111-1111

Normally user would like to fill it that way.

Now if a customer fills osCommerce Payment form this way i.e. with spaces and in between credit card numbers, Either it may be blocked by java script validation  or the following message will be displayed.

We do not accept that type of card

This error can be avoided by removing the spaces or – while filling the form and then validating it. Small changes can make osCommerce shopping cart more user friendly.