- Add Waffo payment SDK integration (waffo-go v1.3.1) - Backend: webhook handler, pay endpoint, order lock race-condition fix - Settings: full Waffo config (API keys, sandbox/prod, currency, pay methods) - Frontend: Waffo payment buttons in topup page, admin settings panel - i18n: Waffo-related translations for en/fr/ja/ru/vi/zh-TW Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
954 B
Go
17 lines
954 B
Go
package constant
|
|
|
|
// WaffoPayMethod defines the display and API parameter mapping for Waffo payment methods.
|
|
type WaffoPayMethod struct {
|
|
Name string `json:"name"` // Frontend display name
|
|
Icon string `json:"icon"` // Frontend icon identifier: credit-card, apple, google
|
|
PayMethodType string `json:"payMethodType"` // Waffo API PayMethodType, can be comma-separated
|
|
PayMethodName string `json:"payMethodName"` // Waffo API PayMethodName, empty means auto-select by Waffo checkout
|
|
}
|
|
|
|
// DefaultWaffoPayMethods is the default list of supported payment methods.
|
|
var DefaultWaffoPayMethods = []WaffoPayMethod{
|
|
{Name: "Card", Icon: "/pay-card.png", PayMethodType: "CREDITCARD,DEBITCARD", PayMethodName: ""},
|
|
{Name: "Apple Pay", Icon: "/pay-apple.png", PayMethodType: "APPLEPAY", PayMethodName: "APPLEPAY"},
|
|
{Name: "Google Pay", Icon: "/pay-google.png", PayMethodType: "GOOGLEPAY", PayMethodName: "GOOGLEPAY"},
|
|
}
|