Can you use a credit card to purchase a money order?

No, the very purpose of a money order is that it's a secured method of payment, meaning the money is guaranteed. Paying with a credit card leaves open the possibility that you might default on the debt. A money order, on the other hand, is the same as cash, simply a more secure option than sending money through the mail.

A few places will allow you to use your card. Walmart money center will as long as you know your pin#.