feat: update issues

This commit is contained in:
yanghao05
2025-04-14 20:53:29 +08:00
parent 69e3dd1070
commit ea867f7261
2 changed files with 13 additions and 12 deletions

View File

@@ -2,6 +2,7 @@ package wepay
import (
"context"
"encoding/json"
"errors"
"time"
@@ -9,6 +10,7 @@ import (
"github.com/go-pay/gopay"
"github.com/go-pay/gopay/wechat/v3"
log "github.com/sirupsen/logrus"
"go.ipao.vip/atom/container"
"go.ipao.vip/atom/opt"
)
@@ -68,6 +70,8 @@ func (c *Client) V3TransactionJsapi(ctx context.Context, f func(*BodyMap)) (*Pre
}
if resp.Code != wechat.Success {
b, _ := json.Marshal(resp)
log.Errorf("WePay V3TransactionJsapi error: %s", b)
return nil, errors.New(resp.Error)
}
@@ -77,8 +81,6 @@ func (c *Client) V3TransactionJsapi(ctx context.Context, f func(*BodyMap)) (*Pre
}, nil
}
func (c *Client) BodyMap() *BodyMap { return NewBodyMap(c.config) }
type BodyMap struct {
bm gopay.BodyMap
}