Versions in this module Expand all Collapse all v0 v0.1.0 Jul 18, 2026 Changes in this version + var ErrAlipayCertMismatch = errors.New("alipay: response cert sn does not match configured AlipayCertPEM") + var ErrBadResponse = errors.New("alipay: malformed response body") + var ErrNoPrivateKey = errors.New("alipay: Config.PrivateKey is required to sign requests") + var ErrNoSignature = errors.New("alipay: response signature missing") + var ErrSignatureInvalid = errors.New("alipay: response signature verification failed") + func Retriable(err error) bool + type APIError struct + Code string + HTTPStatus int + Message string + TraceID string + func (e *APIError) Error() string + type Client struct + func New(cfg Config) (*Client, error) + func (c *Client) GetWithQuery(ctx context.Context, path string, q url.Values, out any) error + func (c *Client) PostJSON(ctx context.Context, path string, reqBody any, out any) error + func (c *Client) VerifyRSA(content []byte, signBase64 string) error + type Config struct + AlipayCertPEM string + AlipayPublicKey string + AppCertPEM string + AppID string + EncryptKey string + Gateway string + HTTPClient *http.Client + PrivateKey string + RootCertPEM string + Sandbox bool + type HTTPError struct + Body string + StatusCode int + func (e *HTTPError) Error() string + func (e *HTTPError) Unwrap() error