Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ThinkingMan's avatar

Alternate Payment Gateway to Stripe and Braintree?

Hi,

I am just wondering if anyone has ever added a different Gateway to Spark. I have a client who sells credit card services and wants to use a specific gateway so any feedback and insight is appreciated.

Thanks, Mike

0 likes
4 replies
Cronix's avatar

Stripe/Braintree are doing more than just processing credit cards. They're handling subscriptions and automatic billing/recurring payments. Spark is completely built on top of that functionality. There's lots of separate code (both php and javascript) to handle which one is being used. You won't be able to just drop something in or "add it" without a non-trivial rewrite of a lot of Sparks core.

ThinkingMan's avatar

Thanks Cronix. The gateway that the client wants to use has the *same rebilling set of capabilities so I understand there is some overhead but also feel the gateway handles the lions share of those other significant complexities. I knew there was going to be a lot of work but was curious if anyone had tackled this in Spark or becuase of the refactoring just simply handled through a standard Laravel build.

Appreciate the response.

Cronix's avatar
Cronix
Best Answer
Level 67

@thinkingman I don't think anyone has attempted it, at least that I've seen. Spark is pretty clear that it only supports stripe/braintree, so people know that going in before purchasing.

Seriously, start digging through the spark code. It's very specific to stripe/braintree implementations/api's. It wasn't meant to be used with anything else. I think by the time you get something else integrated and working, you'll wish you had just created your own from scratch, and most likely wouldn't be able to upgrade Spark any further unless you take great care to extend spark without altering core files (extend them and bind the new implementation to the ioc container for each thing altered). You'll likely end up fighting Spark more than doing actual useful coding.

Personally, if this is something you HAVE to do, I wouldn't use Spark. It's too opinionated. I'm not even sure it would be easy to integrate it with Cashier, which Spark is using at the core for payment processing. You'll probably find more info on adding an additional payment gateway to Cashier rather than Spark, just because a lot more people use cashier than spark so info about it would likely be more common. You have multiple layers of things to work out to make this doable. I don't envy you.

ThinkingMan's avatar

@CRONIX - This is where I am headed now. i.e. Check out extending Cashier and if too much effort then build my own. Thanks again!

Please or to participate in this conversation.