Repository navigation
Releases
Releases · IsaacAgyei/gmx
Update versioning control
Full Changelog: v0.2.1...v0.2.2
Go-Main-Expansion (GMX) v2
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 ongmx build.stripeis the first supported processor.paymentprocessor/layer with anIPaymentProcessorinterface and a Stripe implementation. As withIDatabase, the interface makes it easy to mock or swap.POST /api/v1/payments/paymentroute. It takes a JSON body whose fields match the Stripe PaymentIntent parameters:amount,currency,payment_method, and an optionalreturn_url.- An invalid body returns
400. - A failed or declined payment returns
502.
- An invalid body returns
PaymentProcessorServiceadded to the generated service registry.STRIPE_TEST_KEYis 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, thepaymentprocessor/directory,routes/payments/andservice.paymentprocessor.goare omitted, so existing projects and commands behave as before. - Use a
sk_test_...key while developing. Never commit your Stripe secret key..envis git-ignored.
⬆️ Upgrade
go install github.com/IsaacAgyei/gmx@v0.2.0
gmx version