Intro

Most WooCommerce payment gateway tutorials use Stripe or Razorpay — well-documented, with SDKs and community support everywhere. My project was different. I had to build a custom gateway for a government portal — sparse documentation, non-standard callback behavior, and zero Stack Overflow answers.

What got me through it was a combination of 4+ years of PHP/WordPress experience and two AI tools: Claude and ChatGPT. In this article I'll walk you through exactly what I built, where AI genuinely helped, and where it failed me.

The problem

The client needed to accept payments via PSU's government payment infrastructure — think portal callbacks, strict server-side verification, and an API that behaved nothing like a modern payment SDK. WooCommerce has no official support for this. There was no existing plugin. I had to build from scratch.