饿先达扒网页接口,微信支付新增接口
This commit is contained in:
@@ -52,6 +52,7 @@ const (
|
||||
Relation = "PARTNER"
|
||||
AccountTypeWx = "PERSONAL_WECHATID"
|
||||
AccountTypeOpen = "PERSONAL_OPENID"
|
||||
CheckName = "NO_CHECK"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -59,6 +60,8 @@ var (
|
||||
"secapi/pay/multiprofitsharing": "secapi/pay/multiprofitsharing",
|
||||
"pay/profitsharingaddreceiver": "pay/profitsharingaddreceiver",
|
||||
"pay/profitsharingremovereceiver": "pay/profitsharingremovereceiver",
|
||||
"secapi/pay/profitsharingreturn": "secapi/pay/profitsharingreturn",
|
||||
"secapi/pay/profitsharingfinish": "secapi/pay/profitsharingfinish",
|
||||
}
|
||||
)
|
||||
|
||||
@@ -324,7 +327,7 @@ type ProfitSharingReceiverResult struct {
|
||||
|
||||
type ReturnProfitSharingParam struct {
|
||||
RequestBase
|
||||
OrderID string `json:"order_id" xml:"order_id"`
|
||||
// OrderID string `json:"order_id" xml:"order_id"`
|
||||
OutOrderNo string `json:"out_order_no" xml:"out_order_no"`
|
||||
OutReturnNo string `json:"out_return_no" xml:"out_return_no"`
|
||||
ReturnAccountType string `json:"return_account_type" xml:"return_account_type"`
|
||||
@@ -355,6 +358,30 @@ type ReturnProfitSharingResult struct {
|
||||
FinishTime string `json:"finish_time" xml:"finish_time"`
|
||||
}
|
||||
|
||||
type FinishProfitSharingParam struct {
|
||||
RequestBase
|
||||
TransactionID string `json:"transaction_id" xml:"transaction_id"`
|
||||
OutOrderNo string `json:"out_order_no" xml:"out_order_no"`
|
||||
Description string `json:"description" xml:"description"`
|
||||
}
|
||||
|
||||
type FinishProfitSharingResult struct {
|
||||
ReturnCode string `json:"return_code" xml:"return_code"`
|
||||
ReturnMsg string `json:"return_msg" xml:"return_msg"`
|
||||
|
||||
ResultCode string `json:"result_code" xml:"result_code"`
|
||||
ErrCode string `json:"err_code,omitempty" xml:"err_code,omitempty"`
|
||||
ErrCodeDes string `json:"err_code_des,omitempty" xml:"err_code_des,omitempty"`
|
||||
AppID string `json:"appid" xml:"appid"`
|
||||
MchID string `json:"mch_id" xml:"mch_id"`
|
||||
NonceStr string `json:"nonce_str" xml:"nonce_str"`
|
||||
Sign string `json:"sign" xml:"sign"`
|
||||
|
||||
TransactionID string `json:"transaction_id" xml:"transaction_id"`
|
||||
OutOrderNo string `json:"out_order_no" xml:"out_order_no"`
|
||||
OrderID string `json:"order_id" xml:"order_id"`
|
||||
}
|
||||
|
||||
func New(appID, appKey, mchID string, config ...*platformapi.APIConfig) *API {
|
||||
curConfig := platformapi.DefAPIConfig
|
||||
if len(config) > 0 {
|
||||
@@ -616,7 +643,17 @@ func (a *API) DeleteProfitSharingReceiver(param *ProfitSharingReceiverParam) (re
|
||||
//分账回退
|
||||
//https://pay.weixin.qq.com/wiki/doc/api/allocation.php?chapter=27_7&index=7
|
||||
func (a *API) ReturnProfitSharing(param *ReturnProfitSharingParam) (result *ReturnProfitSharingResult, err error) {
|
||||
retVal, err := a.AccessAPI("pay/profitsharingreturn", param)
|
||||
retVal, err := a.AccessAPI("secapi/pay/profitsharingreturn", param)
|
||||
if err == nil {
|
||||
err = a.translateResult(retVal, &result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
//完结分账
|
||||
//https://pay.weixin.qq.com/wiki/doc/api/allocation.php?chapter=27_5&index=6
|
||||
func (a *API) FinishProfitSharing(param *FinishProfitSharingParam) (result *FinishProfitSharingResult, err error) {
|
||||
retVal, err := a.AccessAPI("secapi/pay/profitsharingfinish", param)
|
||||
if err == nil {
|
||||
err = a.translateResult(retVal, &result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user