A modern SSLCommerz SDK for Laravel built for better type safety, cleaner integration, improved developer experience, and a more maintainable payment workflow.
I had to work on a Laravel project recently, and one of the things I needed was a payment gateway integration. So I did the obvious thing and started with the official SSLCommerz SDK. And well, it felt like opening a time capsule.
It worked technically, but it also felt like it had been parked somewhere in the older days of PHP and quietly left there. It did not feel like something I would enjoy using in a modern Laravel project, especially for payment code, which is exactly the kind of code you do not want to feel mysterious about.
After being away from the PHP ecosystem for what feels like eons at this point, this was also a fun little way to get back into it by immediately getting annoyed at a payment SDK and deciding to build my own. Very healthy reintroduction. Very reasonable emotional response.
So that is what I did.
The goal was not to build something magical. I just wanted an SDK that felt more at home in Laravel, with better type safety through PHPStan, better editor support through PHPDoc, tests with PEST, and a cleaner HTTP layer through Saloon.
To be fair, Saloon is doing a lot of the heavy lifting here, so I cannot stand here and pretend I forged this thing in fire with nothing but raw engineering instinct. I mostly took a very solid foundation and shaped it into something that feels nicer to use in Laravel.
The project lives here, https://github.com/raiyansarker/sslcommerz-sdk
It is MIT licensed, which is my way of saying, here, take it, use it, break it, improve it, just please do not assemble a legal task force because of a weird edge case at 2 AM.
There are probably still bugs. Honestly, there are almost certainly bugs. So if you try it and something breaks, looks weird, or makes you question my life choices, open an issue, report it, or throw a fix at me. I would genuinely appreciate it.
Since this is the first post on this blog, more posts are coming soon. I want to write about the architecture behind this blog itself, how it works, how it is powered, and all the little decisions behind it. Basically, the classic developer tradition of building a thing and then immediately writing several paragraphs about how unnecessarily interesting its internals are. So stay tuned…