sunratevcc

package
v0.0.0-...-6e28af7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSunRateVcc

func NewSunRateVcc(host, appId, bizId, ip, sunRateRsaPubKey, thisRsaPubKey, thisRsaPriKey string) sunRate

NewSunRateVcc 创建一个寻汇VCC对象 传参:

host:【必填】请求域名,测试和正式域名不同,需要自行填写
appId:【必填】商户账号
bizId:【选填】业务ID
ip:【选填】用户浏览器IP,为空则默认为外网IP
sunRateRsaPubKey:【必填】寻汇RSA算法公钥
thisRsaPubKey:【必填】商户自己的RSA算法公钥
thisRsaPriKey:【必填】商户自己的RSA算法私钥

返回:

sunRate对象

Types

type SunAccJnlParm

type SunAccJnlParm struct {
	TxnDate  string `json:"txnDate"` //【必填】查询日期,只支持按日查询,格式:yyyy-MM-dd
	PageInfo struct {
		Current string `json:"current"` //页码
		Size    string `json:"size"`    //每页数据条数
	} `json:"pageInfo"` //【必填】分页信息
}

SunAccJnlParm 寻汇查账户流水参数

type SunAcctBalListRes

type SunAcctBalListRes struct {
	List []struct {
		Ccy          string  `json:"ccy"`          //币种
		CurrBal      float64 `json:"currBal"`      //当前余额
		AvailableBal float64 `json:"availableBal"` //当前可用余额
	} `json:"list"` //结果集
}

SunAcctBalListRes 寻汇查询多币种钱包响应结果

type SunAcctBalRes

type SunAcctBalRes struct {
	List []struct {
		Ccy            string  `json:"ccy"`            //币种
		CreditAmt      float64 `json:"creditAmt"`      //可负金额
		CardPendingAmt float64 `json:"cardPendingAmt"` //卡冻结金额
		PendingAmt     float64 `json:"pendingAmt"`     //待入账金额(授权但还未清算的金额)
		AcctBal        float64 `json:"acctBal"`        //账户余额
	} `json:"list"`
}

SunAcctBalRes 寻汇查询余额响应结果 注:账户可用余额 = 账户余额 - 待入账金额 - 卡冻结金额

type SunAcctJnlRes

type SunAcctJnlRes struct {
	List []struct {
		JnlId      string  `json:"jnlId"`      //流水编号
		Ccy        string  `json:"ccy"`        //币种
		TxnAmt     float64 `json:"txnAmt"`     //发生额
		PreBal     float64 `json:"preBal"`     //期初余额
		PostBal    float64 `json:"postBal"`    //期末余额
		TxnType    string  `json:"txnType"`    //交易类型:00=转入、01=转出、10=开卡手续费、11=结算手续费、12=退款手续费、13=授权手续费、14=chargeback手续费、20=结算、21=退款
		CardId     string  `json:"cardId"`     //卡ID
		RefNo      string  `json:"refNo"`      //结算退款ID
		CreateTime string  `json:"createTime"` //交易时间
	} `json:"list"` //结果集
	PageInfo struct {
		Total   int `json:"total"`   //总条数
		Size    int `json:"size"`    //当前页条数
		Current int `json:"current"` //页码
	} `json:"pageInfo"` //分页信息
}

SunAcctJnlRes 寻汇查账户流水响应结果

type SunCardListClearingQueryParm

type SunCardListClearingQueryParm struct {
	CardId       string `json:"cardId"`       //卡ID
	TxnDateStart string `json:"txnDateStart"` //欲查询清算开始日期,未传卡ID时,本参数必传,并只支持一天的数据查询,格式:yyyy-MM-dd
	TxnDateEnd   string `json:"txnDateEnd"`   //欲查询清算结束日期,未传卡ID时,本参数必传,并只支持一天的数据查询,格式:yyyy-MM-dd
	PageInfo     struct {
		Current int `json:"current"` //页码
		Size    int `json:"size"`    //当前页条数
	} `json:"pageInfo"` //分页信息
}

SunCardListClearingQueryParm 寻汇卡清算记录查询参数

type SunCardListClearingQueryRes

type SunCardListClearingQueryRes struct {
	List []struct {
		CardId       string  `json:"cardId"`       //卡ID
		TxnId        string  `json:"txnId"`        //结算交易ID
		AuthTxnId    string  `json:"authTxnId"`    //关联授权ID
		TxnType      string  `json:"txnType"`      //交易类型,C=结算、R=退款
		TxnCcy       string  `json:"txnCcy"`       //交易币种
		TxnAmt       float64 `json:"txnAmt"`       //交易金额
		BillCcy      string  `json:"billCcy"`      //账单币种
		BillAmt      float64 `json:"billAmt"`      //账单金额
		MerchName    string  `json:"merchName"`    //商户名称
		MerchCtry    string  `json:"merchCtry"`    //商户国家,三位国家英文编码
		Mcc          string  `json:"mcc"`          //商家业务类型
		AuthCode     string  `json:"authCode"`     //授权码
		Arn          string  `json:"arn"`          //ARN
		ClearingDate string  `json:"clearingDate"` //清算日期
	} `json:"list"` //结果集
	PageInfo struct {
		Total   int `json:"total"`   //总条数
		Size    int `json:"size"`    //当前页条数
		Current int `json:"current"` //页码
	} `json:"pageInfo"` //分页信息
}

SunCardListClearingQueryRes 寻汇卡清算记录查询响应结果

type SunCardListTxnQueryParm

type SunCardListTxnQueryParm struct {
	CardId       string `json:"cardId"`       //卡ID
	TxnDateStart string `json:"txnDateStart"` //欲查询交易开始日期,未传卡ID时,本参数必传,并只支持一天的数据查询,格式:yyyy-MM-dd
	TxnDateEnd   string `json:"txnDateEnd"`   //欲查询交易结束日期,未传卡ID时,本参数必传,并只支持一天的数据查询,格式:yyyy-MM-dd
	PageInfo     struct {
		Current int `json:"current"` //页码
		Size    int `json:"size"`    //当前页条数
	} `json:"pageInfo"` //分页信息
}

SunCardListTxnQueryParm 寻汇卡授权记录查询参数

type SunCardListTxnQueryRes

type SunCardListTxnQueryRes struct {
	List []struct {
		CardId        string  `json:"cardId"`        //卡ID
		TxnId         string  `json:"txnId"`         //交易ID
		OriginTxnId   string  `json:"originTxnId"`   //原始交易ID,授权撤销时对应的原交易ID
		TxnType       string  `json:"txnType"`       //交易类型:A=授权、D=授权撤销
		TxnStatus     string  `json:"txnStatus"`     //交易状态:0=失败、1=成功
		TxnCcy        string  `json:"txnCcy"`        //交易币种
		TxnAmt        float64 `json:"txnAmt"`        //交易金额
		BillCcy       string  `json:"billCcy"`       //账单币种
		BillAmt       float64 `json:"billAmt"`       //账单金额
		MerchName     string  `json:"merchName"`     //商户名称
		MerchCtry     string  `json:"merchCtry"`     //商户国家,三位国家英文编码
		Mcc           string  `json:"mcc"`           //商家业务类型
		RspCode       string  `json:"rspCode"`       //返回码,授权状态码,详情见文档附录C
		DeclineReason string  `json:"declineReason"` //拒绝原因
		AuthCode      string  `json:"authCode"`      //授权码
		TxnTime       string  `json:"txnTime"`       //交易时间,格式:yyyy-MM-dd hh:mm:ss
		ClearingDate  string  `json:"clearingDate"`  //清算日期,格式:yyyy-MM-dd
	} `json:"list"` //结果集
	PageInfo struct {
		Total   int `json:"total"`   //总条数
		Size    int `json:"size"`    //当前页条数
		Current int `json:"current"` //页码
	} `json:"pageInfo"` //分页信息
}

SunCardListTxnQueryRes 寻汇卡授权记录查询响应结果

type SunCreateCardParm

type SunCreateCardParm struct {
	OutTradeNo      string          `json:"outTradeNo"`      //【必传】商户订单号,每张卡唯一,商户自定义,为空则自动生成
	ProductCode     string          `json:"productCode"`     //【必传】卡产品ID
	CardUse         string          `json:"cardUse"`         //【必传】S=单次卡,M=多次卡
	Ccy             string          `json:"ccy"`             //【必传】开卡币种
	ExpDate         string          `json:"expDate"`         //【必传】卡有效期,yyyy-MM-dd,dd只能是月末天数,有效期范围为一个月后到两年内的日期
	NickName        string          `json:"nickName"`        //【选填】卡昵称
	VelocityControl VelocityControl `json:"velocityControl"` //【选填】使用条件限制
	CardAmt         float64         `json:"cardAmt"`         //【选填】开卡金额,指定卡产品下必填
}

SunCreateCardParm 寻汇开卡参数

type SunCreateCardRes

type SunCreateCardRes struct {
	OutTradeNo string `json:"outTradeNo"` //商户订单号
	CardId     string `json:"cardId"`     //卡ID
	CardUse    string `json:"cardUse"`    //卡类型,S=单次卡,M=多次卡
	Ccy        string `json:"ccy"`        //开卡币种
	CardNo     string `json:"cardNo"`     //卡号
	Expiry     string `json:"expiry"`     //卡面有效期,格式:MM/YY
	Cvv        string `json:"cvv"`        //CVV
	CardStatus string `json:"cardStatus"` //卡状态:0=已注销,1=已激活,2=已冻结,3=已过期,4=已锁定
	NickName   string `json:"nickName"`   //卡昵称
	CreateTime string `json:"createTime"` //创建时间:yyyy-MM-dd HH:mm:ss
}

SunCreateCardRes 寻汇开卡响应结果

type SunGetCardInfoRes

type SunGetCardInfoRes struct {
	OutTradeNo       string          `json:"outTradeNo"`       //商户订单号
	CardId           string          `json:"cardId"`           //卡ID
	CardUse          string          `json:"cardUse"`          //卡类型,S=单次卡,M=多次卡
	Ccy              string          `json:"ccy"`              //开卡币种
	CardStatus       string          `json:"cardStatus"`       //卡状态:0=已注销,1=已激活,2=已冻结,3=已过期,4=已锁定
	NickName         string          `json:"nickName"`         //卡昵称
	VelocityControl  VelocityControl `json:"velocityControl"`  //金额控制
	VelocityUsedList []VelocityList  `json:"velocityUsedList"` //卡已用额度
	CreateTime       string          `json:"createTime"`       //创建时间:yyyy-MM-dd HH:mm:ss
}

SunGetCardInfoRes 寻汇查询卡信息响应结果

type SunTransferParm

type SunTransferParm struct {
	OutTradeNo string `json:"outTradeNo"` //商户订单号
	AcctId     string `json:"acctId"`     //账户ID
	Ccy        string `json:"ccy"`        //币种
	Amt        string `json:"amt"`        //金额
	Remark     string `json:"remark"`     //备注
}

SunTransferParm 寻汇多币种钱包与卡账户余额互转参数

type SunTransferRes

type SunTransferRes struct {
	TioJnlId   string  `json:"tioJnlId"`   //交易编号
	TxnCcy     string  `json:"txnCcy"`     //交易币种
	TxnAmt     float64 `json:"txnAmt"`     //交易金额
	TxnType    string  `json:"txnType"`    //交易类型,00=转入、01=转出
	TxnDesc    string  `json:"txnDesc"`    //交易描述
	TxnStatus  string  `json:"txnStatus"`  //交易状态,9=处理中、0=失败、1=成功
	TxnRemark  string  `json:"txnRemark"`  //交易备注
	Remark     string  `json:"remark"`     //备注
	OutTradeNo string  `json:"outTradeNo"` //商户订单号
	TxnDate    string  `json:"txnDate"`    //交易日期
	CreateTime string  `json:"createTime"` //创建时间
	LastTime   string  `json:"lastTime"`   //更新时间
}

SunTransferRes 寻汇多币种钱包与卡账户余额互转响应结果

type SunUpCardLimitParmAndRes

type SunUpCardLimitParmAndRes struct {
	CardId          string          `json:"cardId"`          //卡ID
	VelocityControl VelocityControl `json:"velocityControl"` //金额控制
}

SunUpCardLimitParmAndRes 寻汇修改卡限制参数和响应结果

type SunUpCardStatusParm

type SunUpCardStatusParm struct {
	CardId     string `json:"cardId"`     //卡ID
	CardStatus string `json:"cardStatus"` //欲修改的状态:0=注销、1=激活、2=冻结
	Remark     string `json:"remark"`     //备注信息
}

SunUpCardStatusParm 寻汇修改卡状态参数

type SunUpCardStatusRes

type SunUpCardStatusRes struct {
	CardId     string `json:"cardId"`     //卡ID
	CardStatus string `json:"cardStatus"` //修改后状态:0=注销、1=激活、2=冻结
}

SunUpCardStatusRes 寻汇修改卡状态响应结果

type VelocityControl

type VelocityControl struct {
	PerTransactionLimit struct {
		TxnMinAmt float64 `json:"txnMinAmt"` //【选填】单笔最小交易金额
		TxnMaxAmt float64 `json:"txnMaxAmt"` //【选填】单笔最大交易金额
	} //【选填】单笔交易限额
	VelocityList []VelocityList `json:"velocityList"` //限制项目
}

VelocityControl 金额控制

type VelocityList

type VelocityList struct {
	Period        string  `json:"period"`        //【选填】D=每日,M=每月,C=总累计
	MaxTrans      int     `json:"maxTrans"`      //【选填】最大交易次数
	CumulativeAmt float64 `json:"cumulativeAmt"` //【选填】累计限额
}

VelocityList 限制项目

Jump to

Keyboard shortcuts

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