Recently I’ve been working on a central payment system (aka paywall). This paywall will be used in many of our company’s projects. This allows us to add new payment methods, handle invoices, etc. all in one place.

We currently support CreditCards via NestPay and PayPal. When dealing with payments you must be very careful not to have bugs. This means that code needs to be well tested. But how do you test payments?

In this article, I’ll show you how you can go about testing PayPal payments. First we will look at unit and feature testing, and later take a…


The request() helper (or Request facade) is one of the options to get to the Request object in Laravel. Another one is via dependency injection. Lately, the request() helper is quickly gaining momentum and seeing greater usages throughout the Laravel ecosystem. It provides a somehow cleaner and easier access to the Request object. For example $request->input('foo') vs. request('foo') and if you use closures, you don’t need to use the use ($request). But it has some drawbacks and some gotchas which you must be aware of.

Let’s say you are building a blog platform. The platform will provide API endpoints (JSON…

Boštjan Oblak

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store