1
This commit is contained in:
@@ -33,7 +33,12 @@ func (a *API) PreCreateOrder(param *PreCreateOrderReq) (*CreateOrderResponseInfo
|
||||
|
||||
// GetOrderDetail 订单详情查询接口
|
||||
func (a *API) GetOrderDetail(outOrderNo string) (*PaymentInfo, error) {
|
||||
data, err := a.AccessAPI1(KuaiShouGetOrderDetail, map[string]interface{}{"out_order_no": outOrderNo})
|
||||
if a.appId == "" || a.appSecret == "" {
|
||||
return nil, errors.New("appId/appSecret 不能为空")
|
||||
}
|
||||
|
||||
sign := a.sign(map[string]interface{}{"out_order_no": outOrderNo})
|
||||
data, err := a.AccessAPI1(a.FullUrl(KuaiShouGetOrderDetail), map[string]interface{}{"out_order_no": outOrderNo, "sign": sign})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -63,7 +68,13 @@ func (a *API) GetOrderDetail(outOrderNo string) (*PaymentInfo, error) {
|
||||
// 在途资金中的所有货款均是与订单关联的,只有当该订单在途资金中剩余金额超过退款金额时,才可以进行在途资金的退款。
|
||||
// 当可提现金额也不足退款金额时,会退款失败,为了避免出现订单无法退款的情况出现,请根据业务情况自行保留一部分可提现金额在系统中
|
||||
func (a *API) RefundOrder(param *RefundParam) (refundNo string, err error) {
|
||||
data, err := a.AccessAPI1(KuaiShouRefundOrder, utils.Struct2MapByJson(param))
|
||||
if a.appId == "" || a.appSecret == "" {
|
||||
return "", errors.New("appId/appSecret 不能为空")
|
||||
}
|
||||
|
||||
param.Sign = a.sign(utils.Struct2MapByJson(param))
|
||||
|
||||
data, err := a.AccessAPI1(a.FullUrl(KuaiShouRefundOrder), utils.Struct2MapByJson(param))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -81,7 +92,13 @@ func (a *API) RefundOrder(param *RefundParam) (refundNo string, err error) {
|
||||
|
||||
// RefundOrderDetail 查询退款订单详情
|
||||
func (a *API) RefundOrderDetail(outRefundNo string) (*RefundInfo, error) {
|
||||
data, err := a.AccessAPI1(KuaiShouRefundOrderDetail, map[string]interface{}{"out_refund_no": outRefundNo})
|
||||
if a.appId == "" || a.appSecret == "" {
|
||||
return nil, errors.New("appId/appSecret 不能为空")
|
||||
}
|
||||
|
||||
sign := a.sign(map[string]interface{}{"out_refund_no": outRefundNo})
|
||||
|
||||
data, err := a.AccessAPI1(a.FullUrl(KuaiShouRefundOrderDetail), map[string]interface{}{"out_refund_no": outRefundNo, "sign": sign})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -110,7 +127,13 @@ func (a *API) RefundOrderDetail(outRefundNo string) (*RefundInfo, error) {
|
||||
// 3、结算时,小程序平台会收取整笔交易的平台服务费。若结算后发生退款,则平台服务费不作退还。
|
||||
|
||||
func (a *API) PaySettleAccounts4Order(param *OrderSettleAccountParam) (string, error) {
|
||||
data, err := a.AccessAPI1(KuaiShouGetSettleOrder, utils.Struct2MapByJson(param))
|
||||
if a.appId == "" || a.appSecret == "" {
|
||||
return "", errors.New("appId/appSecret 不能为空")
|
||||
}
|
||||
|
||||
param.Sign = a.sign(utils.Struct2MapByJson(param))
|
||||
|
||||
data, err := a.AccessAPI1(a.FullUrl(KuaiShouGetSettleOrder), utils.Struct2MapByJson(param))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -129,7 +152,13 @@ func (a *API) PaySettleAccounts4Order(param *OrderSettleAccountParam) (string, e
|
||||
|
||||
// QuerySettleInfo 查询结算信息
|
||||
func (a *API) QuerySettleInfo(outSettleNo string) (*SettleInfo, error) {
|
||||
data, err := a.AccessAPI1(KuaiShouQuerySettleOrder, map[string]interface{}{"out_settle_no": outSettleNo})
|
||||
if a.appId == "" || a.appSecret == "" {
|
||||
return nil, errors.New("appId/appSecret 不能为空")
|
||||
}
|
||||
|
||||
sign := a.sign(map[string]interface{}{"out_settle_no": outSettleNo})
|
||||
|
||||
data, err := a.AccessAPI1(a.FullUrl(KuaiShouQuerySettleOrder), map[string]interface{}{"out_settle_no": outSettleNo, "sign": sign})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user