Documentation
¶
Index ¶
- Constants
- Variables
- func MapRefundStatus(status string) string
- func MappingStatus(status string) string
- func MoneyFeeToString(moneyFee float64) string
- func New() payment.Driver
- type Twoco
- func (a *Twoco) IsSupported(s config.Support) bool
- func (a *Twoco) Pay(ctx echo.Context, cfg *config.Pay) (*config.PayResponse, error)
- func (a *Twoco) PayNotify(ctx echo.Context) error
- func (a *Twoco) PayQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)
- func (a *Twoco) Refund(ctx echo.Context, cfg *config.Refund) (*config.Result, error)
- func (a *Twoco) RefundNotify(ctx echo.Context) error
- func (a *Twoco) RefundQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)
- func (a *Twoco) SetAccount(account *config.Account) payment.Driver
- func (a *Twoco) SetNotifyCallback(callback payment.NotifyCallback) payment.Driver
- func (a *Twoco) VerifySign(ctx echo.Context) error
Constants ¶
View Source
const Name = `twoco`
Variables ¶
View Source
var SupportedCurrencies = []string{}/* 138 elements not displayed */
Functions ¶
Types ¶
type Twoco ¶
type Twoco struct {
// contains filtered or unexported fields
}
func (*Twoco) Pay ¶
Pay 创建 2Checkout Sale 文档: https://verifone.github.io/2co-api-docs/#create-sale
func (*Twoco) PayNotify ¶
PayNotify 处理 IPN (Instant Payment Notification) 回调 文档: https://verifone.github.io/2co-api-docs/#instant-notification-service-ins
func (*Twoco) PayQuery ¶
PayQuery 通过 REST API 查询销售详情 文档: https://verifone.github.io/2co-api-docs/#retrieve-sale
func (*Twoco) Refund ¶
Refund 发起退款 文档: https://verifone.github.io/2co-api-docs/#create-refund
func (*Twoco) RefundNotify ¶
RefundNotify 通过 PayNotify 统一处理
func (*Twoco) RefundQuery ¶
RefundQuery 查询退款详情
func (*Twoco) SetNotifyCallback ¶
func (a *Twoco) SetNotifyCallback(callback payment.NotifyCallback) payment.Driver
Click to show internal directories.
Click to hide internal directories.