Single Payment Method with Multiple Payment Accounts
So I am in the process of writing a module for the payment gateway we use (Nelnet/Quikpay), and have gotten it [mostly] working. The issue I've just realized is that we have different product types that have to be paid to different accounts, but using the same payment gateway.
My question is, is it even possible to have a single gateway be configurable with rules if a certain product type is added to the cart?
My scenario for clarification:
We have 3 basic "products". One is for special events, another for personal training package(s), and the third for fitness passes. Each of these 3 product types has to pay to a different account, as they are handled by different areas. I'd like to be able to check for a special event product in the cart, and limit the cart then to only allowing other special events to be added, or similarly for the other two product types.
Then, once they're done adding, they go to Checkout, and based on the products in their cart, the payment account is set prior to being redirected to the payment gateway. But I'd like the actual payment gateway module to be the same, and not have to copy the module for each product type and have 3 "Nelnet/Quikpay" gateways with one for each account.