Your personal payment processing server.

Max Kotliar
Nov 20, 2015 · 3 min read

If you’ve ever tried to integrate a payment gateway with an online shop you know how hard it is. Things get worse when you need several payment providers to be integrated. From my experience it takes from one week to a month to integrate a payment gateway and fix the associated bugs.

Also, we have to do the same thing from project to project. It is not efficient. Even more, developers do not work with payments all the time, so they may not have enough knowledge in this area. They will learn on the job and hence will spend more time on it. You can imagine how much time it takes.

In general, all the payments do the same thing. They just transfer money from point A to point B or the other way around. In real life, gateways do this differently. For example:

Stripe wants a credit card form in addition to the javascript which processes the form. Paypal Express Checkout wants a user to be redirected to their site. It asks you to provide a return url and the url for notifications. Klarna Checkout wants their snippet (an iframe) to be rendered on your site.

These are just a few examples, but actually there are many more gateways. They act differently, have unique protocols, api endpoints, transport formats and so on. Apart from gateways you have to think about your application. Is your application secure enough? Do you audit changes in database, http requests coming to you? Do you store information that you may need in future? It sounds like a hell if you ever decide to work out this stuff.

If you do not fall in love with microservices. I suggest doing so.

I realized sometime ago ago there was a solution. What if we could create a service that stands between our application and a wild world (all those fancy payment gateways)? That means we will have a full control over the service and be able to configure it, tweak its code. What is the most important, We can control database to which the service is connected. The service will provide us with a REST API and backend UI. It will be easy to set up, Indeed it’ll take a minute to get it up and run. Sounds good, doesn’t it?

It would be also nice if the service is invisible for the end user. Everything happens on your application’s page. If a gateway needs a credit card it is shown at the page. If a gateway needs a redirect, it does this but returns a user onto your site’s page.

Too good to be true? Not really. There is a solution. PayumServer. It is a proof of concept. By the way it already covers some payment gateways. Paypal Express Checkout, Stripe.js Stripe Checkout. Be2Bill, Klarna Checkout, Authorize.NET just to name a few.

Do you want to see it in action? Here’s the demo:

I have spent a lot of time integrating payment gateways into various projects and I see that it is time to use microservices. Let’s keep up with the times and spend our time more efficiently!

Now, I’d like to invite you to join me in this journey. Give it a try, send me your feedback, contribute. I am looking forward to hearing from you.

In the next article I’ll show how to setup the server in a blink of an eye

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade