mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans, usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0. Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
24 lines
478 B
Go
24 lines
478 B
Go
package checkout
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/zap-proto/zip"
|
|
|
|
"github.com/hanzoai/commerce/api/checkout/paypal"
|
|
"github.com/hanzoai/commerce/models/order"
|
|
"github.com/hanzoai/commerce/models/organization"
|
|
)
|
|
|
|
func confirm(c *zip.Ctx, org *organization.Organization, ord *order.Order) (err error) {
|
|
// Handle payment confirmation
|
|
switch ord.Type {
|
|
case "paypal":
|
|
err = paypal.Confirm(c, org, ord)
|
|
default:
|
|
return errors.New("Invalid order type")
|
|
}
|
|
|
|
return err
|
|
}
|