Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { TryTopUp(uint64, TryTopUpRequest) (TryTopUpResponse, error) CommitTopUp(uint64, uint64, map[string]interface{}) error CancelTopUp(uint64, uint64, map[string]interface{}) error TryExternalPay(uint64, TryPayRequest) (TryPayResponse, error) TryPay(uint64, TryPayRequest) (TryPayResponse, error) CommitPay(uint64, CommitPayRequest) error CancelPay(uint64, CancelPayRequest) error }
func NewAdapter ¶
func NewAdapter() Adapter
type CancelPayRequest ¶
type CancelTopUpRequest ¶
type CommitPayRequest ¶
type CommitTopUpRequest ¶
type TryPayRequest ¶
type TryPayRequest struct { UserID uint64 `json:"userId" binding:"required"` BusinessID uint64 `json:"businessId" binding:"required"` Amount int64 `json:"amount" binding:"required"` ChargeAmount int64 `json:"chargeAmount" binding:"gte=0"` Currency string `json:"currency" binding:"required"` Metadata map[string]interface{} `json:"metadata"` }
type TryPayResponse ¶
type TryPayResponse struct {
ID uint64 `json:"id"`
}
type TryTopUpRequest ¶
type TryTopUpResponse ¶
type TryTopUpResponse struct {
ID uint64 `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.