saobei

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

扫呗支付 API

具体API使用介绍,请参考gopay/saobei/client_test.go

支付2.0接口

请参考gopay/saobei/pay_test.go,

  • 小程序支付接口(暂无账号为测试可用性):client.MiniPay()
  • 付款码支付 client.BarcodePay()
  • 支付查询 client.Query()
  • 退款申请 client.Refund()
  • 退款订单查询 client.QueryRefund()

资金接口

请参考gopay/saobei/withdraw_test.go,

订单分账(旧版)

请参考gopay/saobei/allocate_test.go,

Documentation

Index

Constants

View Source
const (

	//PayTypeWX 支付方式:微信
	PayTypeWX = "010"
	//PayTypeAli 支付方式:支付宝
	PayTypeAli = "020"
	//PayTypeQQ 支付方式:QQ钱包
	PayTypeQQ = "060"
	//PayTypeYi 支付方式:翼支付
	PayTypeYi = "100"
	//PayTypeYL 支付方式:银联二维码
	PayTypeYL = "110"

	//ResultCodeSuccess 业务结果:01 成功
	ResultCodeSuccess = "01"
	//ResultCodeFail 业务结果:02 失败
	ResultCodeFail = "02"
	//ResultCodePaying 业务结果:03 支付中
	ResultCodePaying = "03"

	//TradeStatusSuccess 交易订单状态:支付成功
	TradeStatusSuccess = "SUCCESS"
	//TradeStatusRefund 交易订单状态:转入退款
	TradeStatusRefund = "REFUND"
	//TradeStatusNotPay 交易订单状态:未支付
	TradeStatusNotPay = "NOTPAY"
	//TradeStatusClosed 交易订单状态:已关闭
	TradeStatusClosed = "CLOSED"
	//TradeStatusUserPaying 交易订单状态:用户支付中
	TradeStatusUserPaying = "USERPAYING"
	//TradeStatusRevoked 交易订单状态:已撤销
	TradeStatusRevoked = "REVOKED"
	//TradeStatusNoPay 交易订单状态:未支付支付超时
	TradeStatusNoPay = "NOPAY"
	//TradeStatusPayError 交易订单状态:支付失败
	TradeStatusPayError = "PAYERROR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocateQueryData added in v0.0.5

type AllocateQueryData struct {
	AllocateTime   string `json:"allocate_time"`   //分账时间yyyy-MM-dd HH:mm:ss
	SrcTradeNo     string `json:"src_trade_no"`    //源交易流水
	SrcTradeDate   string `json:"src_trade_date"`  //源交易日期yyyyMMdd
	TxnAmt         string `json:"txn_amt"`         //分账金额 单位:分
	AccountOut     string `json:"account_out"`     //分账出账户
	AccountIn      string `json:"account_in"`      //分账入帐户
	ContractNo     string `json:"contract_no"`     //合同编号
	RuleNo         string `json:"rule_no"`         //分账规则编号
	AllocateStatus string `json:"allocate_status"` //分账状态00:未分帐,01:已分帐,02:分账失败, 03:已撤销
}

AllocateQueryData 分账交易查询响应

type AllocateRule added in v0.0.5

type AllocateRule struct {
	AccountIn     string `json:"account_in"`
	AllocateScale int    `json:"allocate_scale"`
}

AllocateRule 分账规则电子协议生成规则

type AllocateRuleList added in v0.0.5

type AllocateRuleList struct {
	RuleNo string         `json:"rule_no"`
	Rules  []AllocateRule `json:"rules"`
}

AllocateRuleList 分账规则电子协议生成规则

type BarcodePayRsp

type BarcodePayRsp struct {
	RspBase
	PayType       string `json:"pay_type"`       //支付方式,010微信,020支付宝
	MerchantName  string `json:"merchant_name"`  //商户名称
	TerminalId    string `json:"terminal_id"`    //终端号
	DeviceNo      string `json:"device_no"`      //商户终端设备号(商户自定义,如门店编号),必须在平台已配置过
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式,系统原样返回

	TotalFee            string `json:"total_fee"`             //金额,单位分
	BuyerPayFee         string `json:"buyer_pay_fee"`         // 买家实付金额(分)pay_ver为202时返回
	PlatformDiscountFee string `json:"platform_discount_fee"` // 平台优惠金额(分)pay_ver为202时返回
	MerchantDiscountFee string `json:"merchant_discount_fee"` // 商家优惠金额(分)pay_ver为202时返回
	EndTime             string `json:"end_time"`              // 支付完成时间,yyyyMMddHHmmss,全局统一时间格式
	OutTradeNo          string `json:"out_trade_no"`          //平台唯一订单号
	ChannelTradeNo      string `json:"channel_trade_no"`      //通道订单号,微信订单号、支付宝订单号等
	ChannelOrderNo      string `json:"channel_order_no"`      //银行渠道订单号,微信支付时显示在支付成功页面的条码,可用作扫码查询和扫码退款时匹配
	UserId              string `json:"user_id"`               //付款方用户id,“微信openid”、“支付宝账户”
	Attach              string `json:"attach"`                //附加数据,原样返回
	ReceiptFee          string `json:"receipt_fee"`           //商家应结算金额,单位分
	BankType            string `json:"bank_type"`             //银行类型,采用字符串类型的银行标识
	PromotionDetail     string `json:"promotion_detail"`      //官方营销详情,pay_ver=202时返回. 本交易支付时使用的所有优惠券信息 ,单品优惠功能字段,详情见
	OrderBody           string `json:"order_body"`            //订单标题描述
	SubOpenid           string `json:"sub_openid"`            //微信子商户sub_appid对应的用户标识
}

BarcodePayRsp 付款码支付(扫码支付)响应

type BizErr

type BizErr struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

BizErr 用于判断通联的业务逻辑是否有错误

func (*BizErr) Error

func (e *BizErr) Error() string

type CancelAllocateRsp added in v0.0.5

type CancelAllocateRsp struct {
	RspBase
	TerminalId    string `json:"terminal_id"`    //终端号
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,扫呗系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式
	OutTradeNo    string `json:"out_trade_no"`   //利楚唯一订单号
}

CancelAllocateRsp 撤销分账

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(instNo, key, merchantNo, terminalId, accessToken string, isProd bool) (*Client, error)

NewClient 初始化扫呗客户端 instNo string //商户系统机构号inst_no key string // 商户系统令牌 merchantNo string // 支付系统:商户号 terminalId string // 支付系统:商户号终端号 accessToken string // 支付系统: 令牌 isProd:是否是正式环境

func (*Client) BarcodePay

func (c *Client) BarcodePay(ctx context.Context, bm gopay.BodyMap) (rsp *BarcodePayRsp, err error)

BarcodePay 付款码支付(扫码支付) https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rinsc3#title-node14

func (*Client) CancelAllocate added in v0.0.5

func (c *Client) CancelAllocate(ctx context.Context, bm gopay.BodyMap) (rsp *CancelAllocateRsp, err error)

CancelAllocate 撤销分账 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rnqeem#title-node8

func (*Client) CloseOrder added in v0.1.3

func (c *Client) CloseOrder(ctx context.Context, bm gopay.BodyMap) (rsp *QueryRefundRsp, err error)

CloseOrder 关闭订单 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rinsc3#title-node21

func (*Client) DoAllocate added in v0.0.5

func (c *Client) DoAllocate(ctx context.Context, bm gopay.BodyMap) (rsp *DoAllocateRsp, err error)

DoAllocate 订单分账 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rnqeem#title-node5

func (*Client) GenAllocateRuleList added in v0.0.5

func (c *Client) GenAllocateRuleList(arr []AllocateRule) string

GenAllocateRuleList 生成分账规则

func (*Client) GenerateContract added in v0.0.5

func (c *Client) GenerateContract(ctx context.Context, bm gopay.BodyMap) (rsp *GenerateContractRsp, err error)

GenerateContract 分账规则电子协议生成 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rnqeem#title-node2

func (*Client) MiniPay

func (c *Client) MiniPay(ctx context.Context, bm gopay.BodyMap) (rsp *MiniPayRsp, err error)

MiniPay 小程序支付接口 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rinsc3#title-node17

func (*Client) QrPay added in v0.1.3

func (c *Client) QrPay(ctx context.Context, bm gopay.BodyMap) (rsp *QrPayRsp, err error)

QrPay 聚合码支付 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rinsc3#title-node24

func (*Client) Query

func (c *Client) Query(ctx context.Context, bm gopay.BodyMap) (rsp *QueryRsp, err error)

Query 支付查询 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rinsc3#title-node18

func (*Client) QueryAllocate added in v0.0.5

func (c *Client) QueryAllocate(ctx context.Context, bm gopay.BodyMap) (rsp *QueryAllocateRsp, err error)

QueryAllocate 分账交易查询 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rnqeem#title-node6

func (*Client) QueryAllocateTotal added in v0.0.5

func (c *Client) QueryAllocateTotal(ctx context.Context, bm gopay.BodyMap) (rsp *QueryAllocateTotalRsp, err error)

QueryAllocateTotal 入帐户资金汇总查询 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rnqeem#title-node7

func (*Client) QueryContract added in v0.0.5

func (c *Client) QueryContract(ctx context.Context, bm gopay.BodyMap) (rsp *QueryContractRsp, err error)

QueryContract 分账电子协议查询 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rnqeem#title-node4

func (*Client) QueryRefund

func (c *Client) QueryRefund(ctx context.Context, bm gopay.BodyMap) (rsp *QueryRefundRsp, err error)

QueryRefund 退款订单查询 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rinsc3#title-node22

func (*Client) Refund

func (c *Client) Refund(ctx context.Context, bm gopay.BodyMap) (rsp *RefundRsp, err error)

Refund 退款申请 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rinsc3#title-node19

func (*Client) SignContract added in v0.0.5

func (c *Client) SignContract(ctx context.Context, bm gopay.BodyMap) (rsp *SignContractRsp, err error)

SignContract 分账规则电子协议签署 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/rnqeem#title-node3

func (*Client) WithdrawApplyCash added in v0.0.5

func (c *Client) WithdrawApplyCash(ctx context.Context, bm gopay.BodyMap) (rsp *WithdrawApplyCashRsp, err error)

WithdrawApplyCash 发起提现 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/ml9uvg#title-node3

func (*Client) WithdrawQueryCash added in v0.0.5

func (c *Client) WithdrawQueryCash(ctx context.Context, bm gopay.BodyMap) (rsp *DoAllocateRsp, err error)

WithdrawQueryCash 查询余额 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/ml9uvg#title-node1

func (*Client) WithdrawQueryFee added in v0.0.5

func (c *Client) WithdrawQueryFee(ctx context.Context, bm gopay.BodyMap) (rsp *WithdrawQueryFeeRsp, err error)

WithdrawQueryFee 查询提现手续费 https://help.lcsw.cn/xrmpic/tisnldchblgxohfl/ml9uvg#title-node2

type CloseOrderRsp added in v0.1.3

type CloseOrderRsp struct {
	RspBase
	PayType       string `json:"pay_type"`       //支付方式,010微信,020支付宝
	TerminalId    string `json:"terminal_id"`    //终端号
	DeviceNo      string `json:"device_no"`      //商户终端设备号(商户自定义,如门店编号),必须在平台已配置过
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式,系统原样返回
}

CloseOrderRsp 关闭订单

type DoAllocateRsp added in v0.0.5

type DoAllocateRsp struct {
	RspBase
	MerchantName  string `json:"merchant_name"`  //商户名称
	TerminalId    string `json:"terminal_id"`    //终端号
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,扫呗系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式
	OutTradeNo    string `json:"out_trade_no"`   //利楚唯一订单号
	Attach        string `json:"attach"`         //附加数据,原样返回
}

DoAllocateRsp 订单分账响应

type GenerateContractRsp added in v0.0.5

type GenerateContractRsp struct {
	RspBase
	TraceNo    string `json:"trace_no"`    //原请求流水号
	ExpireTs   string `json:"expire_ts"`   //默认1分钟
	AmtTs      string `json:"amt_ts"`      //验证金额有效期
	ContractNo string `json:"contract_no"` //协议编号
	VerifyType int    `json:"verify_type"` //pay_ver值为100时返回,验证类型:1 打款认证;2 短信验证码
	SignUrl    string `json:"sign_url"`    //协议签署服务地址
}

GenerateContractRsp 分账规则电子协议生成响应

type MiniPayRsp

type MiniPayRsp struct {
	RspBase
	PayType       string `json:"pay_type"`       //支付方式,010微信,020支付宝
	MerchantName  string `json:"merchant_name"`  //商户名称
	TerminalId    string `json:"terminal_id"`    //终端号
	DeviceNo      string `json:"device_no"`      //商户终端设备号(商户自定义,如门店编号),必须在平台已配置过
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式,系统原样返回

	TotalFee   string `json:"total_fee"`    //金额,单位分
	OutTradeNo string `json:"out_trade_no"` //平台唯一订单号
	AppId      string `json:"appId"`        //微信小程序支付返回字段,公众号id
	TimeStamp  string `json:"timeStamp"`    //微信小程序支付返回字段,时间戳,示例:1414561699,标准北京时间,时区为东八区,自1970年1月1日 0点0分0秒以来的秒数。注意:部分系统取到的值为毫秒级,需要转换成秒(10位数字)。
	NonceStr   string `json:"nonceStr"`     //微信小程序支付返回字段,随机字符串
	PackageStr string `json:"package_str"`  //微信小程序支付返回字段,订单详情扩展字符串,示例:prepay_id=123456789,统一下单接口返回的prepay_id参数值,提交格式如:prepay_id=
	SignType   string `json:"signType"`     //微信小程序支付返回字段,签名方式,示例:MD5,RSA
	PaySign    string `json:"paySign"`      //微信小程序支付返回字段,签名
	AliTradeNo string `json:"ali_trade_no"` //支付宝小程序支付返回字段用于调起支付宝小程序
}

MiniPayRsp 小程序支付响应

type QrPayRsp added in v0.1.3

type QrPayRsp struct {
	RspBase
	MerchantName  string `json:"merchant_name"`  //商户名称
	TerminalId    string `json:"terminal_id"`    //终端号
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式,系统原样返回
	QrUrl         string `json:"qr_url"`         // 短链接,需调用方自己转换成二维码或直接在微信和支付宝、云闪付内打开链接
}

QrPayRsp 聚合码支付响应

type QueryAllocateRsp added in v0.0.5

type QueryAllocateRsp struct {
	RspBase
	TerminalId    string              `json:"terminal_id"`    //终端号
	TerminalTrace string              `json:"terminal_trace"` //终端流水号,商户系统的订单号,扫呗系统原样返回
	TerminalTime  string              `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式
	OutTradeNo    string              `json:"out_trade_no"`   //利楚唯一订单号
	DataListJson  string              `json:"data_list_json"` //数据对象,JSON字符串
	DataList      []AllocateQueryData `json:"data_list"`
}

QueryAllocateRsp 分账交易查询响应

type QueryAllocateTotalData added in v0.0.8

type QueryAllocateTotalData struct {
	AccountOut     string `json:"account_out"`     //分账出账户
	TxnAmt         string `json:"txn_amt"`         //分账金额 单位:分
	SrcTradeDate   string `json:"src_trade_date"`  //源交易日期yyyyMMdd
	SrcTradeNo     string `json:"src_trade_no"`    //源交易流水
	ContractNo     string `json:"contract_no"`     //合同编号
	RuleNo         string `json:"rule_no"`         //分账规则编号
	AllocateStatus string `json:"allocate_status"` //分账状态00:未分帐,01:已分帐,02:分账失败, 03:已撤销
}

QueryAllocateTotalData 入帐户资金汇总查询 明细数据

type QueryAllocateTotalRsp added in v0.0.5

type QueryAllocateTotalRsp struct {
	RspBase
	TraceNo      string                   `json:"trace_no"`       //原请求流水号
	AccountIn    string                   `json:"account_in"`     //分账入帐户
	DataListJson string                   `json:"data_list_json"` //数据对象,JSON字符串
	DataList     []QueryAllocateTotalData `json:"-"`
}

QueryAllocateTotalRsp 入帐户资金汇总查询

type QueryContractRsp added in v0.0.5

type QueryContractRsp struct {
	RspBase
	TraceNo       string `json:"trace_no"`       //原请求流水号
	ContractNo    string `json:"contract_no"`    //协议编号
	ContractState string `json:"contract_state"` //协议状态,签署中01(刚生成)、已签署02(审核中)、失效03(审核驳回/功能关闭)、已生效04
	SignUrl       string `json:"sign_url"`       //协议签署服务地址
}

QueryContractRsp 分账电子协议查询响应

type QueryRefundRsp added in v0.0.2

type QueryRefundRsp struct {
	RspBase
	PayType       string `json:"pay_type"`       //支付方式,010微信,020支付宝
	MerchantName  string `json:"merchant_name"`  //商户名称
	TerminalId    string `json:"terminal_id"`    //终端号
	DeviceNo      string `json:"device_no"`      //商户终端设备号(商户自定义,如门店编号),必须在平台已配置过
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式,系统原样返回

	RefundFee                 string `json:"refund_fee"`                   //退款金额,单位分
	RefundReceiptFee          string `json:"refund_receipt_fee"`           //退商家应结算金额,单位分
	RefundBuyerPayFee         string `json:"refund_buyer_pay_fee"`         //退买家实付金额(分)
	RefundPlatformDiscountFee string `json:"refund_platform_discount_fee"` //退平台优惠金额(分)
	RefundMerchantDiscountFee string `json:"refund_merchant_discount_fee"` //退商家优惠金额(分)
	RefundPromotionDetail     string `json:"refund_promotion_detail"`      //退优惠明细,详情见
	EndTime                   string `json:"end_time"`                     //退款完成时间,yyyyMMddHHmmss,全局统一时间格式
	OutRefundNo               string `json:"out_refund_no"`                //平台唯一退款单号
	OutTradeNo                string `json:"out_trade_no"`                 //平台唯一订单号
	TradeState                string `json:"trade_state"`                  //交易订单状态,SUCCESS支付成功,REFUND转入退款,NOTPAY未支付,CLOSED已关闭,USERPAYING用户支付中,REVOKED已撤销,NOPAY未支付支付超时,PAYERROR支付失败
	ChannelTradeNo            string `json:"channel_trade_no"`             //通道订单号,微信订单号、支付宝订单号等
	ChannelOrderNo            string `json:"channel_order_no"`             //银行渠道订单号,微信支付时显示在支付成功页面的条码,可用作扫码查询和扫码退款时匹配
	UserId                    string `json:"user_id"`                      //退款方用户id,“微信openid”、“支付宝账户”、“qq号”等
	Attach                    string `json:"attach"`                       //附加数据,原样返回
	PayTrace                  string `json:"pay_trace"`                    //退款终端流水号
	PayTime                   string `json:"pay_time"`                     //退款终端交易时间
}

QueryRefundRsp 退款订单查询

type QueryRsp

type QueryRsp struct {
	RspBase
	PayType       string `json:"pay_type"`       //支付方式,010微信,020支付宝
	MerchantName  string `json:"merchant_name"`  //商户名称
	TerminalId    string `json:"terminal_id"`    //终端号
	DeviceNo      string `json:"device_no"`      //商户终端设备号(商户自定义,如门店编号),必须在平台已配置过
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式,系统原样返回

	TotalFee            string `json:"total_fee"`             //金额,单位分
	BuyerPayFee         string `json:"buyer_pay_fee"`         //买家实付金额(分)pay_ver为202时返回
	PlatformDiscountFee string `json:"platform_discount_fee"` //平台优惠金额(分)pay_ver为202时返回
	MerchantDiscountFee string `json:"merchant_discount_fee"` //商家优惠金额(分)pay_ver为202时返回
	SubOpenid           string `json:"sub_openid"`            //微信子商户sub_appid对应的用户标识
	OrderBody           string `json:"order_body"`            //订单标题描述
	EndTime             string `json:"end_time"`              //支付完成时间,yyyyMMddHHmmss,全局统一时间格式
	OutTradeNo          string `json:"out_trade_no"`          //平台唯一订单号
	TradeState          string `json:"trade_state"`           //交易订单状态,SUCCESS支付成功,REFUND转入退款,NOTPAY未支付,CLOSED已关闭,USERPAYING用户支付中,REVOKED已撤销,NOPAY未支付支付超时,PAYERROR支付失败
	ChannelTradeNo      string `json:"channel_trade_no"`      //通道订单号,微信订单号、支付宝订单号等
	ChannelOrderNo      string `json:"channel_order_no"`      //银行渠道订单号,微信支付时显示在支付成功页面的条码,可用作扫码查询和扫码退款时匹配
	UserId              string `json:"user_id"`               //付款方用户id,“微信openid”、“支付宝账户”
	Attach              string `json:"attach"`                //附加数据,原样返回
	ReceiptFee          string `json:"receipt_fee"`           //商家应结算金额,单位分
	PayTrace            string `json:"pay_trace"`             //当前支付终端流水号
	PayTime             string `json:"pay_time"`              //当前支付终端交易时间,yyyyMMddHHmmss,全局统一时间格式
	BankType            string `json:"bank_type"`             //银行类型,采用字符串类型的银行标识
	PromotionDetail     string `json:"promotion_detail"`      //官方营销详情,pay_ver=202时返回. 本交易支付时使用的所有优惠券信息 ,单品优惠功能字段,详情见
}

QueryRsp 支付查询

type RefundRsp

type RefundRsp struct {
	RspBase
	PayType       string `json:"pay_type"`       //支付方式,010微信,020支付宝
	MerchantName  string `json:"merchant_name"`  //商户名称
	TerminalId    string `json:"terminal_id"`    //终端号
	DeviceNo      string `json:"device_no"`      //商户终端设备号(商户自定义,如门店编号),必须在平台已配置过
	TerminalTrace string `json:"terminal_trace"` //终端流水号,商户系统的订单号,系统原样返回
	TerminalTime  string `json:"terminal_time"`  //终端交易时间,yyyyMMddHHmmss,全局统一时间格式,系统原样返回

	RefundFee                 string `json:"refund_fee"`                   //退款金额,单位分
	RefundReceiptFee          string `json:"refund_receipt_fee"`           //退商家应结算金额,单位分
	RefundBuyerPayFee         string `json:"refund_buyer_pay_fee"`         //退买家实付金额(分)
	RefundPlatformDiscountFee string `json:"refund_platform_discount_fee"` //退平台优惠金额(分)
	RefundMerchantDiscountFee string `json:"refund_merchant_discount_fee"` //退商家优惠金额(分)
	RefundPromotionDetail     string `json:"refund_promotion_detail"`      //退优惠明细,详情见
	EndTime                   string `json:"end_time"`                     //退款完成时间,yyyyMMddHHmmss,全局统一时间格式
	OutTradeNo                string `json:"out_trade_no"`                 //平台唯一订单号
	OutRefundNo               string `json:"out_refund_no"`                //平台唯一退款单号
}

RefundRsp 退款申请

type RspBase

type RspBase struct {
	ReturnCode string `json:"return_code"` //响应码:01成功 ,02失败,响应码仅代表通信状态,不代表业务结果
	ReturnMsg  string `json:"return_msg"`  //返回信息提示,“退款成功”、“订单不存在”等
	KeySign    string `json:"key_sign"`    //签名串《2.4签名算法》 签名测试页
	ResultCode string `json:"result_code"` //业务结果:01成功 ,02失败
	MerchantNo string `json:"merchant_no"` //商户号
}

type SignContractRsp added in v0.0.5

type SignContractRsp struct {
	RspBase
	TraceNo string `json:"trace_no"` //原请求流水号
}

SignContractRsp 分账规则电子协议签署响应

type WithdrawApplyCashRsp added in v0.0.5

type WithdrawApplyCashRsp struct {
	RspBase
	TraceNo string `json:"trace_no"` //请求流水号
}

WithdrawApplyCashRsp 发起提现响应

type WithdrawQueryCashRsp added in v0.0.5

type WithdrawQueryCashRsp struct {
	RspBase
	TraceNo      string `json:"trace_no"`       //请求流水号
	NotSettleAmt string `json:"not_settle_amt"` //清分金额(今日实时交易金额,即新入账金额),单位分
	SettlingAmt  string `json:"settling_amt"`   //清算金额(若商户为手动清算则为可手动提现金额;若商户为自动清算则为等待划款的金额,即清算中金额),单位分
	SettledAmt   string `json:"settled_amt"`    //结算金额(商户要到账的金额,即可提现金额),单位分
	BookBalance  string `json:"book_balance"`   //账面总额(清分金额,清算金额,结算金额三者之和),单位分
}

WithdrawQueryCashRsp 查询余额响应

type WithdrawQueryFeeRsp added in v0.0.5

type WithdrawQueryFeeRsp struct {
	RspBase
	TraceNo string `json:"trace_no"` //请求流水号
	FeeAmt  string `json:"fee_amt"`  //手续费,单位分
}

WithdrawQueryFeeRsp 查询提现手续费

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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