Versions in this module Expand all Collapse all v1 v1.0.2 Oct 5, 2023 v1.0.1 Sep 10, 2023 v1.0.0 Aug 29, 2023 Changes in this version + const MAPIUrl + const SubmitUrl + func GenerateParams(params map[string]string, secret string) map[string]string + type Client struct + func NewClient(config *Config) (*Client, error) + func (c *Client) MApiSubmit(ctx context.Context, args *MApiSubmitArgs) (*MApiSubmitRes, *http.Response, error) + func (c *Client) Submit(_ context.Context, args *SubmitArgs) (string, map[string]string, error) + func (c *Client) Verify(_ context.Context, params map[string]string) (*VerifyRes, error) + type CommonErrorRes struct + Code int + Msg string + type Config struct + AppSecret string + Endpoint string + PartnerID int + type DeviceType string + var MOBILE DeviceType = "mobile" + var PC DeviceType = "pc" + var WECHAT DeviceType = "wechat" + type MApiSubmitArgs struct + ClientIP string + Device *DeviceType + Money string + Name string + NotifyUrl string + OutTradeNo string + Param *string + ReturnUrl *string + Sign string + SignType string + Type PaymentType + type MApiSubmitRes struct + Code int + Msg string + PayUrl string + QRCode string + TradeNo string + UrlScheme string + type PaymentType string + var Alipay PaymentType = "alipay" + var WechatPay PaymentType = "wxpay" + type Service interface + MApiSubmit func(ctx context.Context, args *MApiSubmitArgs) (*MApiSubmitRes, *http.Response, error) + Submit func(ctx context.Context, args *SubmitArgs) (string, map[string]string, error) + Verify func(ctx context.Context, params map[string]string) (*VerifyRes, error) + type SubmitArgs struct + Money string + Name string + NotifyUrl string + ReturnUrl string + ServiceTradeNo string + Type PaymentType + type VerifyRes struct + Money string + Name string + ServiceTradeNo string + TradeNo string + TradeStatus string + Type PaymentType + VerifyStatus bool