The easiest way to add a surcharge for specific card types is to charge via the Responsive Shared Page. You can then set up different surcharge rates for the different card types in MyEway. Eway have an article about this in their knowledge base:
Can I add a surcharge to payments?
Under Settings > Shared Page in MyEway, you can configure a separate rate for each card type that your account can process. Here’s an example for adding a 2% surcharge for American Express, and no surcharge for other card types:
This is what it looks like on the Responsive Shared Page when a customer uses a card with a surcharge:
Gravity Forms Eway Pro gives you access to the Responsive Shared Page.