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