The tricky bit is that the credit-card processing itself is being done by a third party gateway. We pass a request to the third party to go collect a payment for $X and let us know when that is approved. The user's credit card number never actually passes through our system, which is a great way to avoid dealing with PCI-DSS.
But the card number isn't known at the time we pass $X to the gateway. So there's no way to apply a different surcharge percentage to different types of card.