feat: integrate okpay switch-network flow and notify handling

This commit is contained in:
mcmc
2026-05-09 18:06:27 +08:00
parent a4022df7b4
commit 377176a0f2
209 changed files with 1842 additions and 304 deletions
+21 -2
View File
@@ -5,6 +5,25 @@ type NetworkTokenSupport struct {
Tokens []string `json:"tokens" example:"USDT,USDC"`
}
type SupportedAssetsResponse struct {
Supports []NetworkTokenSupport `json:"supports"`
type EpayPublicConfig struct {
DefaultToken string `json:"default_token" example:"usdt"`
DefaultCurrency string `json:"default_currency" example:"cny"`
DefaultNetwork string `json:"default_network" example:"tron"`
}
type OkPayPublicConfig struct {
Enabled bool `json:"enabled" example:"true"`
AllowTokens []string `json:"allow_tokens" example:"USDT,TRX"`
ShopID string `json:"shop_id,omitempty" example:"okpay-shop-test"`
ShopToken string `json:"shop_token,omitempty" example:"secret-token"`
APIURL string `json:"api_url,omitempty" example:"https://api.okaypay.me/shop/"`
CallbackURL string `json:"callback_url,omitempty" example:"https://pay.example.com/payments/okpay/v1/notify"`
ReturnURL string `json:"return_url,omitempty" example:"https://pay.example.com/success"`
TimeoutSeconds int `json:"timeout_seconds,omitempty" example:"10"`
}
type PublicConfigResponse struct {
SupportedAssets []NetworkTokenSupport `json:"supported_assets"`
Epay EpayPublicConfig `json:"epay"`
OkPay OkPayPublicConfig `json:"okpay"`
}