Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2023 Changes in this version + func VerifySign(notifyReq *NotifyRequest, partnerCode string, credentialCode string) (err error) + type Analysis struct + OrderCount int + RealFee int + TotalFee int + type Client struct + DebugSwitch gopay.DebugSwitch + IsProd bool + PartnerCode string + func NewClient(partnerCode, credentialCode string, isProd bool) (client *Client, err error) + func (c *Client) ApplyRefund(ctx context.Context, orderId string, refundId string, bm gopay.BodyMap) (rsp *RefundRsp, err error) + func (c *Client) CloseOrder(ctx context.Context, orderId string) (rsp *ErrorCode, err error) + func (c *Client) ConsultPayment(ctx context.Context, bm gopay.BodyMap) (rsp *ConsultPaymentRsp, err error) + func (c *Client) CreateH5PayOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) CreateJSAPIOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) CreateMiniProgramOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) CreateNativeJSApiOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) CreateNativeQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) CreateQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) CreateReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string, ...) (rsp *ReportRsp, err error) + func (c *Client) CreateReportSingle(ctx context.Context, partnerReportId string, bm gopay.BodyMap) (rsp *ReportRsp, err error) + func (c *Client) CreateRetailOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *RetailPayRsp, err error) + func (c *Client) CreateRetailQRCodeOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) CreateSDKPaymentOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) CreateWebGatewayOrder(ctx context.Context, orderId string, bm gopay.BodyMap) (rsp *PaymentRsp, err error) + func (c *Client) GetCoupon(ctx context.Context, couponId string) (rsp *GetCouponRsp, err error) + func (c *Client) GetEncrypt(ctx context.Context) (rsp *EncryptRsp, err error) + func (c *Client) GetExchangeRate(ctx context.Context) (rsp *ExchangeRateRsp, err error) + func (c *Client) H5AlipayPlusPay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error) + func (c *Client) H5Pay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error) + func (c *Client) JSAPIAlipayPay(ctx context.Context, orderId, redirect string, directPay bool) (rsp *ErrorCode, err error) + func (c *Client) JSAPIAlipayPlusPay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error) + func (c *Client) JSAPIWechatPay(ctx context.Context, orderId, redirect string, directPay bool) (rsp *ErrorCode, err error) + func (c *Client) ModifyReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string, ...) (rsp *ReportRsp, err error) + func (c *Client) ModifyReportSingle(ctx context.Context, partnerReportId string, bm gopay.BodyMap) (rsp *ReportRsp, err error) + func (c *Client) OrderList(ctx context.Context, date, status string, page, limit int) (rsp *OrderListRsp, err error) + func (c *Client) OrderStatus(ctx context.Context, orderId string) (rsp *OrdersRsp, err error) + func (c *Client) QRCodePay(ctx context.Context, orderId, redirect string) (rsp *ErrorCode, err error) + func (c *Client) RefundQuery(ctx context.Context, orderId string, refundId string) (rsp *RefundRsp, err error) + func (c *Client) ReportStatus(ctx context.Context, partnerReportId string) (rsp *ReportRsp, err error) + func (c *Client) ReportSubStatus(ctx context.Context, partnerReportId, partnerSubReportId string) (rsp *ReportRsp, err error) + func (c *Client) ResendReportSeparate(ctx context.Context, partnerReportId, partnerSubReportId string) (rsp *ReportRsp, err error) + func (c *Client) ResendReportSingle(ctx context.Context, partnerReportId string) (rsp *ReportRsp, err error) + func (c *Client) SetBodySize(sizeMB int) + func (c *Client) Settlements(ctx context.Context, date string) (rsp *SettlementsRsp, err error) + func (c *Client) TransactionList(ctx context.Context, date string) (rsp *TransactionListRsp, err error) + type Config struct + AppId string + CredentialCode string + IsProd bool + NotifyUrl string + PartnerCode string + Redirect string + Version string + type ConsultPaymentRsp struct + SubChannels []*SubChannel + type EncryptRsp struct + EncryptType string + Expire int64 + KeyId string + PublicKey string + type ErrorCode struct + ResultCode string + ReturnCode string + ReturnMsg string + type ExchangeRateRsp struct + AlipayOnlineRate float64 + AlipayRetailRate float64 + WechatRate float64 + type GetCouponRsp struct + AvailableTime string + AvailableWeek string + BeginAmount string + Discount string + EndTime string + IsValidNow string + Res string + State string + Title string + Type string + VoucherNum string + type NotifyRequest struct + Channel string + ChannelOrderId string + CreateTime string + Currency string + CustomerId string + NonceStr string + OrderId string + PartnerOrderId string + PayTime string + PayType string + PaymentId string + Rate float64 + RealFee int + Sign string + System string + Time string + TotalFee int + func ParseNotify(req *http.Request) (notifyReq *NotifyRequest, err error) + type OrderData struct + Channel string + CreateTime string + Currency string + Gateway string + OrderBody string + OrderId string + PartnerCode string + PartnerName string + PartnerOrderId string + PayTime string + RealFee int + RefundFee string + Status string + TotalFee int + type OrderListRsp struct + Analysis Analysis + Data []*OrderData + Pagination Pagination + type OrdersRsp struct + Channel string + ChannelErrorCode string + ChannelErrorMessage string + ChannelOrderId string + CreateTime string + Currency string + CustomerId string + MerchantAppId string + MerchantCustomerId string + OrderDescription string + OrderId string + PartnerOrderId string + PayTime string + PayType string + Rate float64 + RealFee int + TotalFee int + type Pagination struct + Limit int + Page int + TotalCount int + TotalPages int + type PaymentRsp struct + Channel string + CodeUrl string + FullName string + OrderId string + PartnerCode string + PartnerName string + PartnerOrderId string + PayUrl string + QrcodeImg string + SdkParams string + type RefundRsp struct + Amount int + Currency string + PartnerRefundId string + RefundId string + type ReportRsp struct + Reports []*ReportSub + type ReportSub struct + Channel string + ChannelReportId string + ChannelSubReportId string + CreationDate string + Customs string + ErrorCode string + ErrorMsg string + LastUpdateDate string + MchCustomsName string + MchCustomsNo string + OrderAmount int + OrderCurrency string + OrderId string + PartnerReportId string + PartnerSubReportId string + ReportId string + Status string + SubOrderFee int + SubProductFee int + SubTransportFee int + TransactionId string + VerifyDepartment string + VerifyDepartmentTradeId string + type RetailPayRsp struct + Channel string + ChannelErrorCode string + ChannelErrorMessage string + CreateTime string + Currency string + OrderDescription string + OrderId string + PartnerOrderId string + PayTime string + RealFee int + TotalFee int + type SettlementsRsp struct + OrderCount int + RefundCount int + SettleDays string + SettleFrom string + SettleTo string + TotalCredit int + TotalDebit int + TotalSurcharge int + TotalTransfer int + TransactionCount int + Transactions []*Transaction + type SubChannel struct + Logo string + SubChannel string + SubChannelName string + type Transaction struct + Channel string + ChannelOrderId string + Currency string + CustomerPaymentAmount int + ExchangeRate float64 + Gateway string + InputAmount int + OrderId string + PartnerOrderId string + PartnerRefundId string + RefundId string + Remark string + SettleAmount int + Surcharge int + SurchargeRate string + TotalAmount int + TransactionTime string + TransferAmount int + Type string + type TransactionListRsp struct + OrderCount int + RefundCount int + TransactionCount int + Transactions []*Transaction