Same as this question which got an accepted answer, but the only answer doesn't cover plan B - what if Shopify rejects to support the integration submitted to ActiveMerchant?
I'm tagging javascript here because I have a feeling that the solution probably entails coding the entire thing in client-side javascript code assuming this can be done safely
You might want to consider adding your gateway as an off-site payment? As per iframes or embedded JS inside Shopify's PCI compliant checkout URL I guess they won't accept it as it involves extra steps and validations by the PCI auditing companies, and no one wants to be in the middle of PCI audits every now and then.