We're setting up a store for a charity that accepts donations and also sells items, they have two bank accounts one for donations and one for the shop so we've setup two stripe accounts to process these separately.

We've setup the templates and everything works great, but we can't work out how to add a second stripe API key in the backend, is this possible and if so how should we go about it?



In Store 1x versions this was easily possibly because you named each gateway you enabled manually. When V2 was released this was changed (I assume to help reduce the support request about people mislabeling gateways).

In V2 you would need to go into Store folder and find the Stripe gateway folder/file and duplicate the structure while changing the naming of the classes everywhere in the files to match the name of your duplicated gateway.

  • I've duplicated the folder in /system/expressionengine/third_party/store/vendor/omnipay/stripe to stripedonate and updated all vars within this folder. I've also updated autoload_psr4.php and installed.json in /store/vendor, however the new gateway won't appear in settings, I assume I also have to update the database?
    – Nick
    Apr 13 '15 at 8:38
  • You shouldn't need to update the database. Something in your files is not properly named which is preventing Store from registering the gateway. The other option you have us that in Store 2 gateways are loaded as extensions to make it easier to update Store down the road since the custom gateway is not in the store file folder. Apr 13 '15 at 16:09
  • Thanks for the response Justin, is the gateway simply the folder in third_party/store/vendor/omnipay or is it also located elsewhere?
    – Nick
    Apr 14 '15 at 15:19
  • I don't have the Store V2 files in front of me but that should be about it I would do a search of the store files for the stripe class name just to make sure. Apr 14 '15 at 15:26
  • did you ever resolve this? @Nick May 3 '17 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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