package kuaishou_mini // GetLoginAuth 快手授权返回 type GetLoginAuth struct { Result int `json:"result"` // 返回数据条数 Error string `json:"error"` //错误类型 ErrorMsg string `json:"error_msg"` // 错误消息 SessionKey string `json:"session_key"` // 会话秘钥 OpenId string `json:"open_id"` // 用户当前小程序下唯一id } type ResultInfo struct { Result int `json:"result"` // 返回数据条数 Error string `json:"error"` //错误类型 ErrorMsg string `json:"error_msg"` // 错误消息 } // GetAutoTokenRes 快手授权返回值 type GetAutoTokenRes struct { Result int64 `json:"result"` AccessToken string `json:"access_token"` ExpiresIn int64 `json:"expires_in"` TokenType string `json:"token_type"` } // PreCreateOrderReq 快手预发单 type PreCreateOrderReq struct { OutOrderNo string `json:"out_order_no"` // 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 OpenId string `json:"open_id"` // 快手用户在当前小程序的open_id TotalAmount int64 `json:"total_amount"` // 用户支付金额,单位为[分]。 Subject string `json:"subject"` // 商品描述。注:1汉字=2字符。 Detail string `json:"detail"` // 商品详情。注:1汉字=2字符。 TypeDetail int `json:"type"` // 商品类型,不同商品类目的编号见 ExpireTime int `json:"expire_time"` // 订单过期时间,单位秒 Sign string `json:"sign"` // 签名 Attach string `json:"attach"` // 开发者自定义字段,回调原样回传. NotifyUrl string `json:"notify_url"` // 回调地址 GoodsId string `json:"goods_id"` // 下单商品id,需与商品对接 (opens new window)时的product_id一致,长度限制256个英文字符,1个汉字=2个英文字符; GoodsDetailUrl string `json:"goods_detail_url"` // 订单详情页跳转path。 MultiCopiesGoodsInfo string `json:"multi_copies_goods_info"` // 单商品购买多份场景 "[{"copies":2}]" CancelOrder int64 `json:"cancel_order"` // 该字段表示创建订单的同时是否覆盖之前已存在的订单。 } // PreCreateOrderResponse 预下单返回参数 type PreCreateOrderResponse struct { Result int `json:"result"` ErrorMsg string `json:"error_msg"` OrderInfo CreateOrderResponseInfo `json:"order_info"` //拉起收银台的 orderInfo } type CreateOrderResponseInfo struct { OrderInfoToken string `json:"order_info_token"` OrderNo string `json:"order_no"` } // GetOrderDetailRes 获取支付订单详情 type GetOrderDetailRes struct { Result int `json:"result"` ErrorMsg string `json:"error_msg"` PaymentInfo string `json:"payment_info"` //拉起收银台的 orderInfo } type PaymentInfo struct { TotalAmount int64 `json:"total_amount"` // 预下单用户支付金额 PayStatus string `json:"pay_status"` // 支付状态。 取值: PROCESSING-处理中|SUCCESS-成功|FAILED-失败 TIMEOUT-超时 PayTime int64 `json:"pay_time"` // 订单支付时间,单位为毫秒时间戳。 PayChannel string `json:"pay_channel"` // 支付渠道。取值:UNKNOWN - 未知|WECHAT-微信 |ALIPAY-支付宝。(注:如果用户还未支付,这里返回的是UNKNOWN.) OutOrderNo string `json:"out_order_no"` // 开发者下单单号 KsOrderNo string `json:"ks_order_no"` // 快手小程序平台订单号 ExtraInfo string `json:"extra_info"` // 订单来源信息,历史订单为"" EnablePromotion bool `json:"enable_promotion"` // 是否参与分销,true:分销,false:非分销 PromotionAmount int64 `json:"promotion_amount"` // 预计分销金额,单位:分 OpenId string `json:"open_id"` // 订单对应的用户open id OrderStatus int64 `json:"order_status"` // 开发者回传的订单同步状态 } // KauiShouCallbackRes 快手支付回调 type KauiShouCallbackRes struct { Data interface{} `json:"data"` MessageId string `json:"message_id"` // 当前回调消息的唯一ID,在同一个消息多次通知时,保持一致。 BizType string `json:"biz_type"` // 业务类型。取值:PAYMENT-支付 AppId string `json:"app_id"` // 当前小程序的AppID Timestamp int64 `json:"timestamp"` // 流程变动的时间戳 } type T2 struct { } type CallBackDetail struct { Channel string `json:"channel"` // 支付渠道。取值:UNKNOWN - 未知|WECHAT-微信|ALIPAY-支付宝 OutOrderNo string `json:"out_order_no"` // 商户系统内部订单号 Attach string `json:"attach"` // 预下单时携带的开发者自定义信息 Status string `json:"status"` // 订单支付状态。 取值: PROCESSING-处理中|SUCCESS-成功|FAILED-失败 KsOrderNo string `json:"ks_order_no"` // 快手小程序平台订单号 OrderAmount int `json:"order_amount"` // 订单金额 TradeNo string `json:"trade_no"` // 用户侧支付页交易单号 ExtraInfo string `json:"extra_info"` // 订单来源信息,同支付查询接口 EnablePromotion bool `json:"enable_promotion"` // 是否参与分销,true:分销,false:非分销 PromotionAmount int `json:"promotion_amount"` // 预计分销金额,单位:分 ApplyRefundReason interface{} `json:"apply_refund_reason"` DeveloperPromotionAmount int `json:"developer_promotion_amount"` KsRefundFailReason interface{} `json:"ks_refund_fail_reason"` KsRefundNo interface{} `json:"ks_refund_no"` KsSettleNo interface{} `json:"ks_settle_no"` OutRefundNo interface{} `json:"out_refund_no"` OutSettleNo interface{} `json:"out_settle_no"` RefundAmount interface{} `json:"refund_amount"` RefundType interface{} `json:"refund_type"` SettleAmount interface{} `json:"settle_amount"` } // RefundParam 申请退单参数 type RefundParam struct { OutOrderNo string `json:"out_order_no"` // 开发者需要发起退款的支付订单号 OutRefundNo string `json:"out_refund_no"` // 开发者的退款单号 Reason string `json:"reason"` // 退款理由 Attach string `json:"attach"` // 开发者自定义字段,回调原样回传 NotifyUrl string `json:"notify_url"` // 通知URL必须为直接可访问的URL,不允许携带查询串。 RefundAmount int64 `json:"refund_amount"` // 用户退款金额,单位为分。不允许传非整数的数值 Sign string `json:"sign"` // 签名 MultiCopiesGoodsInfo string `json:"multi_copies_goods_info"` // 单商品购买多份场景,示例值:[{"copies":2}], 内容见multi_copies_goods_info字段说明 } // RefundRes 申请退款返回参数 type RefundRes struct { Result int `json:"result"` ErrorMsg string `json:"error_msg"` RefundNo string `json:"refund_no"` } // RefundOrderDetail 获取退款订单详情 type RefundOrderDetail struct { Result int `json:"result"` ErrorMsg string `json:"error_msg"` RefundInfo string `json:"refund_info"` } // RefundInfo 获取申请退款详情 type RefundInfo struct { KsOrderNo string `json:"ks_order_no"` RefundStatus string `json:"refund_status"` RefundNo string `json:"refund_no"` KsRefundType string `json:"ks_refund_type"` RefundAmount int `json:"refund_amount"` KsRefundNo string `json:"ks_refund_no"` } // RefundCallBack 快手退款回调 type RefundCallBack struct { //Data struct { OutRefundNo string `json:"out_refund_no"` // 开发者的退款单号 RefundAmount int `json:"refund_amount"` // 退款金额 Attach string `json:"attach"` // 预下单时携带的开发者自定义信息 Status string `json:"status"` // 退款状态。 取值: PROCESSING-处理中,SUCCESS-成功,FAILED-失败 KsOrderNo string `json:"ks_order_no"` // 快手小程序平台订单号 KsRefundNo string `json:"ks_refund_no"` // 快手小程序平台退款单号 KsRefundType string `json:"ks_refund_type"` // 退款账户说明[] //} `json:"data"` //MessageId string `json:"message_id"` //BizType string `json:"biz_type"` //AppId string `json:"app_id"` //Timestamp int64 `json:"timestamp"` } // OrderSettleAccountParam 发起订单结算请求参数 type OrderSettleAccountParam struct { OutOrderNo string `json:"out_order_no"` OutSettleNo string `json:"out_settle_no"` Reason string `json:"reason"` Attach string `json:"attach"` NotifyUrl string `json:"notify_url"` Sign string `json:"sign"` SettleAmount int64 `json:"settle_amount"` MultiCopiesGoodsInfo string `json:"multi_copies_goods_info"` } // OrderSettleAccountRes 发起订单结算返回参数 type OrderSettleAccountRes struct { Result int `json:"result"` ErrorMsg string `json:"error_msg"` SettleNo string `json:"settle_no"` } // QuerySettleInfoRes 查询订单结算信息 type QuerySettleInfoRes struct { Result int `json:"result"` ErrorMsg string `json:"error_msg"` SettleInfo string `json:"settle_info"` } type SettleInfo struct { SettleNo string `json:"settle_no"` TotalAmount int `json:"total_amount"` SettleAmount int `json:"settle_amount"` SettleStatus string `json:"settle_status"` KsOrderNo string `json:"ks_order_no"` KsSettleNo string `json:"ks_settle_no"` } // SettleCallback 快手结算回调 type SettleCallback struct { //Data struct { OutSettleNo string `json:"out_settle_no"` // 外部结算单号,即开发者结算请求的单号。 Attach string `json:"attach"` // 预下单时携带的开发者自定义信息 SettleAmount int `json:"settle_amount"` // 结算后给商户的金额,单位:分 Status string `json:"status"` // 结算状态。 取值: PROCESSING-处理中,SUCCESS-成功,FAILED-失败 KsOrderNo string `json:"ks_order_no"` // 快手小程序平台订单号。 KsSettleNo string `json:"ks_settle_no"` // 快手小程序平台结算单号。 EnablePromotion bool `json:"enable_promotion"` // 是否参与分销,true:分销,false:非分销 PromotionAmount int `json:"promotion_amount"` // 预计分销金额,单位:分 //} `json:"data"` //BizType string `json:"biz_type"` //MessageId string `json:"message_id"` //AppId string `json:"app_id"` //Timestamp int64 `json:"timestamp"` }