Documentation
¶
Index ¶
- Constants
- Variables
- func MapRefundStatus(responseCode string) string
- func MappingStatus(responseCode string) string
- func MoneyFeeToString(moneyFee float64) string
- func New() payment.Driver
- type Authorize
- func (a *Authorize) IsSupported(s config.Support) bool
- func (a *Authorize) Pay(ctx echo.Context, cfg *config.Pay) (*config.PayResponse, error)
- func (a *Authorize) PayNotify(ctx echo.Context) error
- func (a *Authorize) PayQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)
- func (a *Authorize) Refund(ctx echo.Context, cfg *config.Refund) (*config.Result, error)
- func (a *Authorize) RefundNotify(ctx echo.Context) error
- func (a *Authorize) RefundQuery(ctx echo.Context, cfg *config.Query) (*config.Result, error)
- func (a *Authorize) SetAccount(account *config.Account) payment.Driver
- func (a *Authorize) SetNotifyCallback(callback payment.NotifyCallback) payment.Driver
- func (a *Authorize) VerifySign(ctx echo.Context) error
Constants ¶
const Name = `authorize`
Variables ¶
var SupportedCurrencies = []string{"USD"} // Authorize.Net 主要支持 USD
Functions ¶
func MappingStatus ¶
MappingStatus 映射 Authorize.Net Response Code 状态文档: https://developer.authorize.com/api/reference/response-codes.html
Types ¶
type Authorize ¶
type Authorize struct {
// contains filtered or unexported fields
}
func (*Authorize) Pay ¶
Pay 创建交易(Authorize.Net JSON API) 文档: https://developer.authorize.com/api/reference/index.html#payment-transactions Authorize.Net 通常配合前端表单收集卡号信息,这里返回必要参数
func (*Authorize) PayNotify ¶
PayNotify 处理 Silent Post / Webhook 通知 文档: https://developer.authorize.com/api/reference/features/authentication.html#Silent_Post
func (*Authorize) PayQuery ¶
PayQuery 查询交易状态 文档: https://developer.authorize.com/api/reference/index.html#get-transaction-details-request
func (*Authorize) Refund ¶
Refund 发起退款 文档: https://developer.authorize.com/api/reference/index.html#refund-a-transaction
func (*Authorize) RefundNotify ¶
RefundNotify 处理退款通知 (Silent Post / Webhook) 文档: https://developer.authorize.com/api/reference/features/authentication.html#Silent_Post 退款通知的 x_type 字段为 "credit" 或 "refund"
func (*Authorize) RefundQuery ¶
RefundQuery 查询退款(通过查询原始交易获取退款信息)
func (*Authorize) SetAccount ¶
func (*Authorize) SetNotifyCallback ¶
func (a *Authorize) SetNotifyCallback(callback payment.NotifyCallback) payment.Driver