Initial sanitized code sync

This commit is contained in:
zqq61
2026-03-15 20:48:19 +08:00
commit 17ee51ba04
126 changed files with 22546 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package card
import "context"
// CardInfo holds bank card details for Stripe payments.
type CardInfo struct {
Number string // Card number
ExpMonth string // Expiration month MM
ExpYear string // Expiration year YYYY
CVC string // CVC code
Name string // Cardholder name (optional)
Country string // Country code e.g. JP, US
Currency string // Currency e.g. JPY, USD
Address string // Street address (optional)
City string // City (optional)
State string // State/province (optional)
PostalCode string // Postal/ZIP code (optional)
}
// CardProvider is the pluggable interface for bank card sources.
type CardProvider interface {
// GetCard returns an available card for payment.
GetCard(ctx context.Context) (*CardInfo, error)
// ReportResult reports the usage outcome so the provider can manage its card pool.
ReportResult(ctx context.Context, card *CardInfo, success bool) error
}