Documentation ¶
Overview ¶
Package trade 交易
Index ¶
Constants ¶
View Source
const ( // NumberCardCommodityTagID NumberCardCommodity 号卡商品 tag id tag_group_7272625659887943692 NumberCardCommodityTagID = "tag_group_7272625659887943692" // CustomizedServiceRefundTagID 定制服务 tag id 定制后协商退:tag_group_7272625659887960076,定制后不可退:tag_group_7272625659887976460 CustomizedServiceRefundTagID = "tag_group_7272625659887960076" // CustomizedServiceNoRefundTagID 定制服务 tag id 定制后协商退:tag_group_7272625659887960076,定制后不可退:tag_group_7272625659887976460 CustomizedServiceNoRefundTagID = "tag_group_7272625659887976460" // ContentRechargeTagID 内容充值 tag id tag_group_7272625659888041996 ContentRechargeTagID = "tag_group_7272625659888041996" // VirtualRechargeTagID 虚拟充值 tag id tag_group_7272625659887992844 VirtualRechargeTagID = "tag_group_7272625659887992844" // GhostwritingDocumentTagID 代写文书 tag id tag_group_7297888175123382299 GhostwritingDocumentTagID = "tag_group_7297888175123382299" // VirtualServiceTagID 虚拟服务 tag id tag_group_7272625659888058380 VirtualServiceTagID = "tag_group_7272625659888058380" // GeneralConsultationRefundTagID 普通咨询 tag id 开始服务后协商退:tag_group_7272625659888009228,开始服务后不可退:tag_group_7272625659888025612 GeneralConsultationRefundTagID = "tag_group_7272625659888009228" // GeneralConsultationNoRefundTagID 普通咨询 tag id 开始服务后协商退:tag_group_7272625659888009228,开始服务后不可退:tag_group_7272625659888025612 GeneralConsultationNoRefundTagID = "tag_group_7272625659888025612" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOrderRequest ¶
type CreateOrderRequest struct { SkuList []*SkuItem `json:"skuList" description:"下单商品信息,注意:目前只支持传入一项"` OutOrderNo string `` /* 136-byte string literal not displayed */ TotalAmount int `json:"totalAmount" description:"订单总金额,单位分,支付金额为 = total_amount - discount_amount"` PayExpireSeconds int `` /* 183-byte string literal not displayed */ PayNotifyURL string `json:"payNotifyUrl,omitempty" description:"支付结果通知地址,长度 <= 512byte"` MerchantUID string `json:"merchantUid,omitempty" description:"该笔交易卖家商户号,开发者自定义收款商户号"` OrderEntrySchema *Schema `json:"orderEntrySchema" description:"订单详情页 schema,用于描述订单详情页的跳转协议"` LimitPayWayList []int `` /* 184-byte string literal not displayed */ }
CreateOrderRequest 创建订单
type CreateOrderResponse ¶
type CreateOrderResponse struct { ByteAuthorization string `json:"byteAuthorization"` Data string `json:"data"` }
CreateOrderResponse 创建订单
type ItemOrder ¶
type ItemOrder struct { ItemOrderID string `json:"item_order_id"` SkuID string `json:"sku_id"` ItemOrderAmount int `json:"item_order_amount"` }
ItemOrder 商品订单
type QueryOrderData ¶
type QueryOrderData struct { OrderID string `json:"order_id"` OutOrderNo string `json:"out_order_no"` AppID string `json:"app_id"` PayStatus string `json:"pay_status"` PayTime int64 `json:"pay_time"` PayChannel int `json:"pay_channel"` ChannelPayID string `json:"channel_pay_id"` TradeTime int64 `json:"trade_time"` TotalAmount int `json:"total_amount"` DiscountAmount int `json:"discount_amount"` MerchantUID string `json:"merchant_uid"` CpExtra string `json:"cp_extra"` ItemOrderList []*ItemOrder `json:"item_order_list"` }
QueryOrderData 查询订单
type QueryOrderRequest ¶
type QueryOrderRequest struct { OrderID string `json:"order_id,omitempty" description:"交易订单号,order_id 与 out_order_no 二选一"` OutOrderNo string `json:"out_order_no,omitempty" description:"开发者的单号,order_id 与 out_order_no 二选一"` }
QueryOrderRequest 查询订单
type QueryOrderResponse ¶
type QueryOrderResponse struct { Data *QueryOrderData `json:"data"` ErrNo int `json:"err_no"` ErrMsg string `json:"err_msg"` LogID string `json:"log_id"` }
QueryOrderResponse 查询订单
type SkuItem ¶
type SkuItem struct { SkuID string `` /* 130-byte string literal not displayed */ Price int `json:"price" description:"商品价格,单位分"` Quantity int `json:"quantity" description:"商品数量,购买数量 0 < quantity <= 100 "` Title string `json:"title" description:"商品标题,如:商品名称、服务名称、付费工具名称等"` ImageList []string `` /* 189-byte string literal not displayed */ Type int `` /* 270-byte string literal not displayed */ TagGroupID string `json:"tagGroupId" description:"商品标签组 id,用于商品标签的分组,长度 <= 64 字节"` EntrySchema *Schema `json:"entrySchema,omitempty" description:"商品详情页 schema,用于描述商品详情页的跳转协议"` }
SkuItem sku item info
type Trade ¶
type Trade struct {
// contains filtered or unexported fields
}
Trade creates trade relation
func (*Trade) CreateTrade ¶
func (t *Trade) CreateTrade(ctx context.Context, req *CreateOrderRequest) (resp *CreateOrderResponse, err error)
CreateTrade create trade relation
func (*Trade) QueryTrade ¶
func (t *Trade) QueryTrade(ctx context.Context, req *QueryOrderRequest) (resp *QueryOrderResponse, err error)
QueryTrade query trade relation
Click to show internal directories.
Click to hide internal directories.