This commit is contained in:
邹宗楠
2025-07-29 10:52:30 +08:00
parent 3285b9a816
commit c34cc86bba
5 changed files with 29 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"net/http"
"time"
)
@@ -15,10 +16,13 @@ func (a *API) AggregatePay(param *AggregatePayReq) (*AggregatePayResp, error) {
"version": Version3,
"req_time": utils.Time2TimeStrByFormat(time.Now(), TimeFormat),
}
globals.SugarLogger.Debugf("-------AggregatePay := %s", utils.Format4Output(param, false))
result, err := a.AccessAPISign(PayProdUrl, PayActive, http.MethodPost, "", reqParameter)
if err != nil {
return nil, err
}
globals.SugarLogger.Debugf("-------result := %s", utils.Format4Output(result, false))
globals.SugarLogger.Debugf("-------err := %v", err)
if result["code"].(string) != PaySuccess {
return nil, fmt.Errorf(result["msg"].(string))