diff --git a/alipay/request.go b/alipay/request.go index a19b40f5..e04a4e6c 100644 --- a/alipay/request.go +++ b/alipay/request.go @@ -61,7 +61,7 @@ func (a *Client) doAliPaySelf(ctx context.Context, bm gopay.BodyMap, method stri } else { url = sandboxBaseUrlUtf8 } - res, bs, err := a.hc.Req(xhttp.TypeForm).Post(url).SendString(bm.EncodeURLParams()).EndBytes(ctx) + res, bs, err := a.hc.Req(xhttp.TypeFormData).Post(url).SendString(bm.EncodeURLParams()).EndBytes(ctx) if err != nil { return nil, err } @@ -116,7 +116,7 @@ func (a *Client) doAliPay(ctx context.Context, bm gopay.BodyMap, method string, if !a.IsProd { url = sandboxBaseUrlUtf8 } - res, bs, err := a.hc.Req(xhttp.TypeForm).Post(url).SendString(param).EndBytes(ctx) + res, bs, err := a.hc.Req(xhttp.TypeFormData).Post(url).SendString(param).EndBytes(ctx) if err != nil { return nil, err } @@ -172,7 +172,7 @@ func (a *Client) DoAliPay(ctx context.Context, bm gopay.BodyMap, method string, if !a.IsProd { url = sandboxBaseUrlUtf8 } - res, bs, err := a.hc.Req(xhttp.TypeForm).Post(url).SendString(param).EndBytes(ctx) + res, bs, err := a.hc.Req(xhttp.TypeFormData).Post(url).SendString(param).EndBytes(ctx) if err != nil { return nil, err }