twoco

package
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Name = `twoco`

Variables

View Source
var SupportedCurrencies = []string{}/* 138 elements not displayed */

Functions

func MapRefundStatus

func MapRefundStatus(status string) string

MapRefundStatus 映射 2Checkout 退款状态

func MappingStatus

func MappingStatus(status string) string

MappingStatus 映射 2Checkout 销售状态

func MoneyFeeToString

func MoneyFeeToString(moneyFee float64) string

MoneyFeeToString 金额转字符串

func New

func New() payment.Driver

Types

type Twoco

type Twoco struct {
	// contains filtered or unexported fields
}

func (*Twoco) IsSupported

func (a *Twoco) IsSupported(s config.Support) bool

func (*Twoco) Pay

func (a *Twoco) Pay(ctx echo.Context, cfg *config.Pay) (*config.PayResponse, error)

Pay 创建 2Checkout Sale 文档: https://verifone.github.io/2co-api-docs/#create-sale

func (*Twoco) PayNotify

func (a *Twoco) PayNotify(ctx echo.Context) error

PayNotify 处理 IPN (Instant Payment Notification) 回调 文档: https://verifone.github.io/2co-api-docs/#instant-notification-service-ins

func (*Twoco) PayQuery

func (a *Twoco) PayQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)

PayQuery 通过 REST API 查询销售详情 文档: https://verifone.github.io/2co-api-docs/#retrieve-sale

func (*Twoco) Refund

func (a *Twoco) Refund(ctx echo.Context, cfg *config.Refund) (*config.Result, error)

Refund 发起退款 文档: https://verifone.github.io/2co-api-docs/#create-refund

func (*Twoco) RefundNotify

func (a *Twoco) RefundNotify(ctx echo.Context) error

RefundNotify 通过 PayNotify 统一处理

func (*Twoco) RefundQuery

func (a *Twoco) RefundQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)

RefundQuery 查询退款详情

func (*Twoco) SetAccount

func (a *Twoco) SetAccount(account *config.Account) payment.Driver

func (*Twoco) SetNotifyCallback

func (a *Twoco) SetNotifyCallback(callback payment.NotifyCallback) payment.Driver

func (*Twoco) VerifySign

func (a *Twoco) VerifySign(ctx echo.Context) error

VerifySign 验证签名(IPN签名在PayNotify中已处理)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL