I have a client that has made a compelling argument for installing a secondary gateway for the following reasons:

  • There are cases where, when accepting payment via Amex or Discover, I may choose to send payments through another gateway that has lower fees
  • Some gateways (such as Paypal Direct) have declined based on history / bias of the customer's other purchases, in the Paypal example their history on eBay, for instance. This was confirmed by Merchant Technical Support. In this case, we would sniff for a decline by that gateway and issue the payment for authorization via another gateway.
  • Balance transactions between two gateways for some time to transition from one to another without a hard cut-over.

What is the best practice for implementing more than one gateway and are any of the above three options practical or available for implementation?

1 Answer 1


Its super simple to limit the available payment methods - by whatever filter you deem necessary.

When installing new payment gateways we frequently hide the new method and display it only for our specific user(s).

Just filter out the methods array by whatever criteria you need and that's it.

In terms of your other examples, again, I don't see an issue taking the payment data, then creating an instance of a different payment method selectively based on card type etc. then just setData on that model.

Its all very very doable, because your making these decisions at the block/template level mid-checkout - so changing the behaviour at that stage is really straightforward.

Just do all the selection logic during that step of the OPC - and the rest of the checkout continues as normal.

  • I don't know how I missed this. Sorry for the long delay in accept. For cases #1 and #3, you're absolutely correct. But in the case that I need to roll over to another gateway on decline - that's a little trickier. I find that N98_CheckoutFilters looks like a good fit for the case where we filter payment methods for different groups of people github.com/netz98/N98_CheckoutFilters
    – philwinkle
    Commented Apr 26, 2013 at 5:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.