Documentation
¶
Overview ¶
Package payment holds the billing domain's payment method entity and the stored configuration of each gateway it can be bound to.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlipayF2FConfig ¶
type AlipayF2FConfig struct {
AppId string `json:"app_id"`
PrivateKey string `json:"private_key"`
PublicKey string `json:"public_key"`
InvoiceName string `json:"invoice_name"`
Sandbox bool `json:"sandbox"`
// Gateway optionally overrides the sandbox gateway URL (Alipay has
// retired sandbox hosts before); production traffic ignores it.
Gateway string `json:"gateway,omitempty"`
}
func (*AlipayF2FConfig) Marshal ¶
func (l *AlipayF2FConfig) Marshal() ([]byte, error)
func (*AlipayF2FConfig) Unmarshal ¶
func (l *AlipayF2FConfig) Unmarshal(data []byte) error
type CryptomusConfig ¶ added in v1.15.17
type CryptomusConfig struct {
MerchantID string `json:"merchant_id"`
APIKey string `json:"api_key"`
}
func (*CryptomusConfig) Marshal ¶ added in v1.15.17
func (l *CryptomusConfig) Marshal() ([]byte, error)
func (*CryptomusConfig) Unmarshal ¶ added in v1.15.17
func (l *CryptomusConfig) Unmarshal(data []byte) error
type EPayConfig ¶
type EPayConfig struct {
Pid string `json:"pid"`
Url string `json:"url"`
Key string `json:"key"`
Type string `json:"type"`
// Empty Version and CheckoutMode retain the existing V1 page checkout.
Version string `json:"version,omitempty"`
CheckoutMode string `json:"checkout_mode,omitempty"`
PrivateKey string `json:"private_key,omitempty"`
PublicKey string `json:"public_key,omitempty"`
}
func (*EPayConfig) Marshal ¶
func (l *EPayConfig) Marshal() ([]byte, error)
func (*EPayConfig) Unmarshal ¶
func (l *EPayConfig) Unmarshal(data []byte) error
type Payment ¶
type Payment struct {
Id int64 `gorm:"primaryKey"`
Name string `gorm:"type:varchar(100);not null;default:'';comment:Payment Name"`
Platform string `gorm:"<-:create;type:varchar(100);not null;comment:Payment Platform"`
Icon string `gorm:"type:varchar(255);default:'';comment:Payment Icon"`
Domain string `gorm:"type:varchar(255);default:'';comment:Notification Domain"`
Config string `gorm:"type:text;not null;comment:Payment Configuration"`
Description string `gorm:"type:text;comment:Payment Description"`
FeeMode uint `` /* 128-byte string literal not displayed */
FeePercent int64 `gorm:"type:int;default:0;comment:Fee Percentage"`
FeeAmount int64 `gorm:"type:int;default:0;comment:Fixed Fee Amount"`
Sort int64 `gorm:"type:int;not null;default:0;comment:Sort"`
Enable *bool `gorm:"type:tinyint(1);not null;default:0;comment:Is Enabled"`
Token string `gorm:"type:varchar(255);unique;not null;default:'';comment:Payment Token"`
}
type StripeConfig ¶
type StripeConfig struct {
PublicKey string `json:"public_key"`
SecretKey string `json:"secret_key"`
WebhookSecret string `json:"webhook_secret"`
// WebhookEndpointID is the Stripe webhook endpoint registered for the
// method, so it can be removed when the secret key is rotated to another
// account; empty on methods registered before it was recorded.
WebhookEndpointID string `json:"webhook_endpoint_id,omitempty"`
Payment string `json:"payment"`
}
func (*StripeConfig) Marshal ¶
func (l *StripeConfig) Marshal() ([]byte, error)
func (*StripeConfig) Unmarshal ¶
func (l *StripeConfig) Unmarshal(data []byte) error
Click to show internal directories.
Click to hide internal directories.