If you at any point have access to the customers credit card number, then your doing something horribly wrong. Unless you're the payment processor.
Having the credit card field, where you can access it, means that you become a target for people wanting to inject javascript into your site. Perhaps you're safe, but what about all the third party javascript libraries or tracking/remarketing/tracking script most sites have?
Sorry, it's a really bad idea. Let you credit card processor deal with the that hassle.