model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: MIT Imports: 0 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 总金额
	// 订单总金额,单位为分。
	// 示例值:100
	Total int `json:"total"`

	// Currency 货币类型
	// CNY:人民币,境内商户号仅支持人民币。
	// 示例值:CNY
	Currency string `json:"currency"`
}

Amount 订单信息

type Detail

type Detail struct {

	// CostPrice 订单原价
	// int	否	1、商户侧一张小票订单可能被分多次支付,订单原价用于记录整张小票的交易金额。
	// 2、当订单原价与支付金额不相等,则不享受优惠。
	// 3、该字段主要用于防止同一张小票分多次支付,以享受多次优惠的情况,正常支付订单不必上传此参数。
	// 示例值:608800
	CostPrice int `json:"cost_price"`

	// InvoiceID 商品小票ID
	// string(32)	否	商家小票ID
	// 示例值:微信123
	InvoiceID string `json:"invoice_id"`

	// GoodsDetail 单品列表
	// array	否	单品列表信息条目个数限制:【1,undefined】
	GoodsDetail GoodsDetail `json:"goods_detail"`
}

Detail 优惠功能

type GoodsDetail

type GoodsDetail struct {

	// MerchantGoodsID 商户侧商品编码
	// string(32)	是	由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。
	// 示例值:商品编码
	MerchantGoodsID string `json:"merchant_goods_id"`

	// WechatpayGoodsID 微信侧商品编码
	// string(32)	否	微信支付定义的统一商品编号(没有可不传)
	// 示例值:1001
	WechatpayGoodsID string `json:"wechatpay_goods_id"`

	// GoodsName 商品名称
	// 	string(256)	否	商品的实际名称
	// 示例值:iPhoneX 256G
	GoodsName string `json:"goods_name"`

	// Quantity 商品数量
	// int	是	用户购买的数量
	// 示例值:1
	Quantity int `json:"quantity"`

	// UnitPrice 商品单价
	// int	是	商品单价,单位为分
	// 示例值:828800
	UnitPrice int `json:"unit_price"`
}

GoodsDetail 单品列表 array 否 单品列表信息 条目个数限制:【1,undefined】

type Payer

type Payer struct {

	// SpOpenID 用户服务标识
	// 是	用户在服务商appid下的唯一标识。
	// 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
	SpOpenID string `json:"sp_openid"`

	// SubOpenID 用户子标识
	// 用户在子商户appid下的唯一标识。
	// 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
	SubOpenID string `json:"sub_openid"`
}

Payer 支付者

type SceneInfo

type SceneInfo struct {

	// PayerClientIP 用户终端IP
	// string(45)	是	调用微信支付API的机器IP,支持IPv4和IPv4两种格式的IP地址。
	// 示例值:14.23.150.211
	PayerClientIP string `json:"payer_client_ip"`

	// DeviceID 商户端设备号
	// string(32)	否	商户端设备号(门店号或收银设备ID)。
	// 示例值:013467007045764
	DeviceID string `json:"device_id"`

	// StoreInfo 商户门店信息
	// object	否	商户门店信息
	StoreInfo StoreInfo `json:"store_info"`
}

SceneInfo 场景信息 object 否 query 支付场景描述

type SettleInfo

type SettleInfo struct {

	// ProfitSharing 是否指定分账
	// 是否指定分账,枚举值 true:是 false:否
	// 示例值:true
	ProfitSharing bool `json:"profit_sharing"`

	// SubsidyAmount 补差金额
	// SettleInfo.profit_sharing为true时,该金额才生效。
	// 示例值:10
	SubsidyAmount int64 `json:"subsidy_amount"`
}

SettleInfo 结算信息

type StoreInfo

type StoreInfo struct {

	// ID 门店ID
	// string(32)	否	商户侧门店编号
	// 示例值:0001
	ID string `json:"id"`

	// Name 门店名称
	// string(256)	是	商户侧门店名称
	// 示例值:腾讯大厦分店
	Name string `json:"name"`

	// area_code 地区编码
	// string(32)	是	地区编码,详细请见省市区编号对照表。
	// 示例值:440305
	AreaCode string `json:"area_code"`

	// Address 详细地址
	//	string(512)	是	详细的商户门店地址
	// 示例值:广东省深圳市南山区科技中一道10000号
	Address string `json:"address"`
}

StoreInfo 商户门店信息 object 否 商户门店信息

Jump to

Keyboard shortcuts

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