On the Expresso Store documentation it says that making custom payment gateways is dead easy, but i cant find the documentation on how to do so. Does anyone know where i can look / have any info?

Also i am going to be integrating using Sagepay Form. This is different from Sagepay server and direct. I assume i need to code my own custom gateway and that is not anything else available that i may have missed?

  • If Adrian has answered your question, please remember to mark it as correct. – Stephen Callender May 24 '13 at 11:05

I wouldn't say it's dead easy. If you're experienced with PHP it's certainly possible - how easy it is depends on the particular gateway.

I'm not familiar with Sage Pay Form, and it's not supported out of the box with Store, so yes, to support it you would need to code a custom gateway. In the end you might find using one of the existing and supported Sage Pay gateways easier and much faster.

Store's payment library is open source (you can see the code here: CI-Merchant). There are no guides describing exactly how to write a new payment gateway, because each one is different. Basically you will need to copy the code one of the existing gateways, and go about amending it based on the API documentation from your payment gateway.

  • Making a form that passes off to sagepay is not an issue. How do i create a selectable payment option within the store? Which files do i need to duplicate, where do i declare the template? – Edd Smith May 13 '13 at 10:34
  • Essentially how can i get a blank canvas set up for me to start work on. – Edd Smith May 13 '13 at 10:44
  • You don't make a raw sage pay form in your template, all the logic is encapsulated in a payment plugin (to make life easy for developers). To get a "blank canvas" to start from, you would take something like the existing sage pay server plugin and start modifying it to your needs. Alternatively, it's possible for us to build this for you (email support@exp-resso.com). – Adrian Macneil May 14 '13 at 12:26

I have now built my own.

I just modified an existing payment gateway that was not in use.

  • Although it's always good practice to accept answers, if you're just acting on the suggestions of one of the answers then you really need to be accepting that answer and not creating a new one. It also gives the responder a little credit for taking the time to help out. – Ian May 26 '13 at 17:18
  • My bad, not aware of stackexchange etiquette. – Edd Smith May 26 '13 at 19:04
  • No problem Edd. It just also helps others to quickly locate a solution and see the comment thread associated. :) – Ian May 26 '13 at 19:06

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.