Versions in this module Expand all Collapse all v1 v1.5.24 Dec 7, 2020 Changes in this version + const LocationShanghai + const PKCS1 + const PKCS8 + const RSA + const RSA2 + func DecryptOpenDataToBodyMap(encryptedData, secretKey string) (bm gopay.BodyMap, err error) + func DecryptOpenDataToStruct(encryptedData, secretKey string, beanPtr interface{}) (err error) + func FormatPrivateKey(privateKey string) (pKey string) + func FormatPublicKey(publicKey string) (pKey string) + func FormatURLParam(body gopay.BodyMap) (urlParam string) + func GetCertSN(certPathOrData interface{}) (sn string, err error) + func GetRootCertSN(rootCertPathOrData interface{}) (sn string, err error) + func GetRsaSign(bm gopay.BodyMap, signType string, t PKCSType, privateKey string) (sign string, err error) + func ParseNotifyByURLValues(value url.Values) (bm gopay.BodyMap, err error) + func ParseNotifyToBodyMap(req *http.Request) (bm gopay.BodyMap, err error) + func VerifySign(aliPayPublicKey string, bean interface{}) (ok bool, err error) + func VerifySignWithCert(aliPayPublicKey, bean interface{}) (ok bool, err error) + func VerifySyncSign(aliPayPublicKey, signData, sign string) (ok bool, err error) + type Client struct + AliPayPublicCertSN string + AliPayRootCertSN string + AppAuthToken string + AppCertSN string + AppId string + AuthToken string + Charset string + DebugSwitch gopay.DebugSwitch + IsProd bool + LocationName string + NotifyUrl string + PrivateKey string + PrivateKeyType PKCSType + ReturnUrl string + SignType string + func NewClient(appId, privateKey string, isProd bool) (client *Client) + func (a *Client) DataBillBalanceQuery(bm gopay.BodyMap) (aliRsp *DataBillBalanceQueryResponse, err error) + func (a *Client) DataBillDownloadUrlQuery(bm gopay.BodyMap) (aliRsp *DataBillDownloadUrlQueryResponse, err error) + func (a *Client) FundAccountQuery(bm gopay.BodyMap) (aliRsp *FundAccountQueryResponse, err error) + func (a *Client) FundTransCommonQuery(bm gopay.BodyMap) (aliRsp *FundTransCommonQueryResponse, err error) + func (a *Client) FundTransToaccountTransfer(bm gopay.BodyMap) (aliRsp *FundTransToaccountTransferResponse, err error) + func (a *Client) FundTransUniTransfer(bm gopay.BodyMap) (aliRsp *FundTransUniTransferResponse, err error) + func (a *Client) OpenAuthTokenApp(bm gopay.BodyMap) (aliRsp *OpenAuthTokenAppResponse, err error) + func (a *Client) PostAliPayAPISelf(bm gopay.BodyMap, method string, aliRsp interface{}) (err error) + func (a *Client) SetAliPayPublicCertSN(aliPayPublicCertSN string) (client *Client) + func (a *Client) SetAliPayRootCertSN(aliPayRootCertSN string) (client *Client) + func (a *Client) SetAppAuthToken(appAuthToken string) (client *Client) + func (a *Client) SetAppCertSN(appCertSN string) (client *Client) + func (a *Client) SetAuthToken(authToken string) (client *Client) + func (a *Client) SetCertSnByPath(appCertPath, aliPayRootCertPath, aliPayPublicCertPath string) (err error) + func (a *Client) SetCharset(charset string) (client *Client) + func (a *Client) SetLocation(name string) (client *Client) + func (a *Client) SetNotifyUrl(url string) (client *Client) + func (a *Client) SetPrivateKeyType(t PKCSType) (client *Client) + func (a *Client) SetReturnUrl(url string) (client *Client) + func (a *Client) SetSignType(signType string) (client *Client) + func (a *Client) SystemOauthToken(bm gopay.BodyMap) (aliRsp *SystemOauthTokenResponse, err error) + func (a *Client) TradeAppPay(bm gopay.BodyMap) (payParam string, err error) + func (a *Client) TradeCancel(bm gopay.BodyMap) (aliRsp *TradeCancelResponse, err error) + func (a *Client) TradeClose(bm gopay.BodyMap) (aliRsp *TradeCloseResponse, err error) + func (a *Client) TradeCreate(bm gopay.BodyMap) (aliRsp *TradeCreateResponse, err error) + func (a *Client) TradeFastPayRefundQuery(bm gopay.BodyMap) (aliRsp *TradeFastpayRefundQueryResponse, err error) + func (a *Client) TradeOrderSettle(bm gopay.BodyMap) (aliRsp *TradeOrderSettleResponse, err error) + func (a *Client) TradeOrderinfoSync(body gopay.BodyMap) + func (a *Client) TradePagePay(bm gopay.BodyMap) (payUrl string, err error) + func (a *Client) TradePageRefund(bm gopay.BodyMap) (aliRsp *TradePageRefundResponse, err error) + func (a *Client) TradePay(bm gopay.BodyMap) (aliRsp *TradePayResponse, err error) + func (a *Client) TradePrecreate(bm gopay.BodyMap) (aliRsp *TradePrecreateResponse, err error) + func (a *Client) TradeQuery(bm gopay.BodyMap) (aliRsp *TradeQueryResponse, err error) + func (a *Client) TradeRefund(bm gopay.BodyMap) (aliRsp *TradeRefundResponse, err error) + func (a *Client) TradeWapPay(bm gopay.BodyMap) (payUrl string, err error) + func (a *Client) UserCertifyOpenCertify(bm gopay.BodyMap) (certifyUrl string, err error) + func (a *Client) UserCertifyOpenInit(bm gopay.BodyMap) (aliRsp *UserCertifyOpenInitResponse, err error) + func (a *Client) UserCertifyOpenQuery(bm gopay.BodyMap) (aliRsp *UserCertifyOpenQueryResponse, err error) + func (a *Client) UserInfoAuth(bm gopay.BodyMap) (aliRsp *UserInfoAuthResponse, err error) + func (a *Client) UserInfoShare() (aliRsp *UserInfoShareResponse, err error) + func (a *Client) ZhimaCreditScoreGet(bm gopay.BodyMap) (aliRsp *ZhimaCreditScoreGetResponse, err error) + type DataBillBalanceQueryResponse struct + AlipayCertSn string + Response *dataBillBalanceQueryResponse + Sign string + SignData string + type DataBillDownloadUrlQueryResponse struct + AlipayCertSn string + Response *dataBillDownloadUrlQueryResponse + Sign string + SignData string + type ErrorResponse struct + Code string + Msg string + SubCode string + SubMsg string + type FundAccountQueryResponse struct + AlipayCertSn string + Response *fundAccountQueryResponse + Sign string + SignData string + type FundBillListInfo struct + Amount string + FundChannel string + type FundTransCommonQueryResponse struct + AlipayCertSn string + Response *fundTransCommonQueryResponse + Sign string + SignData string + type FundTransToaccountTransferResponse struct + AlipayCertSn string + Response *transToaccountTransferResponse + Sign string + SignData string + type FundTransUniTransferResponse struct + AlipayCertSn string + Response *transUniTransferResponse + Sign string + SignData string + type MonitorHeartbeatSynResponse struct + AlipayCertSn string + Response ... + Sign string + SignData string + func MonitorHeartbeatSyn(appId string, t PKCSType, privateKey, signType, bizContent string) (rsp *MonitorHeartbeatSynResponse, err error) + type NotifyRequest struct + AppId string + AuthAppId string + Body string + BuyerId string + BuyerLogonId string + BuyerPayAmount string + Charset string + FundBillList []*FundBillListInfo + GmtClose string + GmtCreate string + GmtPayment string + GmtRefund string + InvoiceAmount string + Method string + NotifyId string + NotifyTime string + NotifyType string + OutBizNo string + OutTradeNo string + PassbackParams string + PointAmount string + ReceiptAmount string + RefundFee string + SellerEmail string + SellerId string + Sign string + SignType string + Subject string + Timestamp string + TotalAmount string + TradeNo string + TradeStatus string + Version string + VoucherDetailList []*VoucherDetailListInfo + func ParseNotifyResult(req *http.Request) (notifyReq *NotifyRequest, err error) + type OpenApiRoyaltyDetailInfoPojo struct + Amount string + Desc string + RoyaltyType string + TransIn string + TransInType string + TransOut string + TransOutType string + type OpenAuthTokenAppResponse struct + AlipayCertSn string + Response *authTokenAppResponse + Sign string + SignData string + type PKCSType uint8 + type SystemOauthTokenResponse struct + AlipayCertSn string + ErrorResponse *ErrorResponse + Response *oauthTokenInfo + Sign string + SignData string + func SystemOauthToken(appId string, t PKCSType, privateKey, grantType, codeOrToken, signType string) (rsp *SystemOauthTokenResponse, err error) + type TradeCancelResponse struct + AlipayCertSn string + Response *cancelResponse + Sign string + SignData string + type TradeCloseResponse struct + Response *closeResponse + Sign string + SignData string + type TradeCreateResponse struct + Response *createResponse + Sign string + SignData string + type TradeFastpayRefundQueryResponse struct + AlipayCertSn string + Response *refundQueryResponse + Sign string + SignData string + type TradeFundBill struct + Amount string + BankCode string + FundChannel string + FundType string + RealAmount string + type TradeOrderSettleResponse struct + AlipayCertSn string + Response *orderSettleResponse + Sign string + SignData string + type TradePageRefundResponse struct + AlipayCertSn string + Response *pageRefundResponse + Sign string + SignData string + type TradePayResponse struct + Response *payResponse + Sign string + SignData string + type TradePrecreateResponse struct + AlipayCertSn string + NullResponse *ErrorResponse + Response *precreateResponse + Sign string + SignData string + type TradeQueryResponse struct + Response *queryResponse + Sign string + SignData string + type TradeRefundResponse struct + AlipayCertSn string + Response *refundResponse + Sign string + SignData string + type UserCertifyOpenCertifyResponse struct + AlipayCertSn string + Response *userCertifyOpenCertifyResponse + Sign string + SignData string + type UserCertifyOpenInitResponse struct + AlipayCertSn string + Response *userCertifyOpenInitResponse + Sign string + SignData string + type UserCertifyOpenQueryResponse struct + AlipayCertSn string + Response *userCertifyOpenQueryResponse + Sign string + SignData string + type UserInfoAuthResponse struct + AlipayCertSn string + Response ... + Sign string + SignData string + type UserInfoShareResponse struct + AlipayCertSn string + Response *userInfoShare + Sign string + SignData string + type UserPhone struct + Code string + Mobile string + Msg string + SubCode string + SubMsg string + type VoucherDetailListInfo struct + Amount string + Id string + Memo string + MerchantContribute string + Name string + OtherContribute string + PurchaseAntContribute string + PurchaseBuyerContribute string + PurchaseMerchantContribute string + TemplateId string + Type string + type ZhimaCreditScoreGetResponse struct + AlipayCertSn string + Response *scoreGetResponse + Sign string + SignData string