Skip to content

Releases

Update versioning control

Choose a tag to compare

@IsaacAgyei IsaacAgyei released this 06 Nov 21:59

Full Changelog: v0.2.1...v0.2.2

Go-Main-Expansion (GMX) v2

Choose a tag to compare

@IsaacAgyei IsaacAgyei released this 06 Nov 20:16

Here's the release note, ready to paste into GitHub:


gmx v0.2.0: Stripe payments

gmx can now scaffold a Stripe payment layer alongside your Gin backend, using the new --payment flag.

gmx build myapi --payment stripe                 # Stripe only
gmx build myapi --db supabase --payment stripe   # Supabase and Stripe

✨ What's new

  • --payment <processor> flag on gmx build. stripe is the first supported processor.
  • paymentprocessor/ layer with an IPaymentProcessor interface and a Stripe implementation. As with IDatabase, the interface makes it easy to mock or swap.
  • POST /api/v1/payments/payment route. It takes a JSON body whose fields match the Stripe PaymentIntent parameters: amount, currency, payment_method, and an optional return_url.
    • An invalid body returns 400.
    • A failed or declined payment returns 502.
  • PaymentProcessorService added to the generated service registry.
  • STRIPE_TEST_KEY is added to the generated .env.example. The server refuses to start if it's empty.
  • The generated project includes tests for the new layer.

🔧 Notes

  • Without --payment, the paymentprocessor/ directory, routes/payments/ and service.paymentprocessor.go are omitted, so existing projects and commands behave as before.
  • Use a sk_test_... key while developing. Never commit your Stripe secret key. .env is git-ignored.

⬆️ Upgrade

go install github.com/IsaacAgyei/gmx@v0.2.0
gmx version