lkl_sdk/unifiedreturn/refund/request.go

35 lines
2.8 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package refund
// RequestRefund 统一退货基础请求结构体
// 参考文档https://o.lakala.com/#/home/document/detail?id=894
type RequestRefund struct {
ReqTime string `json:"req_time"`
Version string `json:"version"`
ReqData *RequestDataRefund `json:"req_data"`
}
// RequestDataRefund 统一退货请求数据结构体
// 注意origin_out_trade_no、origin_log_no、origin_trade_no至少一个必填调用收银台下单接口拉起交易后发起退款时至少要传两个
// 优先级顺序origin_trade_no > origin_log_no > origin_out_trade_no
type RequestDataRefund struct {
MerchantNo string `json:"merchant_no"` // merchant_no: 商户号 (必填拉卡拉分配的商户号String(15))
TermNo string `json:"term_no"` // term_no: 终端号 (必填拉卡拉分配的终端号String(8))
OutTradeNo string `json:"out_trade_no"` // out_trade_no: 商户请求流水号 (必填商户系统唯一String(32))
RefundAmount string `json:"refund_amount"` // refund_amount: 退款金额 (必填单位分整数数字型字符String(12))
RefundReason string `json:"refund_reason,omitempty"` // refund_reason: 退货原因 (可选String(32))
OriginLogNo string `json:"origin_log_no,omitempty"` // origin_log_no: 拉卡拉对账单流水号 (可选正交易返回的拉卡拉对账单流水号String(14))
OriginOutTradeNo string `json:"origin_out_trade_no,omitempty"` // origin_out_trade_no: 原商户交易流水号 (可选String(32))
OriginTradeNo string `json:"origin_trade_no,omitempty"` // origin_trade_no: 原交易拉卡拉交易订单号 (可选String(32))
LocationInfo *LocationInfo `json:"location_info"` // location_info: 地址位置信息 (必填)
RefundAccMode string `json:"refund_acc_mode,omitempty"` // refund_acc_mode: 退货账户模式 (可选00退货账户余额 05商户余额 06终端余额 30终点账户String(2))
NotifyURL string `json:"notify_url,omitempty"` // notify_url: 后台通知地址 (可选交易结果通知地址String(128))
RefundAmtSts string `json:"refund_amt_sts,omitempty"` // refund_amt_sts: 退货资金状态 (可选00 分账前01 分账后分账交易部分退货的情况需要前端上送交易的分账状态String(2))
}
// LocationInfo 地址位置信息结构体
type LocationInfo struct {
RequestIP string `json:"request_ip"` // request_ip: 请求IP (必填)
Location string `json:"location"` // location: 位置信息 (必填,如经纬度等)
BaseStation string `json:"base_station,omitempty"` // base_station: 基站信息 (可选)
}