Easy Mollie payments with Laravel

In the previous post you learned that Cashier is not always the best fit for payment processing in Laravel. And if that’s the case you will need to integrate payment processing manually into your application.

Personally I have been integrating the Mollie gateway into Laravel projects targeting a Dutch customer base. This way it is possible to accept iDeal payments – which is the preferred method of my customers.

The major take-away?

Fully integrating a payment gateway manually becomes tedious very fast.

You could use the official Mollie PHP client, the Omnipay Mollie client or the Mollie Laravel client, but these only help you redirect the customer to the Mollie payment page and redirect them back to you afterwards.

You will still have to do other things. The webhook route and controller still need to be written. Also you probably want to keep matching payment records in your own database and fire Laravel Events when the payment status changes. And as a best practice cover all this functionality using unit tests…

Yes that’s a lot of work, yet is the same for most  e-commerce projects.

That’s why I’ve created the laravel-payable-redirect-mollie package (yes that’s a mouthful) to integrate this all at once.

For your benefit I have open sourced it.

Take a look at the package’s github page for more details and installation instructions.

PS. As a last step in the payment process you probably want to generate an invoice (html/pdf) and provide it to the customer. There’s a package coming up for that as well. Stay tuned.

Create your first Laravel package

Laravel package development from scratch

Learning Laravel package development doesn't have to be hard. If you know how to create a basic Laravel app, you can write packages as well.

I've opened this course up for free to the first 100 subscribers only.

Join now and get the first lesson in your inbox right away.

We won't send you spam. Unsubscribe at any time. Powered by ConvertKit

Leave a Reply

Your email address will not be published. Required fields are marked *