How lelledev/upaygo works
uPayGo is a stateless Go payment-gateway microservice that exposes REST operations for Stripe Payment Intents. The main workflow creates an intent, confirms it for authentication (including possible 3D Secure), then captures it after checkout succeeds or cancels it on failure; clients can also retrieve intent status. Amount, currency, customer, and payment-source types form the domain layer, while configuration selects Stripe clients by currency. The README documents these capabilities; some action and configuration links rely on its description because their implementation excerpts were not shown.
Main entry points: intentcreate.go Create Intent · stripe_client.go Stripe Clients · main.go HTTP Server · stripeconv.go Stripe Conversion
Components 22
HTTP API
- HTTP Server
main.go - Create Handler
controller/rest/intent/create/restintentcreate.go - Confirm Handler
controller/rest/intent/confirm/restintentconfirm.go - Capture Handler
controller/rest/intent/capture/restintentcapture.go - Cancel Handler
controller/rest/intent/cancel/restintentcancel.go - Get Handler
controller/rest/intent/get/restintentget.go
Intent Operations
- Create Intent
payment/intent/create/intentcreate.go - Confirm Intent
payment/intent/confirm/intentconfirm.go - Capture Intent
payment/intent/capture/intentcapture.go - Cancel Intent
payment/intent/cancel/intentcancel.go - Retrieve Intent
payment/intent/get/intentget.go
Payment Domain
- Intent Model
payment/intent/intent.go - Stripe Conversion
payment/intent/stripeconv.go - Amount
amount/amount.go - Currency
currency/currency.go - Customer
customer/customer.go - Stripe Customer
customer/customerstripe.go - Payment Source
payment/source/paymentsource.go
Gateway Configuration
- App Configuration
config/config.go - Stripe Clients
config/stripe_client.go
Other components
- Payment Client
- Stripe API
Connections 36
- Payment Client → HTTP Server: sends requests
main.go - HTTP Server → Create Handler: routes requests
main.go - HTTP Server → Confirm Handler: routes requests
main.go - HTTP Server → Capture Handler: routes requests
main.go - HTTP Server → Cancel Handler: routes requests
main.go - HTTP Server → Get Handler: routes requests
main.go - Create Handler → Create Intent: creates intent
controller/rest/intent/create/restintentcreate.go - Confirm Handler → Confirm Intent: confirms intent
controller/rest/intent/confirm/restintentconfirm.go - Capture Handler → Capture Intent: captures intent
controller/rest/intent/capture/restintentcapture.go - Cancel Handler → Cancel Intent: cancels intent
controller/rest/intent/cancel/restintentcancel.go - Get Handler → Retrieve Intent: retrieves intent
controller/rest/intent/get/restintentget.go - Create Intent → Stripe Clients: selects client
payment/intent/create/intentcreate.go - Confirm Intent → Stripe Clients: selects client
payment/intent/confirm/intentconfirm.go - Capture Intent → Stripe Clients: selects client
payment/intent/capture/intentcapture.go - Cancel Intent → Stripe Clients: selects client
payment/intent/cancel/intentcancel.go - Retrieve Intent → Stripe Clients: selects client
payment/intent/get/intentget.go - Stripe Customer → Stripe Clients: selects client
customer/customerstripe.go - Create Intent → Stripe API: creates payment intent
payment/intent/create/intentcreate.go - Confirm Intent → Stripe API: confirms payment intent
payment/intent/confirm/intentconfirm.go - Capture Intent → Stripe API: captures payment intent
payment/intent/capture/intentcapture.go - Cancel Intent → Stripe API: manages payment intent
- Retrieve Intent → Stripe API: retrieves payment intent
- Stripe Customer → Stripe API: creates customer
customer/customerstripe.go - Create Intent → Amount: uses amount
payment/intent/create/intentcreate.go - Create Intent → Customer: uses customer
payment/intent/create/intentcreate.go - Create Intent → Payment Source: uses source
payment/intent/create/intentcreate.go - Amount → Currency: uses currency
amount/amount.go - Create Intent → Intent Model: builds intent
payment/intent/create/intentcreate.go - Confirm Intent → Intent Model: builds intent
payment/intent/confirm/intentconfirm.go - Capture Intent → Intent Model: builds intent
payment/intent/capture/intentcapture.go - Stripe Conversion → Intent Model: constructs model
payment/intent/stripeconv.go - Stripe Conversion → Amount: maps amount
payment/intent/stripeconv.go - Stripe Conversion → Customer: maps customer
payment/intent/stripeconv.go - Stripe Conversion → Payment Source: maps source
payment/intent/stripeconv.go - App Configuration → Stripe Clients: provides settings
- Stripe Clients → Stripe API: configures credentials
README.md