model

package
v3.0.0-...-8a73552 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amount

type Amount struct {
	Total            int64   `json:"total,omitempty"`             // 金额
	Currency         string  `json:"currency,omitempty"`          // 货币类型
	Refund           int64   `json:"refund,omitempty"`            // 退款金额
	PayerTotal       int64   `json:"payer_total,omitempty"`       // 用户支付金额
	PayerCurrency    string  `json:"payer_currency,omitempty"`    // 用户支付币种
	PayerRefund      int64   `json:"payer_refund,omitempty"`      // 用户退款金额
	SettlementRefund int64   `json:"settlement_refund,omitempty"` // 应结退款金额
	SettlementTotal  int64   `json:"settlement_total,omitempty"`  // 应结订单金额
	DiscountRefund   int64   `json:"discount_refund,omitempty"`   // 优惠退款金额
	From             []*From `json:"from,omitempty"`              // 退款出资账户及金额

	// combine
	TotalAmount int64 `json:"total_amount,omitempty"` // 标价金额
	PayerAmount int64 `json:"payer_amount,omitempty"` // 现金支付金额

	// 停车服务
	DiscountTotal int64 `json:"discount_total,omitempty"` // 折扣
}

Amount 金额信息

type AppResponse

type AppResponse struct {
	WechatError        // 微信Error
	RequestId   string `json:"request_id,omitempty"` // 唯一请求ID
	PrepayId    string `json:"prepay_id,omitempty"`  // 预支付交易会话标示
}

AppResponse APP支付应答

type ErrorDetail

type ErrorDetail struct {
	Field    interface{} `json:"field,omitempty"`    // 错误参数的位置
	Value    interface{} `json:"value,omitempty"`    // 错误的值
	Issue    interface{} `json:"issue,omitempty"`    // 具体错误的原因
	Location interface{} `json:"location,omitempty"` // 出错的位置
}

ErrorDetail 错误详情

type From

type From struct {
	Account string `json:"account,omitempty"` // 出资账户类型
	Amount  int64  `json:"amount,omitempty"`  // 出资金额
}

From 出资账户及金额

type GoodsDetail

type GoodsDetail struct {
	MerchantGoodsId  string `json:"merchant_goods_id,omitempty"`  // 商户侧商品编码
	WechatpayGoodsId string `json:"wechatpay_goods_id,omitempty"` // 微信支付商品编码
	GoodsName        string `json:"goods_name,omitempty"`         // 商品名称
	Quantity         int    `json:"quantity,omitempty"`           // 用户购买的数量
	UnitPrice        int64  `json:"unit_price,omitempty"`         // 商品单价
	GoodsId          string `json:"goods_id,omitempty"`           // 商品编码
	DiscountAmount   int64  `json:"discount_amount,omitempty"`    // 商品优惠金额
	GoodsRemark      string `json:"goods_remark,omitempty"`       // 商品备注
	RefundAmount     int64  `json:"refund_amount,omitempty"`      // 商品退款金额
	RefundQuantity   int    `json:"refund_quantity,omitempty"`    // 单品的退款数量
}

GoodsDetail 商品详情

type H5Response

type H5Response struct {
	WechatError        // 微信Error
	RequestId   string `json:"request_id,omitempty"` // 唯一请求ID
	H5Url       string `json:"h5_url,omitempty"`     // 支付跳转链接
}

H5Response H5支付应答

type JSAPIResponse

type JSAPIResponse struct {
	WechatError        // 微信Error
	RequestId   string `json:"request_id,omitempty"` // 唯一请求ID
	PrepayId    string `json:"prepay_id,omitempty"`  // 预支付交易会话标示
}

JSAPIResponse JSAPI支付应答

type MerchantPayer

type MerchantPayer struct {
	OpenId string `json:"openid,omitempty"` // 用户OpenId
}

MerchantPayer 商户平台支付者信息

type NativeResponse

type NativeResponse struct {
	WechatError        // 微信Error
	RequestId   string `json:"request_id,omitempty"` // 唯一请求ID
	CodeUlr     string `json:"code_ulr,omitempty"`   // 二维码链接
}

NativeResponse native支付应答

type PartnerPayer

type PartnerPayer struct {
	SpOpenId  string `json:"sp_openid,omitempty"`  // 用户服务标示
	SubOpenId string `json:"sub_openid,omitempty"` // 用户子标示
}

PartnerPayer 服务商平台支付者信息

type PromotionDetail

type PromotionDetail struct {
	PromotionId         string         `json:"promotion_id,omitempty"`         // 券或者立减优惠ID
	CouponId            string         `json:"coupon_id,omitempty"`            // 券ID
	Name                string         `json:"name,omitempty"`                 // 优惠名称
	Scope               string         `json:"scope,omitempty"`                // 优惠范围
	Type                string         `json:"type,omitempty"`                 // 优惠类型
	Amount              int64          `json:"amount,omitempty"`               // 优惠券面额
	StockId             string         `json:"stock_id,omitempty"`             // 活动ID
	WechatpayContribute int64          `json:"wechatpay_contribute,omitempty"` // 微信出资
	MerchantContribute  int64          `json:"merchant_contribute,omitempty"`  // 商户出资
	OtherContribute     int64          `json:"other_contribute,omitempty"`     // 其他出资
	Currency            string         `json:"currency,omitempty"`             // 优惠币种
	RefundAmount        int64          `json:"refund_amount,omitempty"`        // 优惠退款金额
	GoodsDetail         []*GoodsDetail `json:"goods_detail,omitempty"`         // 单品列表
}

PromotionDetail 优惠功能

type SceneInfo

type SceneInfo struct {
	DeviceId string `json:"device_id,omitempty"` // 商户端设备号
}

SceneInfo 场景信息

type WError

type WError interface {
	Error() error
}

type WechatCipherData

type WechatCipherData struct {
	Algorithm      string `json:"algorithm,omitempty"`       // 加密算法
	CipherText     string `json:"ciphertext,omitempty"`      // 密文
	AssociatedData string `json:"associated_data,omitempty"` // 附加数据
	OriginalType   string `json:"original_type,omitempty"`   // 原始回调类型
	Nonce          string `json:"nonce,omitempty"`           // 加密使用的随机串
}

WechatCipherData 微信返回的加密数据

type WechatError

type WechatError struct {
	Code    interface{} `json:"code,omitempty"`    // 详细错误码
	Message interface{} `json:"message,omitempty"` // 错误描述
	Detail  ErrorDetail `json:"detail,omitempty"`  // 错误详细信息
}

WechatError 调用微信接口返回的通用错误格式

func (WechatError) Error

func (w WechatError) Error() error

type WechatHeader

type WechatHeader struct {
	RequestId string // 唯一请求ID
	NotifyId  string // 唯一通知ID
}

WechatHeader 微信Header

type WechatNotifyResponse

type WechatNotifyResponse struct {
	Id           string            `json:"id,omitempty"`            // 通知的唯一ID
	CreateTime   string            `json:"create_time,omitempty"`   // 通知创建时间
	EventType    string            `json:"event_type,omitempty"`    // 通知类型
	ResourceType string            `json:"resource_type,omitempty"` // 通知的资源数据类型
	Summary      string            `json:"summary,omitempty"`       // 回调摘要
	Resource     *WechatCipherData `json:"resource,omitempty"`      // 通知资源数据
}

WechatNotifyResponse 微信通知的回复格式

Jump to

Keyboard shortcuts

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