通联宝支付paytype修改
This commit is contained in:
@@ -16,8 +16,9 @@ const (
|
|||||||
prodURL = "https://vsp.allinpay.com/apiweb"
|
prodURL = "https://vsp.allinpay.com/apiweb"
|
||||||
sepcAction = "unitorder/pay"
|
sepcAction = "unitorder/pay"
|
||||||
|
|
||||||
sigKey = "sign"
|
sigKey = "sign"
|
||||||
payType = "W06"
|
PayTypeWxXcx = "W06"
|
||||||
|
PayTypeZfbApp = "A03"
|
||||||
|
|
||||||
ResponseCodeSuccess = "SUCCESS"
|
ResponseCodeSuccess = "SUCCESS"
|
||||||
ResponseCodeFail = "FAIL"
|
ResponseCodeFail = "FAIL"
|
||||||
@@ -39,6 +40,7 @@ type CreateUnitorderOrderParam struct {
|
|||||||
Reqsn string `json:"reqsn"` //商户交易单号
|
Reqsn string `json:"reqsn"` //商户交易单号
|
||||||
NotifyUrl string `json:"notifyUrl"` //接收微信支付异步通知回调地址,通知url必须为直接可访问的url,不能携带参数。
|
NotifyUrl string `json:"notifyUrl"` //接收微信支付异步通知回调地址,通知url必须为直接可访问的url,不能携带参数。
|
||||||
Acct string `json:"acct"`
|
Acct string `json:"acct"`
|
||||||
|
PayType string `json:"paytype"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateUnitorderOrderResult struct {
|
type CreateUnitorderOrderResult struct {
|
||||||
@@ -135,7 +137,7 @@ func (a *API) AccessAPI(action string, bizParams map[string]interface{}) (retVal
|
|||||||
params["version"] = "12"
|
params["version"] = "12"
|
||||||
params = utils.MergeMaps(params, bizParams)
|
params = utils.MergeMaps(params, bizParams)
|
||||||
if action == sepcAction {
|
if action == sepcAction {
|
||||||
params["paytype"] = payType
|
// params["paytype"] = payType
|
||||||
params["sub_appid"] = a.subAppid
|
params["sub_appid"] = a.subAppid
|
||||||
}
|
}
|
||||||
signStr := a.signParam(params)
|
signStr := a.signParam(params)
|
||||||
@@ -174,6 +176,7 @@ func (a *API) CreateUnitorderOrder(param *CreateUnitorderOrderParam) (result *Cr
|
|||||||
params["notify_url"] = param.NotifyUrl
|
params["notify_url"] = param.NotifyUrl
|
||||||
params["reqsn"] = param.Reqsn
|
params["reqsn"] = param.Reqsn
|
||||||
params["acct"] = param.Acct
|
params["acct"] = param.Acct
|
||||||
|
params["paytype"] = param.PayType
|
||||||
retVal, err := a.AccessAPI(sepcAction, params)
|
retVal, err := a.AccessAPI(sepcAction, params)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
utils.Map2StructByJson(retVal, &result, false)
|
utils.Map2StructByJson(retVal, &result, false)
|
||||||
|
|||||||
Reference in New Issue
Block a user