Documentation
¶
Index ¶
- Constants
- Variables
- func ACKNotification(w http.ResponseWriter)
- func AckNotification(w http.ResponseWriter)
- type AccessParams
- type AccountAuth
- type ActivityInfoDTO
- type AgreementExecutionPlanModify
- type AgreementExecutionPlanModifyRsp
- type AgreementPageSign
- type AgreementPageSignRsp
- type AgreementParams
- type AgreementQuery
- type AgreementQueryRsp
- type AgreementUnsign
- type AgreementUnsignRsp
- type AuxParam
- type BKAgentRespInfo
- type BankcardExtInfo
- type CertDownload
- type CertDownloadRsp
- type CertifyBizCode
- type ChargeInfo
- type Client
- func (c *Client) ACKNotification(w http.ResponseWriter)
- func (c *Client) AccountAuth(param AccountAuth) (result string, err error)
- func (c *Client) AckNotification(w http.ResponseWriter)
- func (c *Client) AgreementExecutionPlanModify(ctx context.Context, param AgreementExecutionPlanModify) (result *AgreementExecutionPlanModifyRsp, err error)
- func (c *Client) AgreementPageSign(param AgreementPageSign) (result *url.URL, err error)
- func (c *Client) AgreementQuery(ctx context.Context, param AgreementQuery) (result *AgreementQueryRsp, err error)
- func (c *Client) AgreementUnsign(ctx context.Context, param AgreementUnsign) (result *AgreementUnsignRsp, err error)
- func (c *Client) AppToAppAuth(redirectURI, state string) (result *url.URL, err error)
- func (c *Client) BuildURL(param Param) (*url.URL, error)
- func (c *Client) CertDownload(ctx context.Context, param CertDownload) (result *CertDownloadRsp, err error)
- func (c *Client) DecodeNotification(values url.Values) (notification *Notification, err error)
- func (c *Client) DecodePhoneNumber(ctx context.Context, data string) (result *MobileNumber, err error)
- func (c *Client) EncodeParam(param Param) (string, error)
- func (c *Client) FundAccountQuery(ctx context.Context, param FundAccountQuery) (result *FundAccountQueryRsp, err error)
- func (c *Client) FundAuthOperationCancel(ctx context.Context, param FundAuthOperationCancel) (result *FundAuthOperationCancelRsp, err error)
- func (c *Client) FundAuthOperationDetailQuery(ctx context.Context, param FundAuthOperationDetailQuery) (result *FundAuthOperationDetailQueryRsp, err error)
- func (c *Client) FundAuthOrderAppFreeze(param FundAuthOrderAppFreeze) (result string, err error)
- func (c *Client) FundAuthOrderFreeze(ctx context.Context, param FundAuthOrderFreeze) (result *FundAuthOrderFreezeRsp, err error)
- func (c *Client) FundAuthOrderUnfreeze(ctx context.Context, param FundAuthOrderUnfreeze) (result *FundAuthOrderUnfreezeRsp, err error)
- func (c *Client) FundAuthOrderVoucherCreate(ctx context.Context, param FundAuthOrderVoucherCreate) (result *FundAuthOrderVoucherCreateRsp, err error)
- func (c *Client) FundTransAppPay(param FundTransAppPay) (result string, err error)
- func (c *Client) FundTransCommonQuery(ctx context.Context, param FundTransCommonQuery) (result *FundTransCommonQueryRsp, err error)
- func (c *Client) FundTransOrderQuery(ctx context.Context, param FundTransOrderQuery) (result *FundTransOrderQueryRsp, err error)
- func (c *Client) FundTransToAccountTransfer(ctx context.Context, param FundTransToAccountTransfer) (result *FundTransToAccountTransferRsp, err error)
- func (c *Client) FundTransUniTransfer(ctx context.Context, param FundTransUniTransfer) (result *FundTransUniTransferRsp, err error)
- func (c *Client) GetTradeNotification(req *http.Request) (notification *Notification, err error)
- func (c *Client) IsProduction() bool
- func (c *Client) LoadAliPayPublicCert(s string) errordeprecated
- func (c *Client) LoadAliPayPublicCertFromFile(filename string) errordeprecated
- func (c *Client) LoadAliPayPublicKey(s string) error
- func (c *Client) LoadAliPayRootCert(s string) error
- func (c *Client) LoadAliPayRootCertFromFile(filename string) error
- func (c *Client) LoadAlipayCertPublicKey(s string) error
- func (c *Client) LoadAlipayCertPublicKeyFromFile(filename string) error
- func (c *Client) LoadAppCertPublicKey(s string) error
- func (c *Client) LoadAppCertPublicKeyFromFile(filename string) error
- func (c *Client) LoadAppPublicCert(s string) errordeprecated
- func (c *Client) LoadAppPublicCertFromFile(filename string) errordeprecated
- func (c *Client) NotifyVerify(ctx context.Context, partnerId, notifyId string) bool
- func (c *Client) OnReceivedData(fn func(ctx context.Context, method string, data []byte))
- func (c *Client) OpenAuthAppAuthInviteCreate(param OpenAuthAppAuthInviteCreate) (result *url.URL, err error)
- func (c *Client) OpenAuthTokenApp(ctx context.Context, param OpenAuthTokenApp) (result *OpenAuthTokenAppRsp, err error)
- func (c *Client) OpenAuthTokenAppQuery(ctx context.Context, param OpenAuthTokenAppQuery) (result *OpenAuthTokenAppQueryRsp, err error)
- func (c *Client) OpenMiniOrderCreate(ctx context.Context, param OpenMiniOrderCreate) (result *OpenMiniOrderCreateResponse, err error)
- func (c *Client) PublicAppAuthorize(scopes []string, redirectURI, state string) (result *url.URL, err error)
- func (c *Client) Request(ctx context.Context, param Param, result interface{}) (err error)
- func (c *Client) SetEncryptKey(key string) error
- func (c *Client) SignBytes(data []byte, opts ...nsign.SignOption) ([]byte, error)
- func (c *Client) SignValues(values url.Values, opts ...nsign.SignOption) ([]byte, error)
- func (c *Client) SystemOauthToken(ctx context.Context, param SystemOauthToken) (result *SystemOauthTokenRsp, err error)
- func (c *Client) TradeAppMergePay(param TradeAppPay) (result string, err error)
- func (c *Client) TradeAppPay(param TradeAppPay) (result string, err error)
- func (c *Client) TradeCancel(ctx context.Context, param TradeCancel) (result *TradeCancelRsp, err error)
- func (c *Client) TradeClose(ctx context.Context, param TradeClose) (result *TradeCloseRsp, err error)
- func (c *Client) TradeCreate(ctx context.Context, param TradeCreate) (result *TradeCreateRsp, err error)
- func (c *Client) TradeFastPayRefundQuery(ctx context.Context, param TradeFastPayRefundQuery) (result *TradeFastPayRefundQueryRsp, err error)
- func (c *Client) TradeMergePreCreate(ctx context.Context, param TradeMergePreCreate) (result *TradeMergePreCreateRsp, err error)
- func (c *Client) TradeOrderInfoSync(ctx context.Context, param TradeOrderInfoSync) (result *TradeOrderInfoSyncRsp, err error)
- func (c *Client) TradeOrderSettle(ctx context.Context, param TradeOrderSettle) (result *TradeOrderSettleRsp, err error)
- func (c *Client) TradePagePay(param TradePagePay) (result *url.URL, err error)
- func (c *Client) TradePay(ctx context.Context, param TradePay) (result *TradePayRsp, err error)
- func (c *Client) TradePreCreate(ctx context.Context, param TradePreCreate) (result *TradePreCreateRsp, err error)
- func (c *Client) TradeQuery(ctx context.Context, param TradeQuery) (result *TradeQueryRsp, err error)
- func (c *Client) TradeRefund(ctx context.Context, param TradeRefund) (result *TradeRefundRsp, err error)
- func (c *Client) TradeRefundAsync(ctx context.Context, param TradeRefundAsync) (result *TradeRefundAsyncRsp, err error)
- func (c *Client) TradeWapMergePay(param TradeWapMergePay) (result *url.URL, err error)
- func (c *Client) TradeWapPay(param TradeWapPay) (result *url.URL, err error)
- func (c *Client) URLValues(param Param) (value url.Values, err error)
- func (c *Client) UserCertDocCertVerifyConsult(ctx context.Context, param UserCertDocCertVerifyConsult) (result *UserCertDocCertVerifyConsultRsp, err error)
- func (c *Client) UserCertDocCertVerifyPreConsult(ctx context.Context, param UserCertDocCertVerifyPreConsult) (result *UserCertDocCertVerifyPreConsultRsp, err error)
- func (c *Client) UserCertifyOpenCertify(param UserCertifyOpenCertify) (result *url.URL, err error)
- func (c *Client) UserCertifyOpenInitialize(ctx context.Context, param UserCertifyOpenInitialize) (result *UserCertifyOpenInitializeRsp, err error)
- func (c *Client) UserCertifyOpenQuery(ctx context.Context, param UserCertifyOpenQuery) (result *UserCertifyOpenQueryRsp, err error)
- func (c *Client) UserInfoShare(ctx context.Context, param UserInfoShare) (result *UserInfoShareRsp, err error)
- func (c *Client) VerifySign(values url.Values) (err error)
- type Code
- type ContactInfoDTO
- type CreditInfoDTO
- type DepositBackInfo
- type DeviceParams
- type EffectiveDatesDTO
- type Encoder
- type Error
- type ExtUserInfo
- type ExtendParams
- type FundAccountQuery
- type FundAccountQueryRsp
- type FundAuthOperationCancel
- type FundAuthOperationCancelRsp
- type FundAuthOperationDetailQuery
- type FundAuthOperationDetailQueryRsp
- type FundAuthOrderAppFreeze
- type FundAuthOrderAppFreezeRsp
- type FundAuthOrderFreeze
- type FundAuthOrderFreezeRsp
- type FundAuthOrderUnfreeze
- type FundAuthOrderUnfreezeRsp
- type FundAuthOrderVoucherCreate
- type FundAuthOrderVoucherCreateRsp
- type FundBill
- type FundTransAppPay
- type FundTransCommonQuery
- type FundTransCommonQueryRsp
- type FundTransOrderQuery
- type FundTransOrderQueryRsp
- type FundTransToAccountTransfer
- type FundTransToAccountTransferRsp
- type FundTransUniTransfer
- type FundTransUniTransferRsp
- type GoodsDetail
- type GoodsDetailItem
- type HBFQPayInfo
- type IdentityParam
- type IdentityParams
- type ItemInstallmentInfoDTO
- type LogisticsInfoDTO
- type Merchant
- type MerchantConfig
- type MiniGoodsDetailInfoDTO
- type MiniOrderDetailDTO
- type MiniOrderExtInfoDTO
- type MiniReceiverAddressInfoDTO
- type MobileNumber
- type Notification
- type OpenAuthAppAuthInviteCreate
- type OpenAuthToken
- type OpenAuthTokenApp
- type OpenAuthTokenAppQuery
- type OpenAuthTokenAppQueryRsp
- type OpenAuthTokenAppRsp
- type OpenMiniOrderCreate
- type OpenMiniOrderCreateResponse
- type OptionFunc
- type OrderDetail
- type OrderStatus
- type Param
- type PayParams
- type PayeeInfo
- type Payload
- func (p *Payload) APIName() string
- func (p *Payload) AddBizField(key string, value interface{}) *Payload
- func (p *Payload) AddFile(name, filename, filepath string)deprecated
- func (p *Payload) AddFileObject(name, filename string, file io.Reader)
- func (p *Payload) AddFilePath(name, filename, filepath string)
- func (p *Payload) AddParam(key, value string) *Payload
- func (p *Payload) FileParams() ngx.FileForm
- func (p *Payload) MarshalJSON() ([]byte, error)
- func (p *Payload) NeedEncrypt() bool
- func (p *Payload) NeedVerify() bool
- func (p *Payload) Params() map[string]string
- func (p *Payload) Set(key string, value interface{}) *Payloaddeprecated
- type PeriodRuleParams
- type PreOrderResult
- type PriceInfoDTO
- type ProdParams
- type PromoDetailInfoDTO
- type RefundChargeInfo
- type RefundRoyalty
- type RefundRoyaltyParameter
- type RefundSubFeeDetail
- type RentInfoDTO
- type RoyaltyDetailInfoItem
- type RoyaltyInfo
- type RoyaltyParameter
- type SettleDetailInfo
- type SettleInfo
- type ShopInfoDTO
- type SignParams
- type Signer
- type SubFeeDetail
- type SubMerchantDTO
- type SubMerchantItem
- type SubMerchantParams
- type SystemOauthToken
- type SystemOauthTokenRsp
- type TicketInfoDTO
- type Trade
- type TradeAppMergePay
- type TradeAppPay
- type TradeCancel
- type TradeCancelRsp
- type TradeClose
- type TradeCloseRsp
- type TradeCreate
- type TradeCreateRsp
- type TradeFastPayRefundQuery
- type TradeFastPayRefundQueryRsp
- type TradeFundBill
- type TradeMergePreCreate
- type TradeMergePreCreateRsp
- type TradeNotification
- type TradeOrderInfoSync
- type TradeOrderInfoSyncRsp
- type TradeOrderSettle
- type TradeOrderSettleRsp
- type TradePagePay
- type TradePay
- type TradePayRsp
- type TradePreCreate
- type TradePreCreateRsp
- type TradeQuery
- type TradeQueryRsp
- type TradeRefund
- type TradeRefundAsync
- type TradeRefundAsyncRsp
- type TradeRefundRsp
- type TradeSettleDetail
- type TradeSettleInfo
- type TradeStatus
- type TradeWapMergePay
- type TradeWapPay
- type UserCertDocCertVerifyConsult
- type UserCertDocCertVerifyConsultRsp
- type UserCertDocCertVerifyPreConsult
- type UserCertDocCertVerifyPreConsultRsp
- type UserCertifyOpenCertify
- type UserCertifyOpenCertifyRsp
- type UserCertifyOpenInitialize
- type UserCertifyOpenInitializeRsp
- type UserCertifyOpenQuery
- type UserCertifyOpenQueryRsp
- type UserInfoShare
- type UserInfoShareRsp
- type Verifier
- type VoucherDetail
- type ZmAuthParams
Constants ¶
const (
NotifyTypeTradeStatusSync = "trade_status_sync"
)
Variables ¶
Functions ¶
func ACKNotification ¶
func ACKNotification(w http.ResponseWriter)
ACKNotification 返回异步通知成功处理的消息给支付宝
func AckNotification ¶
func AckNotification(w http.ResponseWriter)
AckNotification Deprecated: use ACKNotification instead.
Types ¶
type AccessParams ¶
type AccessParams struct {
Channel string `json:"channel,omitempty"` // 目前支持以下值:1.ALIPAYAPP(钱包h5页面签约)2.QRCODE(扫码签约)3.QRCODEORSMS(扫码签约或者短信签约)
}
type AccountAuth ¶
type AccountAuth struct {
AuxParam
Pid string `json:"pid"`
TargetId string `json:"target_id"`
AuthType string `json:"auth_type"`
}
AccountAuth 支付宝登录时, 帮客户端做参数签名, 返回授权请求信息字串接口请求参数 https://docs.open.alipay.com/218/105327/
func (AccountAuth) APIName ¶
func (account AccountAuth) APIName() string
func (AccountAuth) Params ¶
func (account AccountAuth) Params() map[string]string
type ActivityInfoDTO ¶
type ActivityInfoDTO struct {
ActivityID string `json:"activity_id"` // 活动ID,必选
ActivityName string `json:"activity_name"` // 活动名称,必选
LocationName string `json:"location_name"` // 活动地点,必选
City string `json:"city"` // 活动所在的城市名,必选
StartTime time.Time `json:"start_time"` // 活动开始时间,可选
EndTime time.Time `json:"end_time"` // 活动结束时间,可选
Link string `json:"link"` // 活动票链接,可选
}
ActivityInfoDTO 定义活动信息的结构体
type AgreementExecutionPlanModify ¶
type AgreementExecutionPlanModify struct {
AuxParam
AppAuthToken string `json:"-"`
NotifyURL string `json:"-"`
AgreementNo string `json:"agreement_no,omitempty"` // 支付宝系统中用以唯一标识用户签约记录的编号(用户签约成功后的协议号)
DeductTime string `json:"deduct_time,omitempty"` // 商户下一次扣款时间
Memo string `json:"memo,omitempty"` // 具体修改原因
}
AgreementExecutionPlanModify 周期性扣款协议执行计划修改接口请求参数 https://docs.open.alipay.com/api_2/alipay.user.agreement.executionplan.modify
func (AgreementExecutionPlanModify) APIName ¶
func (ag AgreementExecutionPlanModify) APIName() string
func (AgreementExecutionPlanModify) Params ¶
func (ag AgreementExecutionPlanModify) Params() map[string]string
type AgreementExecutionPlanModifyRsp ¶
type AgreementExecutionPlanModifyRsp struct {
Error
AgreementNo string `json:"agreement_no"`
DeductTime string `json:"deduct_time"`
}
AgreementExecutionPlanModifyRsp 周期性扣款协议执行计划修改响应参数
type AgreementPageSign ¶
type AgreementPageSign struct {
AuxParam
AppAuthToken string `json:"-"`
ReturnURL string `json:"-"`
NotifyURL string `json:"-"`
SignValidityPeriod string `json:"sign_validity_period,omitempty"` // 当前用户签约请求的协议有效周期。整形数字加上时间单位的协议有效期,从发起签约请求的时间开始算起。目前支持的时间单位:1.d:天2.m:月如果未传入,默认为长期有效
ProductCode string `json:"product_code,omitempty"` // 销售产品码,商户签约的支付宝合同所对应的产品码
ExternalLogonId string `json:"external_logon_id,omitempty"` // 用户在商户网站的登录账号,用于在签约页面展示,如果为空,则不展示
PersonalProductCode string `json:"personal_product_code,omitempty"` // 个人签约产品码,商户和支付宝签约时确定,商户可咨询技 术支持
SignScene string `json:"sign_scene,omitempty"` // 协议签约场景,商户和支付宝 签约时确定,商户可咨询技术支持。当传入商户签约号external_agreement_no时,场景不能为默认值DEFAULT|DEFAULT
ExternalAgreementNo string `json:"external_agreement_no,omitempty"` // 商户签约号,代扣协议中标示 用户的唯一签约号(确保在商 户系统中唯一)。
ThirdPartyType string `json:"third_party_type,omitempty"` // 签约第三方主体类型。对于三方协议,表示当前用户和哪一类的第三方主体进行签约。1.PARTNER(平台商户);2.MERCHANT(集团商户);默认为PARTNER
ZmAuthParams *ZmAuthParams `json:"zm_auth_params,omitempty"` // 芝麻授权信息,针对于信用代扣签约。json格式。
ProdParams *ProdParams `json:"prod_params,omitempty"` // 签约产品属性
PromoParams string `json:"promo_params,omitempty"` // 签约营销参数,此值为json格式;具体的key需与营销约定
AccessParams *AccessParams `json:"access_params,omitempty"`
SubMerchantParams *SubMerchantParams `json:"sub_merchant_params,omitempty"`
DeviceParams *DeviceParams `json:"device_params,omitempty"`
MerchantProcessUrl string `json:"merchant_process_url,omitempty"`
IdentityParams *IdentityParams `json:"identity_params,omitempty"`
AgreementEffectType string `json:"agreement_effect_type,omitempty"`
UserAgeRange string `json:"user_age_range,omitempty"`
PeriodRuleParams *PeriodRuleParams `json:"period_rule_params,omitempty"`
}
AgreementPageSign 支付宝个人协议页面签约接口请求参数 https://docs.open.alipay.com/api_2/alipay.user.agreement.page.sign
func (AgreementPageSign) APIName ¶
func (ag AgreementPageSign) APIName() string
func (AgreementPageSign) Params ¶
func (ag AgreementPageSign) Params() map[string]string
type AgreementPageSignRsp ¶
type AgreementPageSignRsp struct {
Error
ExternalAgreementNo string `json:"external_agreement_no"` // 代扣协议中标示用户的唯一签约号(确保在商户系统中唯一)
PersonalProductCode string `json:"personal_product_code"` // 协议产品码,商户和支付宝签约时确定,不同业务场景对应不同的签约产品码
ValidTime string `json:"valid_time"` // 协议生效时间,格式为 yyyyMM-dd HH:mm:ss
SignScene string `json:"sign_scene"` // 签约协议的场景
AgreementNo string `json:"agreement_no"` // 用户签约成功后的协议号
ZmOpenId string `json:"zm_open_id"` // 用户的芝麻信用 openId,供商户查询用户芝麻信用使用。
InvalidTime string `json:"invalid_time"` // 协议失效时间,格式为 yyyyMM-dd HH:mm:ss
SignTime string `json:"sign_time"` // 协议签约时间,格式为 yyyyMM-dd HH:mm:ss
AlipayUserId string `json:"alipay_user_id"` // 用户的支付宝账号对应的支付宝唯一用户号,以2088开头的16位纯数字组成;本参数与alipay_logon_id不可同时为空,若都填写,则以本参数为准,优先级高于alipay_logon_id
Status string `json:"status"` // 协议当前状态 1.TEMP:暂存,协议未生效过;2.NORMAL:正常;3.STOP:暂停
ForexEligible string `json:"forex_eligible"` // 是否海外购汇身份。值:T/F(只有在签约成功时才会返回)
ExternalLogonId string `json:"external_logon_id"` // 外部登录Id
AlipayLogonId string `json:"alipay_logon_id"` // 返回脱敏的支付宝账号
}
AgreementPageSignRsp 支付宝个人协议页面签约接口请响应参数
type AgreementParams ¶
type AgreementQuery ¶
type AgreementQuery struct {
AuxParam
AppAuthToken string `json:"-"`
PersonalProductCode string `json:"personal_product_code,omitempty"` // 协议产品码,商户和支付宝签约时确定,商户可咨询技术支持
AlipayUserId string `json:"alipay_user_id,omitempty"` // 用户的支付宝账号对应的支付宝唯一用户号,以2088开头的16位纯数字组成;本参数与alipay_logon_id不可同时为空,若都填写,则以本参数为准,优先级高于alipay_logon_id
AlipayLogonId string `json:"alipay_logon_id,omitempty"` // 用户的支付宝登录账号,支持邮箱或手机号码格式。本参数与alipay_user_id不可同时为空,若都填写,则以alipay_user_id为准
SignScene string `json:"sign_scene,omitempty"` // 签约协议场景,商户和支付宝签约时确定,商户可咨询技术支持
ExternalAgreementNo string `json:"external_agreement_no,omitempty"` // 代扣协议中标示用户的唯一签约号(确保在商户系统中 唯一)。
ThirdPartyType string `json:"third_party_type,omitempty"` // 签约第三方主体类型。对于三方协议,表示当前用户和哪一类的第三方主体进行签约
AgreementNo string `json:"agreement_no,omitempty"` // 支付宝系统中用以唯一标识用户签约记录的编号(用户签约成功后的协议号),如果传了该参数,其他参数会被忽略
}
AgreementQuery 支付宝个人代扣协议查询接口请求参数 https://opendocs.alipay.com/open/02fkao?scene=8837b4183390497f84bb53783b488ecc
func (AgreementQuery) APIName ¶
func (ag AgreementQuery) APIName() string
func (AgreementQuery) Params ¶
func (ag AgreementQuery) Params() map[string]string
type AgreementQueryRsp ¶
type AgreementQueryRsp struct {
Error
PrincipalId string `json:"principal_id"` // 签约主体标识。当principal_type为CARD时,该字段为支付宝用户号;当principal_type为CUSTOMER时,该字段为支付宝用户标识。
ValidTime string `json:"valid_time"` // 协议生效时间,格式为 yyyyMM-dd HH:mm:ss
AlipayLogonId string `json:"alipay_logon_id"` // 返回脱敏的支付宝账号
InvalidTime string `json:"invalid_time"` // 协议失效时间,格式为 yyyyMM-dd HH:mm:ss
PricipalType string `json:"pricipal_type"` // 签约主体类型。 CARD:支付宝账号 CUSTOMER:支付宝用户
DeviceId string `json:"device_id"` // 设备Id
SignScene string `json:"sign_scene"` // 签约协议的场景
AgreementNo string `json:"agreement_no"` // 用户签约成功后的协议号
ThirdPartyType string `json:"third_party_type"` // 签约第三方主体类型。对于三方协议,表示当前用户和哪一类的第三方主体进行签约。 1.PARTNER(平台商户);2.MERCHANT(集团商户),集团下子商户可共享用户签约内容;默认为PARTNER
Status string `json:"status"` // 协议当前状态 1.TEMP:暂存,协议未生效过;2.NORMAL:正常;3.STOP:暂停
SignTime string `json:"sign_time"` // 协议签约时间,格式为 yyyyMM-dd HH:mm:ss
PersonalProductCode string `json:"personal_product_code"` // 协议产品码,商户和支付宝签约时确定,不同业务场景对应不同的签约产品码
ExternalAgreementNo string `json:"external_agreement_no"` // 代扣协议中标示用户的唯一签约号(确保在商户系统中唯一)
ZmOpenId string `json:"zm_open_id"` // 用户的芝麻信用 openId,供商户查询用户芝麻信用使用。
ExternalLogonId string `json:"external_logon_id"` // 外部登录Id
CreditAuthMode string `json:"credit_auth_mode"` // 授信模式,取值:DEDUCT_HUAZHI-花芝GO。目前只在花芝代扣(即花芝go)协议时才会返回
SingleQuota string `json:"single_quota"` // 单笔代扣额度
LastDeductTime string `json:"last_deduct_time"` // 周期扣协议,上次扣款成功时间
NextDeductTime string `json:"next_deduct_time"` // 周期扣协议,预计下次扣款时间
}
AgreementQueryRsp 支付宝个人代扣协议查询接口响应参数
type AgreementUnsign ¶
type AgreementUnsign struct {
AuxParam
AppAuthToken string `json:"-"`
NotifyURL string `json:"-"`
AlipayUserId string `json:"alipay_user_id,omitempty"` // 用户的支付宝账号对应的支付宝唯一用户号,以2088开头的16位纯数字组成;本参数与alipay_logon_id不可同时为空,若都填写,则以本参数为准,优先级高于alipay_logon_id
AlipayLogonId string `json:"alipay_logon_id,omitempty"` // 返回脱敏的支付宝账号
PersonalProductCode string `json:"personal_product_code,omitempty"` // 协议产品码,商户和支付宝签约时确定,不同业务场景对应不同的签约产品码
SignScene string `json:"sign_scene,omitempty"` // 签约协议的场景
ExternalAgreementNo string `json:"external_agreement_no,omitempty"` // 代扣协议中标示用户的唯一签约号(确保在商户系统中唯一)
ThirdPartyType string `json:"third_party_type,omitempty"` // 签约第三方主体类型。对于三方协议,表示当前用户和哪一类的第三方主体进行签约
AgreementNo string `json:"agreement_no,omitempty"` // 支付宝系统中用以唯一标识用户签约记录的编号(用户签约成功后的协议号),如果传了该参数,其他参数会被忽略
ExtendParams string `json:"extend_params,omitempty"`
OperateType string `json:"operate_type,omitempty"`
}
AgreementUnsign 支付宝个人代扣协议解约接口请求参数 https://docs.open.alipay.com/api_2/alipay.user.agreement.unsign
func (AgreementUnsign) APIName ¶
func (ag AgreementUnsign) APIName() string
func (AgreementUnsign) Params ¶
func (ag AgreementUnsign) Params() map[string]string
type AgreementUnsignRsp ¶
type AgreementUnsignRsp struct {
Error
}
AgreementUnsignRsp 支付宝个人代扣协议解约接口响应参数
type AuxParam ¶
type AuxParam struct {
}
func (AuxParam) FileParams ¶
func (AuxParam) NeedEncrypt ¶
func (AuxParam) NeedVerify ¶
type BKAgentRespInfo ¶
type BankcardExtInfo ¶
type BankcardExtInfo struct {
InstName string `json:"inst_name"` // 可选 当收款账户为对公账户时,机构名称必填;当收款账户为对私账户时,机构名称可为空。机构名称参见 银行机构名称。
AccountType string `json:"account_type"` // 必选 收款账户类型。 1:对公(在金融机构开设的公司账户),如果银行卡为对公,必须传递省市支行信息或者联行号 2:对私(在金融机构开设的个人账户)
InstProvince string `json:"inst_province"` // 可选 银行所在省份
InstCity string `json:"inst_city"` // 可选 收款银行所在市
InstBranchName string `json:"inst_branch_name"` // 可选 收款银行所属支行
BankCode string `json:"bank_code"` // 可选 银行支行联行号
}
type CertDownload ¶
type CertDownload struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
AliPayCertSN string `json:"alipay_cert_sn"` // 支付宝公钥证书序列号
}
CertDownload 应用支付宝公钥证书下载 https://opendocs.alipay.com/common/06ue2z
func (CertDownload) APIName ¶
func (c CertDownload) APIName() string
func (CertDownload) NeedEncrypt ¶
func (c CertDownload) NeedEncrypt() bool
func (CertDownload) NeedVerify ¶
func (c CertDownload) NeedVerify() bool
func (CertDownload) Params ¶
func (c CertDownload) Params() map[string]string
type CertDownloadRsp ¶
type CertifyBizCode ¶
type CertifyBizCode string
const ( CertifyBizCodeFace CertifyBizCode = "FACE" // 多因子人脸认证 CertifyBizCodeCertPhoto CertifyBizCode = "CERT_PHOTO" // 多因子证照认证 CertifyBizCodeCertPhotoFace CertifyBizCode = "CERT_PHOTO_FACE" // 多因子证照和人脸认证 CertifyBizCodeSmartFace CertifyBizCode = "SMART_FACE" // 多因子快捷认证 )
type ChargeInfo ¶
type ChargeInfo struct {
ChargeFee string `json:"charge_fee"`
OriginalChargeFee string `json:"original_charge_fee"`
SwitchFeeRate string `json:"switch_fee_rate"`
IsRatingOnTradeReceiver string `json:"is_rating_on_trade_receiver"`
IsRatingOnSwitch string `json:"is_rating_on_switch"`
ChargeType string `json:"charge_type"`
SubFeeDetailList []*SubFeeDetail `json:"sub_fee_detail_list"`
}
type Client ¶
func New ¶
func New(appId, privateKey string, isProduction bool, opts ...OptionFunc) (nClient *Client, err error)
New 初始化支付宝客户端
appId - 支付宝应用 id
privateKey - 应用私钥,开发者自己生成
isProduction - 是否为生产环境,传 false 的时候为沙箱环境,用于开发测试,正式上线的时候需要改为 true
func (*Client) ACKNotification ¶
func (c *Client) ACKNotification(w http.ResponseWriter)
ACKNotification 返回异步通知成功处理的消息给支付宝
func (*Client) AccountAuth ¶
func (c *Client) AccountAuth(param AccountAuth) (result string, err error)
AccountAuth 支付宝登录时, 帮客户端做参数签名, 返回授权请求信息字串接口 https://docs.open.alipay.com/218/105327
func (*Client) AckNotification ¶
func (c *Client) AckNotification(w http.ResponseWriter)
AckNotification Deprecated: use ACKNotification instead.
func (*Client) AgreementExecutionPlanModify ¶
func (c *Client) AgreementExecutionPlanModify(ctx context.Context, param AgreementExecutionPlanModify) (result *AgreementExecutionPlanModifyRsp, err error)
AgreementExecutionPlanModify 周期性扣款协议执行计划修改接口 https://docs.open.alipay.com/api_2/alipay.user.agreement.executionplan.modify
func (*Client) AgreementPageSign ¶
func (c *Client) AgreementPageSign(param AgreementPageSign) (result *url.URL, err error)
AgreementPageSign 支付宝个人协议页面签约接口 https://docs.open.alipay.com/api_2/alipay.user.agreement.page.sign
func (*Client) AgreementQuery ¶
func (c *Client) AgreementQuery(ctx context.Context, param AgreementQuery) (result *AgreementQueryRsp, err error)
AgreementQuery 支付宝个人代扣协议查询接口 https://opendocs.alipay.com/open/02fkao?scene=8837b4183390497f84bb53783b488ecc
func (*Client) AgreementUnsign ¶
func (c *Client) AgreementUnsign(ctx context.Context, param AgreementUnsign) (result *AgreementUnsignRsp, err error)
AgreementUnsign 支付宝个人代扣协议解约接口 https://docs.open.alipay.com/api_2/alipay.user.agreement.unsign
func (*Client) AppToAppAuth ¶
AppToAppAuth 第三方应用授权接口 https://docs.open.alipay.com/20160728150111277227/intro
func (*Client) CertDownload ¶
func (c *Client) CertDownload(ctx context.Context, param CertDownload) (result *CertDownloadRsp, err error)
func (*Client) DecodeNotification ¶
func (c *Client) DecodeNotification(values url.Values) (notification *Notification, err error)
func (*Client) DecodePhoneNumber ¶
func (c *Client) DecodePhoneNumber(ctx context.Context, data string) (result *MobileNumber, err error)
DecodePhoneNumber 小程序获取会员手机号 https://opendocs.alipay.com/mini/api/getphonenumber
本方法用于解码小程序端 my.getPhoneNumber 获取的数据
func (*Client) FundAccountQuery ¶
func (c *Client) FundAccountQuery(ctx context.Context, param FundAccountQuery) (result *FundAccountQueryRsp, err error)
FundAccountQuery 支付宝资金账户资产查询接口 https://docs.open.alipay.com/api_28/alipay.fund.account.query
func (*Client) FundAuthOperationCancel ¶
func (c *Client) FundAuthOperationCancel(ctx context.Context, param FundAuthOperationCancel) (result *FundAuthOperationCancelRsp, err error)
FundAuthOperationCancel 资金授权撤销接口 https://docs.open.alipay.com/api_28/alipay.fund.auth.operation.cancel/
func (*Client) FundAuthOperationDetailQuery ¶
func (c *Client) FundAuthOperationDetailQuery(ctx context.Context, param FundAuthOperationDetailQuery) (result *FundAuthOperationDetailQueryRsp, err error)
FundAuthOperationDetailQuery 资金授权操作查询接口 https://docs.open.alipay.com/api_28/alipay.fund.auth.operation.detail.query/
func (*Client) FundAuthOrderAppFreeze ¶
func (c *Client) FundAuthOrderAppFreeze(param FundAuthOrderAppFreeze) (result string, err error)
FundAuthOrderAppFreeze 线上资金授权冻结接口 https://docs.open.alipay.com/api_28/alipay.fund.auth.order.app.freeze
func (*Client) FundAuthOrderFreeze ¶
func (c *Client) FundAuthOrderFreeze(ctx context.Context, param FundAuthOrderFreeze) (result *FundAuthOrderFreezeRsp, err error)
FundAuthOrderFreeze 资金授权冻结接口 https://docs.open.alipay.com/api_28/alipay.fund.auth.order.freeze/
func (*Client) FundAuthOrderUnfreeze ¶
func (c *Client) FundAuthOrderUnfreeze(ctx context.Context, param FundAuthOrderUnfreeze) (result *FundAuthOrderUnfreezeRsp, err error)
FundAuthOrderUnfreeze 资金授权解冻接口 https://docs.open.alipay.com/api_28/alipay.fund.auth.order.unfreeze/
func (*Client) FundAuthOrderVoucherCreate ¶
func (c *Client) FundAuthOrderVoucherCreate(ctx context.Context, param FundAuthOrderVoucherCreate) (result *FundAuthOrderVoucherCreateRsp, err error)
FundAuthOrderVoucherCreate 资金授权发码接口 https://docs.open.alipay.com/api_28/alipay.fund.auth.order.voucher.create/
func (*Client) FundTransAppPay ¶
func (c *Client) FundTransAppPay(param FundTransAppPay) (result string, err error)
FundTransAppPay 现金红包无线支付接口 https://opendocs.alipay.com/open/03rbyf
func (*Client) FundTransCommonQuery ¶
func (c *Client) FundTransCommonQuery(ctx context.Context, param FundTransCommonQuery) (result *FundTransCommonQueryRsp, err error)
FundTransCommonQuery 转账业务单据查询接口 https://docs.open.alipay.com/api_28/alipay.fund.trans.common.query/
func (*Client) FundTransOrderQuery ¶
func (c *Client) FundTransOrderQuery(ctx context.Context, param FundTransOrderQuery) (result *FundTransOrderQueryRsp, err error)
FundTransOrderQuery 查询转账订单接口 https://docs.open.alipay.com/api_28/alipay.fund.trans.order.query/
func (*Client) FundTransToAccountTransfer ¶
func (c *Client) FundTransToAccountTransfer(ctx context.Context, param FundTransToAccountTransfer) (result *FundTransToAccountTransferRsp, err error)
FundTransToAccountTransfer 单笔转账到支付宝账户接口 https://docs.open.alipay.com/api_28/alipay.fund.trans.toaccount.transfer
func (*Client) FundTransUniTransfer ¶
func (c *Client) FundTransUniTransfer(ctx context.Context, param FundTransUniTransfer) (result *FundTransUniTransferRsp, err error)
FundTransUniTransfer 单笔转账接口 https://docs.open.alipay.com/api_28/alipay.fund.trans.uni.transfer/
func (*Client) GetTradeNotification ¶
func (c *Client) GetTradeNotification(req *http.Request) (notification *Notification, err error)
GetTradeNotification Deprecated: use DecodeNotification instead.
func (*Client) IsProduction ¶
func (*Client) LoadAliPayPublicCert
deprecated
func (*Client) LoadAliPayPublicCertFromFile
deprecated
func (*Client) LoadAliPayPublicKey ¶
LoadAliPayPublicKey 加载支付宝公钥
func (*Client) LoadAliPayRootCert ¶
LoadAliPayRootCert 加载支付宝根证书
func (*Client) LoadAliPayRootCertFromFile ¶
LoadAliPayRootCertFromFile 加载支付宝根证书
func (*Client) LoadAlipayCertPublicKey ¶
LoadAlipayCertPublicKey 支付宝公钥证书
func (*Client) LoadAlipayCertPublicKeyFromFile ¶
LoadAlipayCertPublicKeyFromFile 从文件支付宝公钥证书
func (*Client) LoadAppCertPublicKey ¶
LoadAppCertPublicKey 加载应用公钥证书
func (*Client) LoadAppCertPublicKeyFromFile ¶
LoadAppCertPublicKeyFromFile 从文件加载应用公钥证书
func (*Client) LoadAppPublicCert
deprecated
func (*Client) LoadAppPublicCertFromFile
deprecated
func (*Client) NotifyVerify ¶
func (*Client) OnReceivedData ¶
func (*Client) OpenAuthAppAuthInviteCreate ¶
func (c *Client) OpenAuthAppAuthInviteCreate(param OpenAuthAppAuthInviteCreate) (result *url.URL, err error)
OpenAuthAppAuthInviteCreate ISV向商户发起应用授权邀约 https://opendocs.alipay.com/isv/06evao?pathHash=f46ecafa TODO OpenAuthAppAuthInviteCreate 接口未经测试
func (*Client) OpenAuthTokenApp ¶
func (c *Client) OpenAuthTokenApp(ctx context.Context, param OpenAuthTokenApp) (result *OpenAuthTokenAppRsp, err error)
OpenAuthTokenApp 换取应用授权令牌接口 https://docs.open.alipay.com/api_9/alipay.open.auth.token.app
func (*Client) OpenAuthTokenAppQuery ¶
func (c *Client) OpenAuthTokenAppQuery(ctx context.Context, param OpenAuthTokenAppQuery) (result *OpenAuthTokenAppQueryRsp, err error)
OpenAuthTokenAppQuery 查询某个应用授权AppAuthToken的授权信息 https://opendocs.alipay.com/isv/04hgcp?pathHash=7ea21afe
func (*Client) OpenMiniOrderCreate ¶
func (c *Client) OpenMiniOrderCreate(ctx context.Context, param OpenMiniOrderCreate) (result *OpenMiniOrderCreateResponse, err error)
OpenMiniOrderCreate 小程序交易组件业务单创建 https://opendocs.alipay.com/mini/54f80876_alipay.open.mini.order.create
func (*Client) PublicAppAuthorize ¶
func (c *Client) PublicAppAuthorize(scopes []string, redirectURI, state string) (result *url.URL, err error)
PublicAppAuthorize 用户信息授权接口(网站支付宝登录快速接入) https://docs.open.alipay.com/289/105656#s3 (https://docs.open.alipay.com/263/105809)
func (*Client) SetEncryptKey ¶
SetEncryptKey 接口内容加密密钥 https://opendocs.alipay.com/common/02mse3
func (*Client) SignValues ¶
func (*Client) SystemOauthToken ¶
func (c *Client) SystemOauthToken(ctx context.Context, param SystemOauthToken) (result *SystemOauthTokenRsp, err error)
SystemOauthToken 换取授权访问令牌接口 https://docs.open.alipay.com/api_9/alipay.system.oauth.token
func (*Client) TradeAppMergePay ¶
func (c *Client) TradeAppMergePay(param TradeAppPay) (result string, err error)
TradeAppMergePay App合并支付接口 https://opendocs.alipay.com/open/028py8 TODO TradeAppMergePay 接口未经测试
func (*Client) TradeAppPay ¶
func (c *Client) TradeAppPay(param TradeAppPay) (result string, err error)
TradeAppPay App支付接口 https://docs.open.alipay.com/api_1/alipay.trade.app.pay
func (*Client) TradeCancel ¶
func (c *Client) TradeCancel(ctx context.Context, param TradeCancel) (result *TradeCancelRsp, err error)
TradeCancel 统一收单交易撤销接口 https://docs.open.alipay.com/api_1/alipay.trade.cancel/
func (*Client) TradeClose ¶
func (c *Client) TradeClose(ctx context.Context, param TradeClose) (result *TradeCloseRsp, err error)
TradeClose 统一收单交易关闭接口 https://docs.open.alipay.com/api_1/alipay.trade.close/
func (*Client) TradeCreate ¶
func (c *Client) TradeCreate(ctx context.Context, param TradeCreate) (result *TradeCreateRsp, err error)
TradeCreate 统一收单交易创建接口 https://docs.open.alipay.com/api_1/alipay.trade.create/
func (*Client) TradeFastPayRefundQuery ¶
func (c *Client) TradeFastPayRefundQuery(ctx context.Context, param TradeFastPayRefundQuery) (result *TradeFastPayRefundQueryRsp, err error)
TradeFastPayRefundQuery 统一收单交易退款查询接口 https://docs.open.alipay.com/api_1/alipay.trade.fastpay.refund.query
func (*Client) TradeMergePreCreate ¶
func (c *Client) TradeMergePreCreate(ctx context.Context, param TradeMergePreCreate) (result *TradeMergePreCreateRsp, err error)
TradeMergePreCreate 统一收单合并支付预创建接口请求参数 https://opendocs.alipay.com/open/028xr9 TODO TradeMergePreCreate 接口未经测试
func (*Client) TradeOrderInfoSync ¶
func (c *Client) TradeOrderInfoSync(ctx context.Context, param TradeOrderInfoSync) (result *TradeOrderInfoSyncRsp, err error)
TradeOrderInfoSync 支付宝订单信息同步接口 https://docs.open.alipay.com/api_1/alipay.trade.orderinfo.sync/
func (*Client) TradeOrderSettle ¶
func (c *Client) TradeOrderSettle(ctx context.Context, param TradeOrderSettle) (result *TradeOrderSettleRsp, err error)
TradeOrderSettle 统一收单交易结算接口 https://docs.open.alipay.com/api_1/alipay.trade.order.settle
func (*Client) TradePagePay ¶
func (c *Client) TradePagePay(param TradePagePay) (result *url.URL, err error)
TradePagePay 统一收单下单并支付页面接口 https://docs.open.alipay.com/api_1/alipay.trade.page.pay
func (*Client) TradePay ¶
TradePay 统一收单交易支付接口 https://docs.open.alipay.com/api_1/alipay.trade.pay/
func (*Client) TradePreCreate ¶
func (c *Client) TradePreCreate(ctx context.Context, param TradePreCreate) (result *TradePreCreateRsp, err error)
TradePreCreate 统一收单线下交易预创建接口 https://docs.open.alipay.com/api_1/alipay.trade.precreate/
func (*Client) TradeQuery ¶
func (c *Client) TradeQuery(ctx context.Context, param TradeQuery) (result *TradeQueryRsp, err error)
TradeQuery 统一收单线下交易查询接口 https://docs.open.alipay.com/api_1/alipay.trade.query/
func (*Client) TradeRefund ¶
func (c *Client) TradeRefund(ctx context.Context, param TradeRefund) (result *TradeRefundRsp, err error)
TradeRefund 统一收单交易退款接口 https://docs.open.alipay.com/api_1/alipay.trade.refund/
func (*Client) TradeRefundAsync ¶
func (c *Client) TradeRefundAsync(ctx context.Context, param TradeRefundAsync) (result *TradeRefundAsyncRsp, err error)
TradeRefundAsync 统一收单交易退款(异步)接口 https://opendocs.alipay.com/pre-apis/api_pre/alipay.trade.refund.apply
func (*Client) TradeWapMergePay ¶
func (c *Client) TradeWapMergePay(param TradeWapMergePay) (result *url.URL, err error)
TradeWapMergePay 无线Wap合并支付接口2.0 https://opendocs.alipay.com/open/028xra TODO TradeWapMergePay 接口未经测试
func (*Client) TradeWapPay ¶
func (c *Client) TradeWapPay(param TradeWapPay) (result *url.URL, err error)
TradeWapPay 手机网站支付接口 https://docs.open.alipay.com/api_1/alipay.trade.wap.pay/
func (*Client) UserCertDocCertVerifyConsult ¶
func (c *Client) UserCertDocCertVerifyConsult(ctx context.Context, param UserCertDocCertVerifyConsult) (result *UserCertDocCertVerifyConsultRsp, err error)
UserCertDocCertVerifyConsult 实名证件信息比对验证咨询 https://opendocs.alipay.com/apis/api_2/alipay.user.certdoc.certverify.consult
func (*Client) UserCertDocCertVerifyPreConsult ¶
func (c *Client) UserCertDocCertVerifyPreConsult(ctx context.Context, param UserCertDocCertVerifyPreConsult) (result *UserCertDocCertVerifyPreConsultRsp, err error)
UserCertDocCertVerifyPreConsult 实名证件信息比对验证预咨询 https://opendocs.alipay.com/apis/api_2/alipay.user.certdoc.certverify.preconsult
func (*Client) UserCertifyOpenCertify ¶
func (c *Client) UserCertifyOpenCertify(param UserCertifyOpenCertify) (result *url.URL, err error)
UserCertifyOpenCertify 身份认证开始认证接口 https://docs.open.alipay.com/api_2/alipay.user.certify.open.certify
func (*Client) UserCertifyOpenInitialize ¶
func (c *Client) UserCertifyOpenInitialize(ctx context.Context, param UserCertifyOpenInitialize) (result *UserCertifyOpenInitializeRsp, err error)
UserCertifyOpenInitialize 身份认证初始化服务接口 https://docs.open.alipay.com/api_2/alipay.user.certify.open.initialize
func (*Client) UserCertifyOpenQuery ¶
func (c *Client) UserCertifyOpenQuery(ctx context.Context, param UserCertifyOpenQuery) (result *UserCertifyOpenQueryRsp, err error)
UserCertifyOpenQuery 身份认证记录查询接口 https://docs.open.alipay.com/api_2/alipay.user.certify.open.query/
func (*Client) UserInfoShare ¶
func (c *Client) UserInfoShare(ctx context.Context, param UserInfoShare) (result *UserInfoShareRsp, err error)
UserInfoShare 支付宝会员授权信息查询接口 https://docs.open.alipay.com/api_2/alipay.user.info.share
type Code ¶
type Code string
Code 支付宝接口响应错误码 https://doc.open.alipay.com/docs/doc.htm?treeId=291&articleId=105806&docType=1
const ( CodeSuccess Code = "10000" // 接口调用成功 CodeOrderSuccessPayInProcess Code = "10003" // 表示订单创建成功,支付处理中 CodeUnknowError Code = "20000" // 服务不可用 CodeInvalidAuthToken Code = "20001" // 授权权限不足 CodeMissingParam Code = "40001" // 缺少必选参数 CodeInvalidParam Code = "40002" // 非法的参数 CodeInsufficientConditions Code = "40003" // 条件异常 CodeBusinessFailed Code = "40004" // 业务处理失败 CodeCallLimited Code = "40005" // 调用频次超限 CodePermissionDenied Code = "40006" // 权限不足 )
公共错误码 https://opendocs.alipay.com/common/02km9f#API%20%E5%85%AC%E5%85%B1%E9%94%99%E8%AF%AF%E7%A0%81
type ContactInfoDTO ¶
type ContactInfoDTO struct {
PhoneNumber string `json:"phone_number,omitempty"` // 联系人手机号,可选
ContactName string `json:"contact_name,omitempty"` // 联系人姓名,可选
}
ContactInfoDTO 定义买家联系人信息的结构体
type CreditInfoDTO ¶
type CreditInfoDTO struct {
ZmServiceID string `json:"zm_service_id"` // 信用服务ID,必选
OutAgreementNo string `json:"out_agreement_no"` // 商户外部协议号,必选
}
CreditInfoDTO 定义芝麻信用信息的结构体
type DepositBackInfo ¶
type DeviceParams ¶
type EffectiveDatesDTO ¶
type EffectiveDatesDTO struct {
Date string `json:"date"` // 价格日期,可选
Price string `json:"price"` // 商品单价,可选
}
EffectiveDatesDTO 定义价格日历的结构体
type Error ¶
type ExtUserInfo ¶
type ExtUserInfo struct {
Name string `json:"name"` // 可选 指定买家姓名。 注: need_check_info=T时该参数才有效
Mobile string `json:"mobile"` // 可选 指定买家手机号。 注:该参数暂不校验
CertType string `json:"cert_type"` // 可选 指定买家证件类型。 枚举值:IDENTITY_CARD:身份证;PASSPORT:护照;OFFICER_CARD:军官证;SOLDIER_CARD:士兵证;HOKOU:户口本。如有其它类型需要支持,请与蚂蚁金服工作人员联系。注: need_check_info=T时该参数才有效,支付宝会比较买家在支付宝留存的证件类型与该参数传入的值是否匹配。
CertNo string `json:"cert_no"` // 可选 买家证件号。 注:need_check_info=T时该参数才有效,支付宝会比较买家在支付宝留存的证件号码与该参数传入的值是否匹配。
MinAge string `json:"min_age"` // 可选 允许的最小买家年龄。 买家年龄必须大于等于所传数值注:1. need_check_info=T时该参数才有效 2. min_age为整数,必须大于等于0
NeedCheckInfo string `json:"need_check_info"` // 可选 是否强制校验买家信息; 需要强制校验传:T;不需要强制校验传:F或者不传;当传T时,支付宝会校验支付买家的信息与接口上传递的cert_type、cert_no、name或age是否匹配,只有接口传递了信息才会进行对应项的校验;只要有任何一项信息校验不匹配交易都会失败。如果传递了need_check_info,但是没有传任何校验项,则不进行任何校验。默认为不校验。
IdentityHash string `json:"identity_hash"` // 可选 买家加密身份信息。当指定了此参数且指定need_check_info=T时,支付宝会对买家身份进行校验,校验逻辑为买家姓名、买家证件号拼接后的字符串,以sha256算法utf-8编码计算hash,若与传入的值不匹配则会拦截本次支付。注意:如果同时指定了用户明文身份信息(name,cert_type,cert_no中任意一个),则忽略identity_hash以明文参数校验。
}
type ExtendParams ¶
type ExtendParams struct {
SysServiceProviderId string `json:"sys_service_provider_id"` // 可选 系统商编号 该参数作为系统商返佣数据提取的依据,请填写系统商签约协议的PID
HBFQNum string `json:"hb_fq_num"` // 可选 使用花呗分期要进行的分期数
HBFQSellerPercent string `json:"hb_fq_seller_percent"` // 可选 使用花呗分期需要卖家承担的手续费比例的百分值,传入100代表100%
IndustryRefluxInfo string `json:"industry_reflux_info"` // 可选 行业数据回流信息, 详见:地铁支付接口参数补充说明
CardType string `json:"card_type"` // 可选 卡类型
SpecifiedSellerName string `json:"specified_seller_name"` // 可选 特殊场景下,允许商户指定交易展示的卖家名称
OrigTotalAmount string `json:"orig_total_amount"` // 可选 外部订单金额。
TradeComponentOrderId string `json:"trade_component_order_id"` // 可选 公域商品交易业务订单ID
}
type FundAccountQuery ¶
type FundAccountQuery struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
AliPayUserId string `json:"alipay_user_id"` // 必选 蚂蚁统一会员ID
AccountType string `json:"account_type"` // 特殊可选 查询的账号类型,如查询托管账户值为TRUSTEESHIP_ACCOUNT,查询余额账户值为ACCTRANS_ACCOUNT。查询余额账户时必填。
}
FundAccountQuery 支付宝资金账户资产查询接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.account.query
func (FundAccountQuery) APIName ¶
func (f FundAccountQuery) APIName() string
func (FundAccountQuery) Params ¶
func (f FundAccountQuery) Params() map[string]string
type FundAccountQueryRsp ¶
type FundAccountQueryRsp struct {
Error
AvailableAmount string `json:"available_amount"`
FreezeAmount string `json:"freeze_amount"`
}
FundAccountQueryRsp 支付宝资金账户资产查询接口响应参数
type FundAuthOperationCancel ¶
type FundAuthOperationCancel struct {
AuxParam
NotifyURL string `json:"-"`
AppAuthToken string `json:"-"` // 可选
AuthNo string `json:"auth_no,omitempty"` // 特殊可选, 支付宝授权资金订单号,与商户的授权资金订单号不能同时为空,二者都存在时,以支付宝资金授权订单号为准,该参数与支付宝授权资金操作流水号配对使用。
OutOrderNo string `json:"out_order_no,omitempty"` // 特殊可选, 商户的授权资金订单号,与支付宝的授权资金订单号不能同时为空,二者都存在时,以支付宝的授权资金订单号为准,该参数与商户的授权资金操作流水号配对使用。
OperationId string `json:"operation_id,omitempty"` // 特殊可选, 支付宝的授权资金操作流水号,与商户的授权资金操作流水号不能同时为空,二者都存在时,以支付宝的授权资金操作流水号为准,该参数与支付宝授权资金订单号配对使用。
OutRequestNo string `json:"out_request_no,omitempty"` // 特殊可选, 商户的授权资金操作流水号,与支付宝的授权资金操作流水号不能同时为空,二者都存在时,以支付宝的授权资金操作流水号为准,该参数与商户的授权资金订单号配对使用。
Remark string `json:"remark"` // 必选, 商户对本次撤销操作的附言描述,长度不超过100个字母或50个汉字
}
FundAuthOperationCancel 资金授权撤销接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.auth.operation.cancel/
func (FundAuthOperationCancel) APIName ¶
func (f FundAuthOperationCancel) APIName() string
func (FundAuthOperationCancel) Params ¶
func (f FundAuthOperationCancel) Params() map[string]string
type FundAuthOperationCancelRsp ¶
type FundAuthOperationCancelRsp struct {
Error
AuthNo string `json:"auth_no"`
OutOrderNo string `json:"out_order_no"`
OperationId string `json:"operation_id"`
OutRequestNo string `json:"out_request_no"`
Action string `json:"action"`
}
FundAuthOperationCancelRsp 资金授权撤销接口响应参数
type FundAuthOperationDetailQuery ¶
type FundAuthOperationDetailQuery struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
AuthNo string `json:"auth_no"` // 特殊可选, 支付宝授权资金订单号,与商户的授权资金订单号不能同时为空,二者都存在时,以支付宝资金授权订单号为准,该参数与支付宝授权资金操作流水号配对使用。
OutOrderNo string `json:"out_order_no"` // 特殊可选, 商户的授权资金订单号,与支付宝的授权资金订单号不能同时为空,二者都存在时,以支付宝的授权资金订单号为准,该参数与商户的授权资金操作流水号配对使用。
OperationId string `json:"operation_id"` // 特殊可选, 支付宝的授权资金操作流水号,与商户的授权资金操作流水号不能同时为空,二者都存在时,以支付宝的授权资金操作流水号为准,该参数与支付宝授权资金订单号配对使用。
OutRequestNo string `json:"out_request_no"` // 特殊可选, 商户的授权资金操作流水号,与支付宝的授权资金操作流水号不能同时为空,二者都存在时,以支付宝的授权资金操作流水号为准,该参数与商户的授权资金订单号配对使用。
}
FundAuthOperationDetailQuery 资金授权操作查询接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.auth.operation.detail.query/
func (FundAuthOperationDetailQuery) APIName ¶
func (f FundAuthOperationDetailQuery) APIName() string
func (FundAuthOperationDetailQuery) Params ¶
func (f FundAuthOperationDetailQuery) Params() map[string]string
type FundAuthOperationDetailQueryRsp ¶
type FundAuthOperationDetailQueryRsp struct {
Error
AuthNo string `json:"auth_no"`
OutOrderNo string `json:"out_order_no"`
OrderStatus OrderStatus `json:"order_status"`
TotalFreezeAmount string `json:"total_freeze_amount"`
RestAmount string `json:"rest_amount"`
TotalPayAmount string `json:"total_pay_amount"`
OrderTitle string `json:"order_title"`
PayerLogonId string `json:"payer_logon_id"`
PayerUserId string `json:"payer_user_id"`
ExtraParam string `json:"extra_param"`
OperationId string `json:"operation_id"`
OutRequestNo string `json:"out_request_no"`
Amount string `json:"amount"`
OperationType string `json:"operation_type"`
Status string `json:"status"`
Remark string `json:"remark"`
GMTCreate string `json:"gmt_create"`
GMTTrans string `json:"gmt_trans"`
PreAuthType string `json:"pre_auth_type"`
TransCurrency string `json:"trans_currency"`
TotalFreezeCreditAmount string `json:"total_freeze_credit_amount"`
TotalFreezeFundAmount string `json:"total_freeze_fund_amount"`
TotalPayCreditAmount string `json:"total_pay_credit_amount"`
TotalPayFundAmount string `json:"total_pay_fund_amount"`
RestCreditAmount string `json:"rest_credit_amount"`
RestFundAmount string `json:"rest_fund_amount"`
CreditAmount string `json:"credit_amount"`
FundAmount string `json:"fund_amount"`
}
FundAuthOperationDetailQueryRsp 资金授权操作查询接口响应参数
type FundAuthOrderAppFreeze ¶
type FundAuthOrderAppFreeze struct {
AuxParam
NotifyURL string `json:"-"`
AppAuthToken string `json:"-"` // 可选
OutOrderNo string `json:"out_order_no"` // 必选, 商户授权资金订单号 ,不能包含除中文、英文、数字以外的字符,创建后不能修改,需要保证在商户端不重复。
OutRequestNo string `json:"out_request_no"` // 必选, 商户本次资金操作的请求流水号,用于标示请求流水的唯一性,不能包含除中文、英文、数字以外的字符,需要保证在商户端不重复。
OrderTitle string `json:"order_title"` // 必选, 业务订单的简单描述,如商品名称等 长度不超过100个字母或50个汉字
Amount string `json:"amount"` // 必选, 需要冻结的金额,单位为:元(人民币),精确到小数点后两位 取值范围:[0.01,100000000.00]
ProductCode string `json:"product_code"` // 必选, 销售产品码,新接入线上预授权的业务,本字段取值固定为PRE_AUTH_ONLINE 。
PayeeLogonId string `json:"payee_logon_id,omitempty"` // 收款方支付宝账号(Email或手机号),如果收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)同时传递,则以用户号(payee_user_id)为准,如果商户有勾选花呗渠道,收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)不能同时为空。
PayeeUserId string `json:"payee_user_id,omitempty"` // 收款方的支付宝唯一用户号,以2088开头的16位纯数字组成,如果非空则会在支付时校验交易的的收款方与此是否一致,如果商户有勾选花呗渠道,收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)不能同时为空。
PayTimeout string `json:"pay_timeout,omitempty"` // 该笔订单允许的最晚付款时间,逾期将关闭该笔订单 取值范围:1m~15d。m-分钟,h-小时,d-天。 该参数数值不接受小数点, 如 1.5h,可转换为90m 如果为空,默认15m
ExtraParam string `json:"extra_param,omitempty"` // 业务扩展参数,用于商户的特定业务信息的传递,json格式。 1.授权业务对应的类目,key为category,value由支付宝分配,比如充电桩业务传 "CHARGE_PILE_CAR"; 2. 外部商户的门店编号,key为outStoreCode,可选; 3. 外部商户的门店简称,key为outStoreAlias,可选。
EnablePayChannels string `json:"enable_pay_channels,omitempty"` // 商户可用该参数指定用户可使用的支付渠道,本期支持商户可支持三种支付渠道,余额宝(MONEY_FUND)、花呗(PCREDIT_PAY)以及芝麻信用(CREDITZHIMA)。商户可设置一种支付渠道,也可设置多种支付渠道。
}
FundAuthOrderAppFreeze 线上资金授权冻结接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.auth.order.app.freeze
func (FundAuthOrderAppFreeze) APIName ¶
func (f FundAuthOrderAppFreeze) APIName() string
func (FundAuthOrderAppFreeze) Params ¶
func (f FundAuthOrderAppFreeze) Params() map[string]string
type FundAuthOrderAppFreezeRsp ¶
type FundAuthOrderAppFreezeRsp struct {
Error
AuthNo string `json:"auth_no"`
OutOrderNo string `json:"out_order_no"`
OperationId string `json:"operation_id"`
OutRequestNo string `json:"out_request_no"`
Amount string `json:"amount"`
Status string `json:"status"`
PayerUserId string `json:"payer_user_id"`
GMTTrans string `json:"gmt_trans"`
PreAuthType string `json:"pre_auth_type"`
CreditAmount string `json:"credit_amount"`
FundAmount string `json:"fund_amount"`
}
FundAuthOrderAppFreezeRsp 线上资金授权冻结接口响应参数
type FundAuthOrderFreeze ¶
type FundAuthOrderFreeze struct {
AuxParam
NotifyURL string `json:"-"`
AppAuthToken string `json:"-"` // 可选
AuthCode string `json:"auth_code"` // 必选, 支付授权码,25~30开头的长度为16~24位的数字,实际字符串长度以开发者获取的付款码长度为准
AuthCodeType string `json:"auth_code_type"` // 必选, 授权码类型 目前仅支持"bar_code"
OutOrderNo string `json:"out_order_no"` // 必选, 商户授权资金订单号 ,不能包含除中文、英文、数字以外的字符,创建后不能修改,需要保证在商户端不重复。
OutRequestNo string `json:"out_request_no"` // 必选, 商户本次资金操作的请求流水号,用于标示请求流水的唯一性,不能包含除中文、英文、数字以外的字符,需要保证在商户端不重复。
OrderTitle string `json:"order_title"` // 必选, 业务订单的简单描述,如商品名称等 长度不超过100个字母或50个汉字
Amount string `json:"amount"` // 必选, 需要冻结的金额,单位为:元(人民币),精确到小数点后两位 取值范围:[0.01,100000000.00]
PayeeLogonId string `json:"payee_logon_id,omitempty"` // 可选, 收款方支付宝账号(Email或手机号),如果收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)同时传递,则以用户号(payee_user_id)为准,如果商户有勾选花呗渠道,收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)不能同时为空。
PayeeUserId string `json:"payee_user_id,omitempty"` // 可选, 收款方的支付宝唯一用户号,以2088开头的16位纯数字组成,如果非空则会在支付时校验交易的的收款方与此是否一致,如果商户有勾选花呗渠道,收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)不能同时为空。
PayTimeout string `json:"pay_timeout,omitempty"` // 可选, 该笔订单允许的最晚付款时间,逾期将关闭该笔订单 取值范围:1m~15d。m-分钟,h-小时,d-天。 该参数数值不接受小数点, 如 1.5h,可转换为90m 如果为空,默认15m
ExtraParam string `json:"extra_param,omitempty"` // 可选, 业务扩展参数,用于商户的特定业务信息的传递,json格式。 1.授权业务对应的类目,key为category,value由支付宝分配,比如充电桩业务传 "CHARGE_PILE_CAR"; 2. 外部商户的门店编号,key为outStoreCode,可选; 3. 外部商户的门店简称,key为outStoreAlias,可选。
ProductCode string `json:"product_code,omitempty"` // 可选, 销售产品码,后续新接入预授权当面付的业务,本字段取值固定为PRE_AUTH。
}
FundAuthOrderFreeze 资金授权冻结接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.auth.order.freeze/
func (FundAuthOrderFreeze) APIName ¶
func (f FundAuthOrderFreeze) APIName() string
func (FundAuthOrderFreeze) Params ¶
func (f FundAuthOrderFreeze) Params() map[string]string
type FundAuthOrderFreezeRsp ¶
type FundAuthOrderFreezeRsp struct {
Error
AuthNo string `json:"auth_no"`
OutOrderNo string `json:"out_order_no"`
OperationId string `json:"operation_id"`
OutRequestNo string `json:"out_request_no"`
Amount string `json:"amount"`
Status string `json:"status"`
PayerUserId string `json:"payer_user_id"`
GMTTrans string `json:"gmt_trans"`
}
FundAuthOrderFreezeRsp 资金授权冻结接口响应参数
type FundAuthOrderUnfreeze ¶
type FundAuthOrderUnfreeze struct {
AuxParam
NotifyURL string `json:"-"`
AuthNo string `json:"auth_no"` // 必选,支付宝资金授权订单号,支付宝冻结时返回的交易号,数字格式 2016101210002001810258115912
AppAuthToken string `json:"-"` // 可选
OutRequestNo string `json:"out_request_no"` // 必选, 商户本次资金操作的请求流水号,用于标示请求流水的唯一性,不能包含除中文、英文、数字以外的字符,需要保证在商户端不重复。
Amount string `json:"amount"` // 必选, 本次操作解冻的金额,单位为:元(人民币),精确到小数点后两位,取值范围:[0.01,100000000.00]
Remark string `json:"remark"` // 必选, 商户对本次解冻操作的附言描述,长度不超过100个字母或50个汉字
ExtraParam string `json:"extra_param,omitempty"` // 可选, 解冻扩展信息,json格式;unfreezeBizInfo 目前为芝麻消费字段,支持Key值如下: "bizComplete":"true" -- 选填:标识本次解冻用户是否履约,如果true信用单会完结为COMPLETE
}
FundAuthOrderUnfreeze 资金授权解冻接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.auth.order.unfreeze/
func (FundAuthOrderUnfreeze) APIName ¶
func (f FundAuthOrderUnfreeze) APIName() string
func (FundAuthOrderUnfreeze) Params ¶
func (f FundAuthOrderUnfreeze) Params() map[string]string
type FundAuthOrderUnfreezeRsp ¶
type FundAuthOrderUnfreezeRsp struct {
Error
AuthNo string `json:"auth_no"`
OutOrderNo string `json:"out_order_no"`
OperationId string `json:"operation_id"`
OutRequestNo string `json:"out_request_no"`
Amount string `json:"amount"`
Status string `json:"status"`
GMTTrans string `json:"gmt_trans"`
CreditAmount string `json:"credit_amount"`
FundAmount string `json:"fund_amount"`
}
FundAuthOrderUnfreezeRsp 资金授权解冻接口响应参数
type FundAuthOrderVoucherCreate ¶
type FundAuthOrderVoucherCreate struct {
AuxParam
NotifyURL string `json:"-"`
AppAuthToken string `json:"-"` // 可选
OutOrderNo string `json:"out_order_no"` // 必选, 商户授权资金订单号,创建后不能修改,需要保证在商户端不重复。
OutRequestNo string `json:"out_request_no"` // 必选, 商户本次资金操作的请求流水号,用于标示请求流水的唯一性,需要保证在商户端不重复。
ProductCode string `json:"product_code,omitempty"` // 必选, 销售产品码,后续新接入预授权当面付的业务,本字段取值固定为PRE_AUTH。
OrderTitle string `json:"order_title"` // 必选, 业务订单的简单描述,如商品名称等 长度不超过100个字母或50个汉字
Amount string `json:"amount"` // 必选, 需要冻结的金额,单位为:元(人民币),精确到小数点后两位 取值范围:[0.01,100000000.00]
PayeeUserId string `json:"payee_user_id,omitempty"` // 可选, 收款方的支付宝唯一用户号,以2088开头的16位纯数字组成,如果非空则会在支付时校验交易的的收款方与此是否一致,如果商户有勾选花呗渠道,收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)不能同时为空。
PayeeLogonId string `json:"payee_logon_id,omitempty"` // 可选, 收款方支付宝账号(Email或手机号),如果收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)同时传递,则以用户号(payee_user_id)为准,如果商户有勾选花呗渠道,收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)不能同时为空。
PayTimeout string `json:"pay_timeout,omitempty"` // 可选, 该笔订单允许的最晚付款时间,逾期将关闭该笔订单 取值范围:1m~15d。m-分钟,h-小时,d-天。 该参数数值不接受小数点, 如 1.5h,可转换为90m 如果为空,默认15m
ExtraParam string `json:"extra_param,omitempty"` // 可选, 业务扩展参数,用于商户的特定业务信息的传递,json格式。 1.授权业务对应的类目,key为category,value由支付宝分配,比如充电桩业务传 "CHARGE_PILE_CAR"; 2. 外部商户的门店编号,key为outStoreCode,可选; 3. 外部商户的门店简称,key为outStoreAlias,可选。
TransCurrency string `json:"trans_currency,omitempty"` // 可选, 标价币种, amount 对应的币种单位。支持澳元:AUD, 新西兰元:NZD, 台币:TWD, 美元:USD, 欧元:EUR, 英镑:GBP
SettleCurrency string `json:"settle_currency,omitempty"` // 可选, 商户指定的结算币种。支持澳元:AUD, 新西兰元:NZD, 台币:TWD, 美元:USD, 欧元:EUR, 英镑:GBP
EnablePayChannels string `json:"enable_pay_channels,omitempty"` // 可选, 商户可用该参数指定用户可使用的支付渠道,本期支持商户可支持三种支付渠道,余额宝(MONEY_FUND)、花呗(PCREDIT_PAY)以及芝麻信用(CREDITZHIMA)。商户可设置一种支付渠道,也可设置多种支付渠道。
}
FundAuthOrderVoucherCreate 资金授权发码接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.auth.order.voucher.create/
func (FundAuthOrderVoucherCreate) APIName ¶
func (f FundAuthOrderVoucherCreate) APIName() string
func (FundAuthOrderVoucherCreate) Params ¶
func (f FundAuthOrderVoucherCreate) Params() map[string]string
type FundAuthOrderVoucherCreateRsp ¶
type FundAuthOrderVoucherCreateRsp struct {
Error
OutOrderNo string `json:"out_order_no"`
OutRequestNo string `json:"out_request_no"`
CodeType string `json:"code_type"`
CodeValue string `json:"code_value"`
CodeURL string `json:"code_url"`
}
FundAuthOrderVoucherCreateRsp 资金授权发码接口响应参数
type FundTransAppPay ¶
type FundTransAppPay struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutBizNo string `json:"out_biz_no"` // 必选 商户端的唯一订单号,对于同一笔转账请求,商户需保证该订单号唯一。
TransAmount string `json:"trans_amount"` // 必选 订单总金额,单位为元,精确到小数点后两位,取值范围[0.01,9999999999999.99]
OrderId string `json:"order_id"` // 可选 支付宝订单号
ProductCode string `json:"product_code"` // 必选 销售产品码,商家和支付宝签约的产品码。 STD_RED_PACKET:现金红包
BizScene string `json:"biz_scene"` // 必选 描述特定的业务场景,可传值如下: PERSONAL_PAY: 发红包
Remark string `json:"remark"` // 可选 支付备注
OrderTitle string `json:"order_title"` // 可选 支付订单的标题,用于在收银台和消费记录展示
TimeExpire string `json:"time_expire"` // 可选 绝对超时时间,格式为yyyy-MM-dd HH:mm
RefundTimeExpire string `json:"refund_time_expire"` // 可选 退款超时时间,格式yyyy-MM-dd HH:mm。到指定时间后,系统会自动触发退款,并原路退回到付款账户。如果指定了退款时间,必须早于销售方案里设置的最晚退款时间。
BusinessParams string `json:"business_params"` // 可选 JSON格式,传递业务扩展参数. 业务扩展字段,JSON格式。支持如下属性: sub_biz_scene 子场景,必填,传REDPACKET payer_binded_alipay_uid 创建红包的商户会员绑定的支付宝userId,必填
}
FundTransAppPay https://opendocs.alipay.com/open/03rbyf https://opendocs.alipay.com/open/03rbyf
func (FundTransAppPay) APIName ¶
func (f FundTransAppPay) APIName() string
func (FundTransAppPay) Params ¶
func (f FundTransAppPay) Params() map[string]string
type FundTransCommonQuery ¶
type FundTransCommonQuery struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
ProductCode string `json:"product_code"` // 必选 业务产品码, 收发现金红包固定为:STD_RED_PACKET; 单笔无密转账到支付宝账户固定为:TRANS_ACCOUNT_NO_PWD; 单笔无密转账到银行卡固定为:TRANS_BANKCARD_NO_PWD
BizScene string `json:"biz_scene"` // 必选 描述特定的业务场景,可传的参数如下: PERSONAL_COLLECTION:C2C现金红包-领红包; DIRECT_TRANSFER:B2C现金红包、单笔无密转账到支付宝/银行卡
OutBizNo string `json:"out_biz_no"` // 可选 商户端的唯一订单号,对于同一笔转账请求,商户需保证该订单号唯一。
OrderId string `json:"order_id"` // 可选 支付宝转账单据号
PayFundOrderId string `json:"pay_fund_order_id"` // 可选 支付宝支付资金流水号
}
FundTransCommonQuery 转账业务单据查询接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.trans.common.query/
func (FundTransCommonQuery) APIName ¶
func (f FundTransCommonQuery) APIName() string
func (FundTransCommonQuery) Params ¶
func (f FundTransCommonQuery) Params() map[string]string
type FundTransCommonQueryRsp ¶
type FundTransCommonQueryRsp struct {
Error
OrderId string `json:"order_id"` // 支付宝转账订单号
PayFundOrderId string `json:"pay_fund_order_id"` // 支付宝支付资金流水号
OutBizNo string `json:"out_biz_no"` // 用户订单号
TransAmount string `json:"trans_amount"` // 付款金额
Status string `json:"status"` // 转账单据状态。 SUCCESS:成功(对转账到银行卡的单据, 该状态可能变为退票[REFUND]状态); FAIL:失败(具体失败原因请参见error_code以及fail_reason返回值); DEALING:处理中; REFUND:退票;
PayDate string `json:"pay_date"` // 支付时间
ArrivalTimeEnd string `json:"arrival_time_end"` // 预计到账时间
OrderFee string `json:"order_fee"` // 预计收费金额
ErrorCode string `json:"error_code"` // 查询到的订单状态为FAIL失败或REFUND退票时,返回错误代码
FailReason string `json:"fail_reason"` // 查询到的订单状态为FAIL失败或REFUND退票时,返回具体的原因。
DeductBillInfo string `json:"deduct_bill_info"` // 商户查询代扣订单信息时返回其在代扣请求中传入的账单属性
TransferBillInfo string `json:"transfer_bill_info"` // 商户在查询代发订单信息时返回其在代发请求中传入的账单属性。
}
FundTransCommonQueryRsp 转账业务单据查询接口响应参数
type FundTransOrderQuery ¶
type FundTransOrderQuery struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutBizNo string `json:"out_biz_no,omitempty"` // 与 OrderId 二选一
OrderId string `json:"order_id,omitempty"` // 与 OutBizNo 二选一
}
FundTransOrderQuery 查询转账订单接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.trans.order.query/
func (FundTransOrderQuery) APIName ¶
func (f FundTransOrderQuery) APIName() string
func (FundTransOrderQuery) Params ¶
func (f FundTransOrderQuery) Params() map[string]string
type FundTransOrderQueryRsp ¶
type FundTransOrderQueryRsp struct {
Error
OutBizNo string `json:"out_biz_no"` // 发起转账来源方定义的转账单据号。 该参数的赋值均以查询结果中 的 out_biz_no 为准。 如果查询失败,不返回该参数
OrderId string `json:"order_id"` // 支付宝转账单据号,查询失败不返回。
Status string `json:"status"` // 转账单据状态
PayDate string `json:"pay_date"` // 支付时间
ArrivalTimeEnd string `json:"arrival_time_end"` // 预计到账时间,转账到银行卡专用
OrderFree string `json:"order_fee"` // 预计收费金额(元),转账到银行卡专用
FailReason string `json:"fail_reason"` // 查询到的订单状态为FAIL失败或REFUND退票时,返回具体的原因。
ErrorCode string `json:"error_code"` // 查询失败时,本参数为错误代 码。 查询成功不返回。 对于退票订单,不返回该参数。
}
FundTransOrderQueryRsp 查询转账订单接口响应参数
type FundTransToAccountTransfer ¶
type FundTransToAccountTransfer struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutBizNo string `json:"out_biz_no"` // 必选 商户转账唯一订单号
PayeeType string `json:"payee_type"` // 必选 收款方账户类型,"ALIPAY_LOGONID":支付宝帐号
PayeeAccount string `json:"payee_account"` // 必选 收款方账户。与payee_type配合使用
Amount string `json:"amount"` // 必选 转账金额,元
PayerShowName string `json:"payer_show_name"` // 可选 付款方显示姓名
PayeeRealName string `json:"payee_real_name"` // 可选 收款方真实姓名,如果本参数不为空,则会校验该账户在支付宝登记的实名是否与收款方真实姓名一致。
Remark string `json:"remark"` // 可选 转账备注,金额大于50000时必填
}
FundTransToAccountTransfer 单笔转账到支付宝账户接口请求参数 https://opendocs.alipay.com/apis/api_33/alipay.fund.trans.toaccount.transfer
func (FundTransToAccountTransfer) APIName ¶
func (f FundTransToAccountTransfer) APIName() string
func (FundTransToAccountTransfer) Params ¶
func (f FundTransToAccountTransfer) Params() map[string]string
type FundTransToAccountTransferRsp ¶
type FundTransToAccountTransferRsp struct {
Error
OutBizNo string `json:"out_biz_no"` // 商户转账唯一订单号:发起转账来源方定义的转账单据号。请求时对应的参数,原样返回
OrderId string `json:"order_id"` // 支付宝转账单据号,成功一定返回,失败可能不返回也可能返回
PayDate string `json:"pay_date"` // 支付时间:格式为yyyy-MM-dd HH:mm:ss,仅转账成功返回
}
FundTransToAccountTransferRsp 单笔转账到支付宝账户接口响应参数
type FundTransUniTransfer ¶
type FundTransUniTransfer struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutBizNo string `json:"out_biz_no"` // 必选 商户端的唯一订单号,对于同一笔转账请求,商户需保证该订单号唯一。
TransAmount string `json:"trans_amount"` // 必选 订单总金额,单位为元,精确到小数点后两位,STD_RED_PACKET 产品取值范围[0.01,100000000]; TRANS_ACCOUNT_NO_PWD产品取值范围[0.1,100000000]
ProductCode string `json:"product_code"` // 必选 业务产品码, 收发现金红包固定为:STD_RED_PACKET; 单笔无密转账到支付宝账户固定为:TRANS_ACCOUNT_NO_PWD; 单笔无密转账到银行卡固定为:TRANS_BANKCARD_NO_PWD
BizScene string `json:"biz_scene"` // 可选 描述特定的业务场景,可传的参数如下: PERSONAL_COLLECTION:C2C现金红包-领红包; DIRECT_TRANSFER:B2C现金红包、单笔无密转账到支付宝/银行卡
OrderTitle string `json:"order_title"` // 可选 转账业务的标题,用于在支付宝用户的账单里显示
OriginalOrderId string `json:"original_order_id"` // 可选 原支付宝业务单号。C2C现金红包-红包领取时,传红包支付时返回的支付宝单号;B2C现金红包、单笔无密转账到支付宝/银行卡不需要该参数。
PayeeInfo *PayeeInfo `json:"payee_info"` // 必选 收款方信息
Remark string `json:"remark"` // 可选 业务备注
BusinessParams string `json:"business_params"` // 可选 转账业务请求的扩展参数,支持传入的扩展参数如下: 1、sub_biz_scene 子业务场景,红包业务必传,取值REDPACKET,C2C现金红包、B2C现金红包均需传入; 2、withdraw_timeliness为转账到银行卡的预期到账时间,可选(不传入则默认为T1),取值T0表示预期T+0到账,取值T1表示预期T+1到账,因到账时效受银行机构处理影响,支付宝无法保证一定是T0或者T1到账;
}
FundTransUniTransfer 单笔转账接口请求参数 https://docs.open.alipay.com/api_28/alipay.fund.trans.uni.transfer/
func (FundTransUniTransfer) APIName ¶
func (f FundTransUniTransfer) APIName() string
func (FundTransUniTransfer) Params ¶
func (f FundTransUniTransfer) Params() map[string]string
type FundTransUniTransferRsp ¶
type FundTransUniTransferRsp struct {
Error
OutBizNo string `json:"out_biz_no"` // 用户订单号
OrderId string `json:"order_id"` // 支付宝转账订单号
PayFundOrderId string `json:"pay_fund_order_id"` // 支付宝支付资金流水号
Status string `json:"status"` // 转账单据状态。 SUCCESS:成功(对转账到银行卡的单据, 该状态可能变为退票[REFUND]状态); FAIL:失败(具体失败原因请参见error_code以及fail_reason返回值); DEALING:处理中; REFUND:退票;
TransDate string `json:"trans_date"` // 订单支付时间,格式为yyyy-MM-dd HH:mm:ss
}
FundTransUniTransferRsp 单笔转账接口响应参数
type GoodsDetail ¶
type GoodsDetail struct {
GoodsId string `json:"goods_id"`
AliPayGoodsId string `json:"alipay_goods_id,omitempty"`
GoodsName string `json:"goods_name"`
Quantity int `json:"quantity"`
Price float64 `json:"price"`
GoodsCategory string `json:"goods_category,omitempty"`
CategoriesTree string `json:"categories_tree,omitempty"`
Body string `json:"body,omitempty"`
ShowURL string `json:"show_url,omitempty"`
}
type GoodsDetailItem ¶
type GoodsDetailItem struct {
GoodsId string `json:"goods_id"`
AliPayGoodsId string `json:"alipay_goods_id"`
GoodsName string `json:"goods_name"`
Quantity int `json:"quantity"`
Price string `json:"price"`
GoodsCategory string `json:"goods_category"`
Body string `json:"body"`
ShowUrl string `json:"show_url"`
}
type HBFQPayInfo ¶
type HBFQPayInfo struct {
UserInstallNum string `json:"user_install_num"` // 用户使用花呗分期支付的分期数
}
type IdentityParam ¶
type IdentityParams ¶
type ItemInstallmentInfoDTO ¶
type ItemInstallmentInfoDTO struct {
PeriodNum int `json:"period_num"` // 总分期数,必选
PeriodMaxPrice *string `json:"period_max_price,omitempty"` // 每期最大金额,可选
PeriodPrice *string `json:"period_price,omitempty"` // 每期金额,可选
}
ItemInstallmentInfoDTO 定义商品分期信息的结构体
type LogisticsInfoDTO ¶
type LogisticsInfoDTO struct {
DeliveryType string `json:"delivery_type,omitempty"` // 物流类型,可选
DeliveryTime time.Time `json:"delivery_time,omitempty"` // 配送时间,可选
}
LogisticsInfoDTO 定义物流信息的结构体
type MerchantConfig ¶
type MerchantConfig struct {
ReturnURL string `json:"return_url"`
}
type MiniGoodsDetailInfoDTO ¶
type MiniGoodsDetailInfoDTO struct {
GoodsName string `json:"goods_name"` // 商品名称,必选
ItemCnt string `json:"item_cnt"` // 商品数量,必选
SalePrice string `json:"sale_price"` // 商品单价,必选
GoodsID string `json:"goods_id"` // 商品的编号,必选
OutItemID string `json:"out_item_id"` // 商户商品ID,条件必选
OutSkuID string `json:"out_sku_id"` // 商户商品sku_id,条件必选
SaleRealPrice string `json:"sale_real_price"` // 商品实际单价,条件必选
ItemDiscount string `json:"item_discount"` // 商家商品优惠金额,条件必选
ImageMaterialID string `json:"image_material_id"` // 商家商品素材ID,条件必选
ItemInstallmentInfo *ItemInstallmentInfoDTO `json:"item_installment_info"` // 商品分期信息,条件必选
RentInfo *RentInfoDTO `json:"rent_info,omitempty"` // 租金信息,租赁商品特有,可选
EffectiveDates *EffectiveDatesDTO `json:"effective_dates,omitempty"` // 价格日历,可选
TicketInfo *TicketInfoDTO `json:"ticket_info,omitempty"` // 演出票务信息,可选
ActivityInfo *ActivityInfoDTO `json:"activity_info,omitempty"` // 活动信息,可选
}
MiniGoodsDetailInfoDTO 定义商品详细信息的结构体
type MiniOrderDetailDTO ¶
type MiniOrderDetailDTO struct {
ItemInfos []MiniGoodsDetailInfoDTO `json:"item_infos"` // 商品详细信息,必选
PriceInfo PriceInfoDTO `json:"price_info"` // 价格信息,必选
}
MiniOrderDetailDTO 定义订单详细信息的结构体
type MiniOrderExtInfoDTO ¶
type MiniOrderExtInfoDTO struct {
DoorTime time.Time `json:"door_time,omitempty"` // 预约上门取件时间,可选
OrderStr string `json:"order_str"` // 芝麻租赁授权签名,条件必选
OrderTradeType string `json:"order_trade_type"` // 订单交易类型,条件必选
TradeNo string `json:"trade_no"` // 交易号,条件必选
AdditionRebateBasePrice *string `json:"addition_rebate_base_price,omitempty"` // 订单附加返佣金额基数,可选
DeductSignScene string `json:"deduct_sign_scene,omitempty"` // 代扣协议签约场景,可选
}
MiniOrderExtInfoDTO 定义订单扩展字段的结构体
type MiniReceiverAddressInfoDTO ¶
type MiniReceiverAddressInfoDTO struct {
ReceiverName string `json:"receiver_name"` // 收货人姓名,必选
DetailedAddress string `json:"detailed_address"` // 收货地址信息,必选
TelNumber string `json:"tel_number"` // 收货人手机号,必选
ReceiverZip string `json:"receiver_zip,omitempty"` // 收货邮编地址,可选
ReceiverDivisionCode string `json:"receiver_division_code,omitempty"` // 标准城市域码,可选
}
MiniReceiverAddressInfoDTO 定义订单收货地址的结构体
type MobileNumber ¶
type MobileNumber struct {
Code Code `json:"code"`
Msg string `json:"msg"`
Mobile string `json:"mobile"`
}
MobileNumber 小程序获取会员手机号 https://opendocs.alipay.com/mini/api/getphonenumber
type Notification ¶
type Notification struct {
AuthAppId string `json:"auth_app_id"` // App Id
NotifyTime string `json:"notify_time"` // 通知时间
NotifyType string `json:"notify_type"` // 通知类型
NotifyId string `json:"notify_id"` // 通知校验ID
AppId string `json:"app_id"` // 开发者的app_id
Charset string `json:"charset"` // 编码格式
Version string `json:"version"` // 接口版本
SignType string `json:"sign_type"` // 签名类型
Sign string `json:"sign"` // 签名
TradeNo string `json:"trade_no"` // 支付宝交易号
OutTradeNo string `json:"out_trade_no"` // 商户订单号
OutRequestNo string `json:"out_request_no"` // 退款请求编号
OutBizNo string `json:"out_biz_no"` // 商户业务号
BuyerId string `json:"buyer_id"` // 买家支付宝用户号
BuyerLogonId string `json:"buyer_logon_id"` // 买家支付宝账号
BuyerOpenId string `json:"buyer_open_id"` // 买家支付宝用户唯一标识
SellerId string `json:"seller_id"` // 卖家支付宝用户号
SellerEmail string `json:"seller_email"` // 卖家支付宝账号
TradeStatus TradeStatus `json:"trade_status"` // 交易状态
RefundStatus string `json:"refund_status"` // 退款状态
RefundReason string `json:"refund_reason"` // 退款原因
RefundAmount string `json:"refund_amount"` // 退款金额
TotalAmount string `json:"total_amount"` // 订单金额
ReceiptAmount string `json:"receipt_amount"` // 实收金额
InvoiceAmount string `json:"invoice_amount"` // 开票金额
BuyerPayAmount string `json:"buyer_pay_amount"` // 付款金额
PointAmount string `json:"point_amount"` // 集分宝金额
RefundFee string `json:"refund_fee"` // 总退款金额
Subject string `json:"subject"` // 商品的标题/交易标题/订单标题/订单关键字等,是请求时对应的参数,原样通知回来。
Body string `json:"body"` // 商品描述
GmtCreate string `json:"gmt_create"` // 交易创建时间
GmtPayment string `json:"gmt_payment"` // 交易付款时间
GmtRefund string `json:"gmt_refund"` // 交易退款时间
GmtClose string `json:"gmt_close"` // 交易结束时间
FundBillList string `json:"fund_bill_list"` // 支付金额信息
PassbackParams string `json:"passback_params"` // 回传参数
VoucherDetailList string `json:"voucher_detail_list"` // 优惠券信息
AgreementNo string `json:"agreement_no"` // 支付宝签约号
ExternalAgreementNo string `json:"external_agreement_no"` // 商户自定义签约号
DBackStatus string `json:"dback_status"` // 银行卡冲退状态
DBackAmount string `json:"dback_amount"` // 银行卡冲退金额
BankAckTime string `json:"bank_ack_time"` // 银行响应时间
SendBackFee string `json:"send_back_fee"` // 实际退款金额
}
Notification 通知响应参数 https://doc.open.alipay.com/docs/doc.htm?spm=a219a.7629140.0.0.8AmJwg&treeId=203&articleId=105286&docType=1
type OpenAuthAppAuthInviteCreate ¶
type OpenAuthAppAuthInviteCreate struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
AuthAppId string `json:"auth_app_id"` // 必选 指定授权的商户appid
RedirectURL string `json:"redirect_url"` // 可选 授权回调地址,用于返回应用授权码
State string `json:"state"` // 可选 自定义参数,授权后回调时透传回服务商。对应的值必须为 base64 编码。
}
OpenAuthAppAuthInviteCreate ISV向商户发起应用授权邀约 https://opendocs.alipay.com/isv/06evao?pathHash=f46ecafa
func (OpenAuthAppAuthInviteCreate) APIName ¶
func (o OpenAuthAppAuthInviteCreate) APIName() string
func (OpenAuthAppAuthInviteCreate) Params ¶
func (o OpenAuthAppAuthInviteCreate) Params() map[string]string
type OpenAuthToken ¶
type OpenAuthToken struct {
AppAuthToken string `json:"app_auth_token"` // 授权令牌信息
AppRefreshToken string `json:"app_refresh_token"` // 令牌信息
AuthAppId string `json:"auth_app_id"` // 授权方应用id
ExpiresIn int64 `json:"expires_in"` // 令牌有效期
ReExpiresIn int64 `json:"re_expires_in"` // 有效期
UserId string `json:"user_id"` // 支付宝用户标识
}
type OpenAuthTokenApp ¶
type OpenAuthTokenApp struct {
AuxParam
GrantType string `json:"grant_type"` // 值为 authorization_code 时,代表用code换取;值为refresh_token时,代表用refresh_token换取
Code string `json:"code"`
RefreshToken string `json:"refresh_token"`
}
OpenAuthTokenApp 换取应用授权令牌请求参数 https://docs.open.alipay.com/api_9/alipay.open.auth.token.app
func (OpenAuthTokenApp) APIName ¶
func (o OpenAuthTokenApp) APIName() string
func (OpenAuthTokenApp) Params ¶
func (o OpenAuthTokenApp) Params() map[string]string
type OpenAuthTokenAppQuery ¶
type OpenAuthTokenAppQuery struct {
AuxParam
AppAuthToken string `json:"app_auth_token"` // 必选 应用授权令牌
}
OpenAuthTokenAppQuery 查询某个应用授权AppAuthToken的授权信息 https://opendocs.alipay.com/isv/04hgcp?pathHash=7ea21afe
func (OpenAuthTokenAppQuery) APIName ¶
func (o OpenAuthTokenAppQuery) APIName() string
func (OpenAuthTokenAppQuery) Params ¶
func (o OpenAuthTokenAppQuery) Params() map[string]string
type OpenAuthTokenAppQueryRsp ¶
type OpenAuthTokenAppQueryRsp struct {
Error
UserId string `json:"user_id"`
AuthAppId string `json:"auth_app_id"`
ExpiresIn int64 `json:"expires_in"`
AuthMethods []string `json:"auth_methods"`
AuthStart string `json:"auth_start"`
AuthEnd string `json:"auth_end"`
Status string `json:"status"`
IsByAppAuth bool `json:"is_by_app_auth"`
}
type OpenAuthTokenAppRsp ¶
type OpenAuthTokenAppRsp struct {
Error
Tokens []*OpenAuthToken `json:"tokens"`
}
OpenAuthTokenAppRsp 换取应用授权令牌响应参数 新版返回值 参见 https://opendocs.alipay.com/open/20160728150111277227/intro
type OpenMiniOrderCreate ¶
type OpenMiniOrderCreate struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutOrderID string `json:"out_order_id"` // 商户订单号,必选
Title string `json:"title"` // 订单标题,必选
SourceID string `json:"source_id"` // 追踪ID,必选
MerchantBizType string `json:"merchant_biz_type"` // 订单类型,必选
Path string `json:"path"` // 商家小程序对应的订单详情页路径地址,必选
OrderDetail MiniOrderDetailDTO `json:"order_detail"` // 订单信息,必选
SellerID string `json:"seller_id"` // 商家小程序对应的卖家ID,必选
BuyerID string `json:"buyer_id"` // 用户ID,
BuyerLonginID string `json:"buyer_longin_id"` // 用户登录ID,可选
TimeoutExpress string `json:"timeout_express"` // 订单过期时间,可选
PromoDetailInfo *PromoDetailInfoDTO `json:"promo_detail_info"` // 营销信息,可选
DeliveryDetail *LogisticsInfoDTO `json:"delivery_detail"` // 物流信息,可选
DefaultReceivingAddress *MiniReceiverAddressInfoDTO `json:"default_receiving_address,omitempty"` // 默认退货地址,可选
}
OpenMiniOrderCreate 小程序交易组件创建订单 https://opendocs.alipay.com/mini/54f80876_alipay.open.mini.order.create
func (OpenMiniOrderCreate) APIName ¶
func (t OpenMiniOrderCreate) APIName() string
func (OpenMiniOrderCreate) Params ¶
func (t OpenMiniOrderCreate) Params() map[string]string
type OptionFunc ¶
type OptionFunc func(c *Client)
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) OptionFunc
func WithNewSandboxGateway ¶
func WithNewSandboxGateway() OptionFunc
func WithPastSandboxGateway ¶
func WithPastSandboxGateway() OptionFunc
func WithProductionGateway ¶
func WithProductionGateway(gateway string) OptionFunc
func WithSandboxGateway ¶
func WithSandboxGateway(gateway string) OptionFunc
func WithTimeLocation ¶
func WithTimeLocation(location *time.Location) OptionFunc
type OrderDetail ¶
type OrderDetail struct {
AppId string `json:"app_id"` // 必选 订单明细的应用唯一标识(16位纯数字),指商家的app_id。
OutTradeNo string `json:"out_trade_no"` // 必选 商户订单号,64个字符以内、只能包含字母、数字、下划线;需保证在商户端不重复
SellerId string `json:"seller_id"` // 可选 卖家支付宝用户ID。 如果该值与seller_logon_id同时为空,则卖家默认为app_id对应的支付宝用户ID
SellerLogonId string `json:"seller_logon_id"` // 可选 卖家支付宝logon_id。 支持手机和Email格式,如果该值与seller_id同时传入,将以seller_id为准
ProductCode string `json:"product_code"` // 必选 销售产品码,与支付宝签约的产品码名称
TotalAmount string `json:"total_amount"` // 必选 订单总金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000]
Subject string `json:"subject"` // 必选 订单标题
Body string `json:"body"` // 可选 对交易或商品的描述
ShowURL string `json:"show_url"` // 可选 商品的展示地址
GoodsDetail []*GoodsDetail `json:"goods_detail,omitempty"` // 可选 订单包含的商品列表信息,Json格式,详见商品明细说明
ExtendParams *ExtendParams `json:"extend_params,omitempty"` // 可选 业务扩展参数
SubMerchant *Merchant `json:"sub_merchant,omitempty"` // 可选 二级商户信息,当前只对直付通特定场景下使用此字段
SettleInfo *SettleInfo `json:"settle_info,omitempty"` // 可选 描述结算信息,json格式,详见结算参数说明; 直付通场景下必传
PassbackParams string `json:"passback_params"` // 可选 公用回传参数,如果请求时传递了该参数,则返回给商户时会回传该参数。支付宝只会在同步返回(包括跳转回商户网站)和异步通知时将该参数原样返回。
}
type OrderStatus ¶
type OrderStatus string
const ( OrderStatusInit OrderStatus = "INIT" //(初始状态:已创建未授权) OrderStatusAuthorized OrderStatus = "AUTHORIZED" //(已授权状态:授权成功,可以进行转支付或解冻操作) OrderStatusFinish OrderStatus = "FINISH" //(完成状态:转支付完成且无剩余冻结资金) OrderStatusClosed OrderStatus = "CLOSED" //(关闭状态:授权未完成超时关闭或冻结资金全额解冻) )
type Param ¶
type Param interface {
// APIName 用于提供访问的 method,即接口名称
APIName() string
// Params 公共请求参数
Params() map[string]string
// FileParams 文件参数
FileParams() ngx.FileForm
// NeedEncrypt 该接口是否支持内容加密,有的接口不支持内容加密,比如文件上传接口:alipay.open.file.upload
NeedEncrypt() bool
// NeedVerify 是否对支付宝接口返回的数据进行签名验证, 为了安全建议都需要对签名进行验证,本方法存在是因为部分接口不支持签名验证。
// 比如:应用支付宝公钥证书下载 https://opendocs.alipay.com/common/06ue2z
NeedVerify() bool
}
type PayeeInfo ¶
type PayeeInfo struct {
Identity string `json:"identity"` // 必填 参与方的唯一标识
IdentityType string `json:"identity_type"` // 必填 参与方的标识类型,目前支持如下类型: 1、ALIPAY_USER_ID 支付宝的会员ID 2、ALIPAY_LOGON_ID:支付宝登录号,支持邮箱和手机号格式
Name string `json:"name"` // 可选 参与方真实姓名,如果非空,将校验收款支付宝账号姓名一致性。当identity_type=ALIPAY_LOGON_ID时,本字段必填。
BankcardExtInfo *BankcardExtInfo `json:"bankcard_ext_info,omitempty"` // 收款方银行卡扩展信息 https://opendocs.alipay.com/open/021kx6#2.%20%E5%8D%95%E7%AC%94%E8%BD%AC%E8%B4%A6%E5%88%B0%E9%93%B6%E8%A1%8C%E5%8D%A1
}
type Payload ¶
type Payload struct {
Encrypt bool // 是否进行内容加密
Verify bool // 是否验证签名
// contains filtered or unexported fields
}
func NewPayload ¶
func (*Payload) AddBizField ¶
AddBizField 添加请求参数 biz_content 的字段,这里添加的信息会序列化成 JSON 字符串,然后通过 biz_content 参数传递。
这里添加的参数一般为支付宝接口文档中的【请求参数】,参考:https://opendocs.alipay.com/apis/api_1/alipay.trade.query/#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0。
一般情况下,支付宝接口文档中的【请求参数】都是通过调用本方法添加。但是也有例外,如 https://opendocs.alipay.com/mini/05snwo#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0 中的【请求参数】就需要调用 AddParam 进行添加,因为其【公共请求参数】中没有 biz_content 字段。
func (*Payload) AddFileObject ¶
func (*Payload) AddFilePath ¶
AddFilePath 添加需要上传的文件。
name: 参数名称。
filename: 文件名称。
filepath: 本地文件完整路径。
func (*Payload) AddParam ¶
AddParam 添加公共请求参数。
这里添加的参数一般为支付宝接口文档中的【公共请求参数】,参考:https://opendocs.alipay.com/apis/api_1/alipay.trade.query/#%E5%85%AC%E5%85%B1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0。
一般情况下,不需要调用本方法添加公共请求参数,因为公共参数基本都是必须且其值相对固定,都已处理。除了个别参数,如:app_auth_token。
func (*Payload) FileParams ¶
func (*Payload) MarshalJSON ¶
func (*Payload) NeedEncrypt ¶
func (*Payload) NeedVerify ¶
type PeriodRuleParams ¶
type PeriodRuleParams struct {
PeriodType string `json:"period_type,omitempty"`
Period string `json:"period,omitempty"`
ExecuteTime string `json:"execute_time,omitempty"`
SingleAmount string `json:"single_amount,omitempty"`
TotalAmount string `json:"total_amount,omitempty"`
TotalPayments int `json:"total_payments,omitempty"`
}
type PreOrderResult ¶
type PriceInfoDTO ¶
type PriceInfoDTO struct {
OrderPrice string `json:"order_price"` // 订单总价,必选
Freight string `json:"freight"` // 运费,可选
DiscountedPrice string `json:"discounted_price"` // 商家优惠金额,可选
MerchantValuePrice string `json:"merchant_value_price"` // 商家储值金额,可选
}
PriceInfoDTO 定义价格详细信息的结构体
type ProdParams ¶
type ProdParams struct {
AuthBizParams string `json:"auth_biz_params,omitempty"` // 预授权业务信息
}
type PromoDetailInfoDTO ¶
type PromoDetailInfoDTO struct {
ActivityConsultID string `json:"activity_consult_id,omitempty"` // 优惠活动咨询ID,可选
}
PromoDetailInfoDTO 定义订单优惠信息的结构体
type RefundChargeInfo ¶
type RefundChargeInfo struct {
RefundChargeFee string `json:"refund_charge_fee"` // 实退费用
SwitchFeeRate string `json:"switch_fee_rate"` // 签约费率
ChargeType string `json:"charge_type"` // 收单手续费trade,花呗分期手续hbfq,其他手续费charge
RefundSubFeeDetailList []*RefundSubFeeDetail `json:"refund_sub_fee_detail_list,omitempty"` // 组合支付退费明细
}
type RefundRoyalty ¶
type RefundRoyalty struct {
RefundAmount string `json:"refund_amount"`
RoyaltyType string `json:"royalty_type"`
ResultCode string `json:"result_code"`
TransOut string `json:"trans_out"`
TransOutEmail string `json:"trans_out_email"`
TransIn string `json:"trans_in"`
TransInEmail string `json:"trans_in_email"`
}
type RefundRoyaltyParameter ¶
type RefundRoyaltyParameter struct {
RoyaltyType string `json:"royalty_type,omitempty"` // 可选 分账类型. 普通分账为:transfer;补差为:replenish;为空默认为分账transfer;
TransOut string `json:"trans_out,omitempty"` // 可选 支出方账户。如果支出方账户类型为userId,本参数为支出方的支付宝账号对应的支付宝唯一用户号,以2088开头的纯16位数字;如果支出方类型为loginName,本参数为支出方的支付宝登录号。 泛金融类商户分账时,该字段不要上送。
TransOutType string `json:"trans_out_type,omitempty"` // 可选 支出方账户类型。userId表示是支付宝账号对应的支付宝唯一用户号;loginName表示是支付宝登录号; 泛金融类商户分账时,该字段不要上送。
TransInType string `json:"trans_in_type,omitempty"` // 可选 收入方账户类型。userId表示是支付宝账号对应的支付宝唯一用户号;cardAliasNo表示是卡编号;loginName表示是支付宝登录号;
TransIn string `json:"trans_in"` // 必选 收入方账户。如果收入方账户类型为userId,本参数为收入方的支付宝账号对应的支付宝唯一用户号,以2088开头的纯16位数字;如果收入方类型为cardAliasNo,本参数为收入方在支付宝绑定的卡编号;如果收入方类型为loginName,本参数为收入方的支付宝登录号;
Amount string `json:"amount,omitempty"` // 可选 分账的金额,单位为元
Desc string `json:"desc,omitempty"` // 可选 分账描述
RoyaltyScene string `json:"royalty_scene,omitempty"` // 可选 可选值:达人佣金、平台服务费、技术服务费、其他
TransInName string `json:"trans_in_name,omitempty"` // 可选 分账收款方姓名,上送则进行姓名与支付宝账号的一致性校验,校验不一致则分账失败。不上送则不进行姓名校验
}
type RefundSubFeeDetail ¶
type RentInfoDTO ¶
type RentInfoDTO struct {
InitialRentPrice string `json:"initial_rent_price"` // 首期租金,条件必选
PeriodRealRentPrice string `json:"period_real_rent_price"` // 每期租金,条件必选
PeriodNum int `json:"period_num"` // 期数,条件必选
BuyoutPrice string `json:"buyout_price"` // 买断价,条件必选
AddonPeriodNum string `json:"addon_period_num"` // 续租总期数,条件必选
AddonRealRentPrice string `json:"addon_real_rent_price"` // 续租总金额,条件必选
RentStartTime time.Time `json:"rent_start_time"` // 租期开始时间,条件必选
RentEndTime time.Time `json:"rent_end_time"` // 租期结束时间,条件必选
FinishRealRentPrice *string `json:"finish_real_rent_price,omitempty"` // 尾期租金,可选
DepositPrice *string `json:"deposit_price,omitempty"` // 押金金额,可选
}
RentInfoDTO 定义租金信息的结构体
type RoyaltyDetailInfoItem ¶
type RoyaltyDetailInfoItem struct {
SerialNo string `json:"serial_no"`
TransInType string `json:"trans_in_type"`
BatchNo string `json:"batch_no"`
OutRelationId string `json:"out_relation_id"`
TransOutType string `json:"trans_out_type"`
TransOut string `json:"trans_out"`
TransIn string `json:"trans_in"`
Amount string `json:"amount"`
Desc string `json:"desc"`
AmountPercentage string `json:"amount_percentage"`
AliPayStoreId string `json:"alipay_store_id"`
}
type RoyaltyInfo ¶
type RoyaltyInfo struct {
RoyaltyType string `json:"royalty_type"`
RoyaltyDetailInfo []*RoyaltyDetailInfoItem `json:"royalty_detail_infos,omitempty"`
}
type RoyaltyParameter ¶
type RoyaltyParameter struct {
TransOut string `json:"trans_out"` // 可选 分账支出方账户,类型为userId,本参数为要分账的支付宝账号对应的支付宝唯一用户号。以2088开头的纯16位数字。
TransIn string `json:"trans_in"` // 可选 分账收入方账户,类型为userId,本参数为要分账的支付宝账号对应的支付宝唯一用户号。以2088开头的纯16位数字。
Amount float64 `json:"amount"` // 可选 分账的金额,单位为元
AmountPercentage float64 `json:"amount_percentage,omitempty"` // 可选 分账信息中分账百分比。取值范围为大于0,少于或等于100的整数。
Desc string `json:"desc"` // 可选 分账描述
}
type SettleDetailInfo ¶
type SettleDetailInfo struct {
TransInType string `json:"trans_in_type"` // 必选 结算收款方的账户类型。 cardAliasNo:结算收款方的银行卡编号;userId:表示是支付宝账号对应的支付宝唯一用户号;loginName:表示是支付宝登录号;defaultSettle:表示结算到商户进件时设置的默认结算账号,结算主体为门店时不支持传defaultSettle;
TransIn string `json:"trans_in"` // 必选 结算收款方。当结算收款方类型是cardAliasNo时,本参数为用户在支付宝绑定的卡编号;结算收款方类型是userId时,本参数为用户的支付宝账号对应的支付宝唯一用户号,以2088开头的纯16位数字;当结算收款方类型是loginName时,本参数为用户的支付宝登录号;当结算收款方类型是defaultSettle时,本参数不能传值,保持为空。
SummaryDimension string `json:"summary_dimension"` // 可选 结算汇总维度,按照这个维度汇总成批次结算,由商户指定。 目前需要和结算收款方账户类型为cardAliasNo配合使用
SettleEntityId string `json:"settle_entity_id"` // 可选 结算主体标识。当结算主体类型为SecondMerchant时,为二级商户的SecondMerchantID;当结算主体类型为Store时,为门店的外标。
SettleEntityType string `json:"settle_entity_type"` // 可选 结算主体类型。 二级商户:SecondMerchant;商户或者直连商户门店:Store
Amount string `json:"amount"` // 可选 结算的金额,单位为元。在创建订单和支付接口时必须和交易金额相同。在结算确认接口时必须等于交易金额减去已退款金额。
}
type SettleInfo ¶
type SettleInfo struct {
SettleDetailInfos []*SettleDetailInfo `json:"settle_detail_infos"` // 必选 结算详细信息,json数组,目前只支持一条。
SettlePeriodTime string `json:"settle_period_time"` // 可选 该笔订单的超期自动确认结算时间,到达期限后,将自动确认结算。此字段只在签约账期结算模式时有效。取值范围:1d~365d。d-天。 该参数数值不接受小数点。
}
type ShopInfoDTO ¶
type ShopInfoDTO struct {
Name string `json:"name"` // 门店名称,必选
Address string `json:"address"` // 门店地址,必选
MerchantShopID string `json:"merchant_shop_id,omitempty"` // 商家侧门店id,可选
AlipayShopID string `json:"alipay_shop_id,omitempty"` // 蚂蚁侧门店id,可选
}
ShopInfoDTO 定义门店信息的结构体
type SignParams ¶
type SignParams struct {
ProductCode string `json:"product_code"` // 必选 商家和支付宝签约的产品码。 商家扣款产品传入固定值:GENERAL_WITHHOLDING
PersonalProductCode string `json:"personal_product_code"` // 必选 个人签约产品码,商户和支付宝签约时确定。
SignScene string `json:"sign_scene"` // 必选 协议签约场景,商户和支付宝签约时确定,商户可咨询技术支持。
ExternalAgreementNo string `json:"external_agreement_no"` // 可选 商户签约号,代扣协议中标示用户的唯一签约号(确保在商户系统中唯一)。 格式规则:支持大写小写字母和数字,最长32位。 商户系统按需传入,如果同一用户在同一产品码、同一签约场景下,签订了多份代扣协议,那么需要指定并传入该值。
ExternalLogonId string `json:"external_logon_id"` // 可选 用户在商户网站的登录账号,用于在签约页面展示,如果为空,则不展示
AccessParams *AccessParams `json:"access_params"` // 必选 请按当前接入的方式进行填充,且输入值必须为文档中的参数取值范围。
SubMerchant *SubMerchantParams `json:"sub_merchant,omitempty"` // 可选 此参数用于传递子商户信息,无特殊需求时不用关注。目前商户代扣、海外代扣、淘旅行信用住产品支持传入该参数(在销售方案中“是否允许自定义子商户信息”需要选是)。
PeriodRuleParams *PeriodRuleParams `json:"period_rule_params,omitempty"` // 可选 周期管控规则参数period_rule_params,在签约周期扣款产品(如CYCLE_PAY_AUTH_P)时必传,在签约其他产品时无需传入。 周期扣款产品,会按照这里传入的参数提示用户,并对发起扣款的时间、金额、次数等做相应限制。
SignNotifyURL string `json:"sign_notify_url"` // 可选 签约成功后商户用于接收异步通知的地址。如果不传入,签约与支付的异步通知都会发到外层notify_url参数传入的地址;如果外层也未传入,签约与支付的异步通知都会发到商户appid配置的网关地址。
}
type SubFeeDetail ¶
type SubMerchantDTO ¶
type SubMerchantDTO struct {
MerchantID string `json:"merchant_id"` // 二级商户编号,必选
MerchantType string `json:"merchant_type,omitempty"` // 二级商户编号类型,可选
}
SubMerchantDTO 定义二级商户信息的结构体
type SubMerchantItem ¶
type SubMerchantItem struct {
MerchantId string `json:"merchant_id"`
}
type SubMerchantParams ¶
type SubMerchantParams struct {
SubMerchantId string `json:"sub_merchant_id,omitempty"`
SubMerchantName string `json:"sub_merchant_name,omitempty"`
SubMerchantServiceName string `json:"sub_merchant_service_name,omitempty"`
SubMerchantServiceDescription string `json:"sub_merchant_service_description,omitempty"`
}
type SystemOauthToken ¶
type SystemOauthToken struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
GrantType string `json:"-"` // 值为 authorization_code 时,代表用code换取;值为refresh_token时,代表用refresh_token换取
Code string `json:"-"`
RefreshToken string `json:"-"`
}
SystemOauthToken 换取授权访问令牌接口请求参数 https://docs.open.alipay.com/api_9/alipay.system.oauth.token
func (SystemOauthToken) APIName ¶
func (s SystemOauthToken) APIName() string
func (SystemOauthToken) Params ¶
func (s SystemOauthToken) Params() map[string]string
type SystemOauthTokenRsp ¶
type SystemOauthTokenRsp struct {
Error
UserId string `json:"user_id"`
AccessToken string `json:"access_token"`
ExpiresIn int64 `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
ReExpiresIn int64 `json:"re_expires_in"`
AuthStart string `json:"auth_start"`
OpenId string `json:"open_id"`
UnionId string `json:"union_id"`
}
SystemOauthTokenRsp 换取授权访问令牌接口请求参数
func (*SystemOauthTokenRsp) IsFailure ¶
func (s *SystemOauthTokenRsp) IsFailure() bool
func (*SystemOauthTokenRsp) IsSuccess ¶
func (s *SystemOauthTokenRsp) IsSuccess() bool
type TicketInfoDTO ¶
type TicketInfoDTO struct {
TicketID string `json:"ticket_id"` // 票编码ID,必选
TicketType string `json:"ticket_type"` // 票类型,必选
EventID string `json:"event_id"` // 场次ID,必选
EventName string `json:"event_name"` // 场次名称,必选
EventStartTime time.Time `json:"event_start_time"` // 场次开始时间,必选
LocationName string `json:"location_name"` // 演出位置,必选
City string `json:"city"` // 演出城市,必选
TicketLink string `json:"ticket_link"` // 票据链接,可选
EventEndTime time.Time `json:"event_end_time"` // 场次结束时间,可选
PerformanceSeats string `json:"performance_seats"` // 演出座位号,可选
}
TicketInfoDTO 定义演出票务信息的结构体
type Trade ¶
type Trade struct {
AuxParam
NotifyURL string `json:"-"`
ReturnURL string `json:"-"`
AppAuthToken string `json:"-"` // 可选
// biz content,这四个参数是必须的
Subject string `json:"subject"` // 订单标题
OutTradeNo string `json:"out_trade_no"` // 商户订单号,64个字符以内、可包含字母、数字、下划线;需保证在商户端不重复
TotalAmount string `json:"total_amount"` // 订单总金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000]
ProductCode string `json:"product_code"` // 销售产品码,与支付宝签约的产品码名称。 参考官方文档, App 支付时默认值为 QUICK_MSECURITY_PAY
Body string `json:"body,omitempty"` // 订单描述
GoodsDetail []*GoodsDetail `json:"goods_detail,omitempty"` // 可选 订单包含的商品列表信息,Json格式,详见商品明细说明
BusinessParams json.RawMessage `json:"business_params,omitempty"` // 商户传入业务信息,具体值要和支付宝约定,应用于安全,营销等参数直传场景,格式为json格式
DisablePayChannels string `json:"disable_pay_channels,omitempty"` // 禁用渠道,用户不可用指定渠道支付 当有多个渠道时用“,”分隔 注,与enable_pay_channels互斥
EnablePayChannels string `json:"enable_pay_channels,omitempty"` // 可用渠道,用户只能在指定渠道范围内支付 当有多个渠道时用“,”分隔 注,与disable_pay_channels互斥
SpecifiedChannel string `json:"specified_channel,omitempty"` // 指定渠道,目前仅支持传入pcredit 若由于用户原因渠道不可用,用户可选择是否用其他渠道支付。 注:该参数不可与花呗分期参数同时传入
//ExtUserInfo string `json:"ext_user_info,omitempty"` // 外部指定买家
ExtendParams *ExtendParams `json:"extend_params,omitempty"` // 可选 业务扩展参数,详见下面的“业务扩展参数说明”
AgreementSignParams *SignParams `json:"agreement_sign_params,omitempty"` // 签约参数。如果希望在sdk中支付并签约,需要在这里传入签约信息。 周期扣款场景 product_code 为 CYCLE_PAY_AUTH 时必填。
GoodsType string `json:"goods_type,omitempty"` // 商品主类型:0—虚拟类商品,1—实物类商品 注:虚拟类商品不支持使用花呗渠道
InvoiceInfo string `json:"invoice_info,omitempty"` // 开票信息
PassbackParams string `json:"passback_params,omitempty"` // 公用回传参数,如果请求时传递了该参数,则返回给商户时会回传该参数。支付宝会在异步通知时将该参数原样返回。本参数必须进行UrlEncode之后才可以发送给支付宝
PromoParams string `json:"promo_params,omitempty"` // 优惠参数 注:仅与支付宝协商后可用
RoyaltyInfo *RoyaltyInfo `json:"royalty_info,omitempty"` // 描述分账信息,json格式,详见分账参数说明
SellerId string `json:"seller_id,omitempty"` // 收款支付宝用户ID。 如果该值为空,则默认为商户签约账号对应的支付宝用户ID
StoreId string `json:"store_id,omitempty"` // 商户门店编号。该参数用于请求参数中以区分各门店,非必传项。
SettleInfo *SettleInfo `json:"settle_info,omitempty"` // 描述结算信息,json格式,详见结算参数说明
SubMerchant *Merchant `json:"sub_merchant,omitempty"` // 间连受理商户信息体,当前只对特殊银行机构特定场景下使用此字段
TimeoutExpress string `json:"timeout_express,omitempty"` // 该笔订单允许的最晚付款时间,逾期将关闭交易。取值范围:1m~15d。m-分钟,h-小时,d-天,1c-当天(1c-当天的情况下,无论交易何时创建,都在0点关闭)。 该参数数值不接受小数点, 如 1.5h,可转换为 90m。
TimeExpire string `json:"time_expire,omitempty"` // 该笔订单绝对超时时间,格式为yyyy-MM-dd HH:mm:ss
MerchantOrderNo string `json:"merchant_order_no,omitempty"` // 可选 商户的原始订单号
ExtUserInfo *ExtUserInfo `json:"ext_user_info,omitempty"` // 可选 外部指定买家
QueryOptions []string `json:"query_options,omitempty"` // 可选 通知参数选项。 商户通过传递该参数来定制需要异步通知的额外字段,数组格式。包括但不限于:["hyb_amount","enterprise_pay_info"]
}
type TradeAppMergePay ¶
type TradeAppMergePay struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
PreOrderNo string `json:"pre_order_no"` // 必选 预下单号。通过 alipay.trade.merge.precreate(统一收单合并支付预创建接口)返回。
}
TradeAppMergePay App合并支付接口 https://opendocs.alipay.com/open/028py8
func (TradeAppMergePay) APIName ¶
func (t TradeAppMergePay) APIName() string
func (TradeAppMergePay) Params ¶
func (t TradeAppMergePay) Params() map[string]string
type TradeAppPay ¶
type TradeAppPay struct {
Trade
}
TradeAppPay App支付接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.app.pay/
func (TradeAppPay) APIName ¶
func (t TradeAppPay) APIName() string
func (TradeAppPay) NeedEncrypt ¶
func (t TradeAppPay) NeedEncrypt() bool
func (TradeAppPay) Params ¶
func (t TradeAppPay) Params() map[string]string
type TradeCancel ¶
type TradeCancel struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
NotifyURL string `json:"-"` // 可选
OutTradeNo string `json:"out_trade_no"` // 原支付请求的商户订单号,和支付宝交易号不能同时为空
TradeNo string `json:"trade_no"` // 支付宝交易号,和商户订单号不能同时为空
}
TradeCancel 统一收单交易撤销接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.cancel/
func (TradeCancel) APIName ¶
func (t TradeCancel) APIName() string
func (TradeCancel) Params ¶
func (t TradeCancel) Params() map[string]string
type TradeCancelRsp ¶
type TradeCancelRsp struct {
Error
TradeNo string `json:"trade_no"` // 支付宝交易号
OutTradeNo string `json:"out_trade_no"` // 创建交易传入的商户订单号
RetryFlag string `json:"retry_flag"` // 是否需要重试
Action string `json:"action"` // 本次撤销触发的交易动作 close:关闭交易,无退款 refund:产生了退款
}
TradeCancelRsp 统一收单交易撤销接口响应参数
type TradeClose ¶
type TradeClose struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
NotifyURL string `json:"-"` // 可选
OutTradeNo string `json:"out_trade_no,omitempty"` // 与 TradeNo 二选一
TradeNo string `json:"trade_no,omitempty"` // 与 OutTradeNo 二选一
OperatorId string `json:"operator_id,omitempty"` // 可选
}
TradeClose 统一收单交易关闭接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.close/
func (TradeClose) APIName ¶
func (t TradeClose) APIName() string
func (TradeClose) Params ¶
func (t TradeClose) Params() map[string]string
type TradeCloseRsp ¶
type TradeCloseRsp struct {
Error
OutTradeNo string `json:"out_trade_no"`
TradeNo string `json:"trade_no"`
}
TradeCloseRsp 统一收单交易关闭接口响应参数
type TradeCreate ¶
type TradeCreate struct {
Trade
DiscountableAmount string `json:"discountable_amount"` // 可打折金额. 参与优惠计算的金额,单位为元,精确到小数点后两位
BuyerId string `json:"buyer_id"` // 买家支付宝用户ID。 2088开头的16位纯数字,小程序场景下获取用户ID请参考:用户授权; 其它场景下获取用户ID请参考:网页授权获取用户信息; 注:交易的买家与卖家不能相同。
BuyerOpenId string `json:"buyer_open_id"` // 新版接口无法获取user_id, 这里只能传递openid值
OpAppId string `json:"op_app_id,omitempty"` // 小程序支付中,商户实际经营主体的小程序应用的appid, 注意事项:商户需要先在产品管理中心绑定该小程序appid,否则下单会失败
OpBuyerOpenId string `json:"op_buyer_open_id,omitempty"` // 当传入的 op_app_id 与发起调用的 APPID 不一致时使用,传 op_buyer_open_id 替换 buyer_open_id
GoodsDetail []*GoodsDetailItem `json:"goods_detail,omitempty"`
OperatorId string `json:"operator_id"`
TerminalId string `json:"terminal_id"`
}
TradeCreate 统一收单交易创建接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.create/
func (TradeCreate) APIName ¶
func (t TradeCreate) APIName() string
func (TradeCreate) Params ¶
func (t TradeCreate) Params() map[string]string
type TradeCreateRsp ¶
type TradeCreateRsp struct {
Error
TradeNo string `json:"trade_no"` // 支付宝交易号
OutTradeNo string `json:"out_trade_no"`
}
TradeCreateRsp 统一收单交易创建接口响应参数
type TradeFastPayRefundQuery ¶
type TradeFastPayRefundQuery struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutTradeNo string `json:"out_trade_no,omitempty"` // 与 TradeNo 二选一
TradeNo string `json:"trade_no,omitempty"` // 与 OutTradeNo 二选一
OutRequestNo string `json:"out_request_no"` // 必须 请求退款接口时,传入的退款请求号,如果在退款请求时未传入,则该值为创建交易时的外部交易号
QueryOptions []string `json:"query_options,omitempty"` // 可选 查询选项,商户通过上送该参数来定制同步需要额外返回的信息字段,数组格式。 refund_detail_item_list
}
TradeFastPayRefundQuery 统一收单交易退款查询接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.fastpay.refund.query
func (TradeFastPayRefundQuery) APIName ¶
func (t TradeFastPayRefundQuery) APIName() string
func (TradeFastPayRefundQuery) Params ¶
func (t TradeFastPayRefundQuery) Params() map[string]string
type TradeFastPayRefundQueryRsp ¶
type TradeFastPayRefundQueryRsp struct {
Error
TradeNo string `json:"trade_no"` // 支付宝交易号
OutTradeNo string `json:"out_trade_no"` // 创建交易传入的商户订单号
OutRequestNo string `json:"out_request_no"` // 本笔退款对应的退款请求号
TotalAmount string `json:"total_amount"` // 发该笔退款所对应的交易的订单金额
RefundAmount string `json:"refund_amount"` // 本次退款请求,对应的退款金额
RefundStatus string `json:"refund_status"` // 退款状态。枚举值: REFUND_SUCCESS 退款处理成功; 未返回该字段表示退款请求未收到或者退款失败;
RefundRoyaltys []*RefundRoyalty `json:"refund_royaltys"` // 退分账明细信息
GMTRefundPay string `json:"gmt_refund_pay"` // 退款时间。
RefundDetailItemList []*TradeFundBill `json:"refund_detail_item_list"` // 本次退款使用的资金渠道; 默认不返回该信息,需要在入参的query_options中指定"refund_detail_item_list"值时才返回该字段信息。
SendBackFee string `json:"send_back_fee"` // 本次商户实际退回金额;
DepositBackInfo []*DepositBackInfo `json:"deposit_back_info"` // 银行卡冲退信息
RefundHYBAmount string `json:"refund_hyb_amount"` // 本次请求退惠营宝金额
RefundChargeInfoList []*RefundChargeInfo `json:"refund_charge_info_list,omitempty"` // 退费信息
}
TradeFastPayRefundQueryRsp 统一收单交易退款查询接口响应参数
type TradeFundBill ¶
type TradeMergePreCreate ¶
type TradeMergePreCreate struct {
AuxParam
NotifyURL string `json:"-"` // 可选
AppAuthToken string `json:"-"` // 可选
OutMergeNo string `json:"out_merge_no"` // 可选 如果已经和支付宝约定要求子订单明细必须同时支付成功或者同时支付失败则必须传入此参数,且该参数必须在商户端唯一,否则可以不需要填。
TimeExpire string `json:"time_expire"` // 可选 订单绝对超时时间。格式为yyyy-MM-dd HH:mm:ss。
TimeoutExpress string `json:"timeout_express"` // 可选 合并支付订单相对超时时间。从商户合并预下单请求时间开始计算。 请求合并的所有订单允许的最晚付款时间,逾期将关闭交易。取值范围:1m~15d。m-分钟,h-小时,d-天,1c-当天(1c-当天的情况下,无论交易何时创建,都在0点关闭)。 该参数数值不接受小数点, 如 1.5h,可转换为 90m。默认值为15d。
OrderDetails []*OrderDetail `json:"order_details"` // 必选 子订单详情
}
TradeMergePreCreate 统一收单合并支付预创建接口请求参数 https://opendocs.alipay.com/open/028xr9
func (TradeMergePreCreate) APIName ¶
func (t TradeMergePreCreate) APIName() string
func (TradeMergePreCreate) Params ¶
func (t TradeMergePreCreate) Params() map[string]string
type TradeMergePreCreateRsp ¶
type TradeMergePreCreateRsp struct {
Error
OutMergeNo string `json:"out_merge_no"`
PreOrderNo string `json:"pre_order_no"`
OrderDetailResults []*PreOrderResult `json:"order_detail_results"`
}
TradeMergePreCreateRsp 统一收单合并支付预创建接口响应参数
type TradeNotification ¶
type TradeNotification Notification
TradeNotification Deprecated: use Notification instead.
type TradeOrderInfoSync ¶
type TradeOrderInfoSync struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutRequestNo string `json:"out_request_no"` // 必选 标识一笔交易多次请求,同一笔交易多次信息同步时需要保证唯一
BizType string `json:"biz_type"` // 必选 交易信息同步对应的业务类型,具体值与支付宝约定;信用授权场景下传CREDIT_AUTH
TradeNo string `json:"trade_no"` // 可选 支付宝交易号,和商户订单号不能同时为空
OrderBizInfo string `json:"order_biz_info"` // 可选 商户传入同步信息,具体值要和支付宝约定;用于芝麻信用租车、单次授权等信息同步场景,格式为json格式
}
TradeOrderInfoSync 支付宝订单信息同步接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.orderinfo.sync/
func (TradeOrderInfoSync) APIName ¶
func (t TradeOrderInfoSync) APIName() string
func (TradeOrderInfoSync) Params ¶
func (t TradeOrderInfoSync) Params() map[string]string
type TradeOrderInfoSyncRsp ¶
type TradeOrderInfoSyncRsp struct {
Error
TradeNo string `json:"trade_no"`
OutTradeNo string `json:"out_trade_no"`
BuyerUserId string `json:"buyer_user_id"`
}
TradeOrderInfoSyncRsp 支付宝订单信息同步接口响应参数
type TradeOrderSettle ¶
type TradeOrderSettle struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutRequestNo string `json:"out_request_no"` // 必须 结算请求流水号 开发者自行生成并保证唯一性
TradeNo string `json:"trade_no"` // 必须 支付宝订单号
RoyaltyParameters []*RoyaltyParameter `json:"royalty_parameters"` // 必须 分账明细信息
OperatorId string `json:"operator_id"` //可选 操作员id
}
TradeOrderSettle 统一收单交易结算接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.order.settle
func (TradeOrderSettle) APIName ¶
func (t TradeOrderSettle) APIName() string
func (TradeOrderSettle) Params ¶
func (t TradeOrderSettle) Params() map[string]string
type TradeOrderSettleRsp ¶
TradeOrderSettleRsp 统一收单交易结算接口响应参数
type TradePagePay ¶
type TradePagePay struct {
Trade
AuthToken string `json:"auth_token,omitempty"` // 针对用户授权接口,获取用户相关数据时,用于标识用户授权关系
QRPayMode string `json:"qr_pay_mode,omitempty"` // PC扫码支付的方式,支持前置模式和跳转模式。
QRCodeWidth string `json:"qrcode_width,omitempty"` // 商户自定义二维码宽度 注:qr_pay_mode=4时该参数生效
}
TradePagePay 统一收单下单并支付页面接口请求参数 https://opendocs.alipay.com/apis/api_1/alipay.trade.page.pay
func (TradePagePay) APIName ¶
func (t TradePagePay) APIName() string
func (TradePagePay) Params ¶
func (t TradePagePay) Params() map[string]string
type TradePay ¶
type TradePay struct {
Trade
Scene string `json:"scene"` // 必须 支付场景 条码支付,取值:bar_code 声波支付,取值:wave_code, bar_code, wave_code
AuthCode string `json:"auth_code,omitempty"` // 必须 支付授权码
AuthNo string `json:"auth_no,omitempty"` // 可选 预授权冻结交易号
BuyerId string `json:"buyer_id"` // 可选 家的支付宝用户id,如果为空,会从传入了码值信息中获取买家ID
TransCurrency string `json:"trans_currency,omitempty"`
SettleCurrency string `json:"settle_currency,omitempty"`
DiscountableAmount string `json:"discountable_amount,omitempty"` // 可选 参与优惠计算的金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000]。 如果该值未传入,但传入了【订单总金额】和【不可打折金额】,则该值默认为【订单总金额】-【不可打折金额】
GoodsDetail []*GoodsDetailItem `json:"goods_detail,omitempty"` // 可选 订单包含的商品列表信息,Json格式,其它说明详见商品明细说明
OperatorId string `json:"operator_id,omitempty"` // 可选 商户操作员编号
TerminalId string `json:"terminal_id,omitempty"` // 可选 商户机具终端编号
AuthConfirmMode string `json:"auth_confirm_mode,omitempty"`
TerminalParams string `json:"terminal_params,omitempty"`
AgreementParams *AgreementParams `json:"agreement_params,omitempty"`
PayParams *PayParams `json:"pay_params,omitempty"`
}
TradePay 统一收单交易支付接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.pay/
type TradePayRsp ¶
type TradePayRsp struct {
Error
BuyerLogonId string `json:"buyer_logon_id"` // 买家支付宝账号
BuyerPayAmount string `json:"buyer_pay_amount"` // 买家实付金额,单位为元,两位小数。
BuyerUserId string `json:"buyer_user_id"` // 买家在支付宝的用户id
CardBalance string `json:"card_balance"` // 支付宝卡余额
DiscountGoodsDetail string `json:"discount_goods_detail"` // 本次交易支付所使用的单品券优惠的商品优惠信息
FundBillList []*FundBill `json:"fund_bill_list,omitempty"` // 交易支付使用的资金渠道
GmtPayment string `json:"gmt_payment"`
InvoiceAmount string `json:"invoice_amount"` // 交易中用户支付的可开具发票的金额,单位为元,两位小数。
OutTradeNo string `json:"out_trade_no"` // 创建交易传入的商户订单号
TradeNo string `json:"trade_no"` // 支付宝交易号
PointAmount string `json:"point_amount"` // 积分支付的金额,单位为元,两位小数。
ReceiptAmount string `json:"receipt_amount"` // 实收金额,单位为元,两位小数
StoreName string `json:"store_name"` // 发生支付交易的商户门店名称
TotalAmount string `json:"total_amount"` // 发该笔退款所对应的交易的订单金额
VoucherDetailList []*VoucherDetail `json:"voucher_detail_list,omitempty"` // 本交易支付时使用的所有优惠券信息
}
TradePayRsp 统一收单交易支付接口响应参数
type TradePreCreate ¶
type TradePreCreate struct {
Trade
DiscountableAmount string `json:"discountable_amount"` // 可选 可打折金额. 参与优惠计算的金额,单位为元,精确到小数点后两位,取值范围[0.01,100000000] 如果该值未传入,但传入了【订单总金额】,【不可打折金额】则该值默认为【订单总金额】-【不可打折金额】
GoodsDetail []*GoodsDetailItem `json:"goods_detail,omitempty"` // 可选 订单包含的商品列表信息.Json格式. 其它说明详见:“商品明细说明”
OperatorId string `json:"operator_id"` // 可选 商户操作员编号
TerminalId string `json:"terminal_id"` // 可选 商户机具终端编号
}
TradePreCreate 统一收单线下交易预创建接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.precreate/
func (TradePreCreate) APIName ¶
func (t TradePreCreate) APIName() string
func (TradePreCreate) Params ¶
func (t TradePreCreate) Params() map[string]string
type TradePreCreateRsp ¶
type TradePreCreateRsp struct {
Error
OutTradeNo string `json:"out_trade_no"` // 创建交易传入的商户订单号
QRCode string `json:"qr_code"` // 当前预下单请求生成的二维码码串,可以用二维码生成工具根据该码串值生成对应的二维码
}
TradePreCreateRsp 统一收单线下交易预创建接口响应参数
type TradeQuery ¶
type TradeQuery struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutTradeNo string `json:"out_trade_no,omitempty"` // 订单支付时传入的商户订单号, 与 TradeNo 二选一
TradeNo string `json:"trade_no,omitempty"` // 支付宝交易号
OrgPid string `json:"org_pid,omitempty"` // 可选 银行间联模式下有用,其它场景请不要使用; 双联通过该参数指定需要查询的交易所属收单机构的pid;
QueryOptions []string `json:"query_options,omitempty"` // 可选 查询选项,商户传入该参数可定制本接口同步响应额外返回的信息字段,数组格式。支持枚举如下:trade_settle_info:返回的交易结算信息,包含分账、补差等信息; fund_bill_list:交易支付使用的资金渠道;voucher_detail_list:交易支付时使用的所有优惠券信息;discount_goods_detail:交易支付所使用的单品券优惠的商品优惠信息;mdiscount_amount:商家优惠金额;
}
TradeQuery 统一收单线下交易查询接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.query/
func (TradeQuery) APIName ¶
func (t TradeQuery) APIName() string
func (TradeQuery) Params ¶
func (t TradeQuery) Params() map[string]string
type TradeQueryRsp ¶
type TradeQueryRsp struct {
Error
TradeNo string `json:"trade_no"` // 支付宝交易号
OutTradeNo string `json:"out_trade_no"` // 商家订单号
BuyerLogonId string `json:"buyer_logon_id"` // 买家支付宝账号
BuyerOpenId string `json:"buyer_open_id"` // 买家支付宝用户唯一标识
TradeStatus TradeStatus `json:"trade_status"` // 交易状态
TotalAmount string `json:"total_amount"` // 交易的订单金额
TransCurrency string `json:"trans_currency"` // 标价币种
SettleCurrency string `json:"settle_currency"` // 订单结算币种
SettleAmount string `json:"settle_amount"` // 结算币种订单金额
PayCurrency string `json:"pay_currency"` // 订单支付币种
PayAmount string `json:"pay_amount"` // 支付币种订单金额
SettleTransRate string `json:"settle_trans_rate"` // 结算币种兑换标价币种汇率
TransPayRate string `json:"trans_pay_rate"` // 标价币种兑换支付币种汇率
BuyerPayAmount string `json:"buyer_pay_amount"` // 买家实付金额,单位为元,两位小数。
PointAmount string `json:"point_amount"` // 积分支付的金额,单位为元,两位小数。
InvoiceAmount string `json:"invoice_amount"` // 交易中用户支付的可开具发票的金额,单位为元,两位小数。
SendPayDate string `json:"send_pay_date"` // 本次交易打款给卖家的时间
ReceiptAmount string `json:"receipt_amount"` // 实收金额,单位为元,两位小数
StoreId string `json:"store_id"` // 商户门店编号
TerminalId string `json:"terminal_id"` // 商户机具终端编号
FundBillList []*FundBill `json:"fund_bill_list,omitempty"` // 交易支付使用的资金渠道
StoreName string `json:"store_name"` // 请求交易支付中的商户店铺的名称
BuyerUserId string `json:"buyer_user_id"` // 买家在支付宝的用户id
BuyerUserName string `json:"buyer_user_name"` // 买家名称;
IndustrySepcDetailGov string `json:"industry_sepc_detail_gov"` // 行业特殊信息-统筹相关
IndustrySepcDetailAcc string `json:"industry_sepc_detail_acc"` // 行业特殊信息-个账相关
ChargeAmount string `json:"charge_amount"` // 该笔交易针对收款方的收费金额;
ChargeFlags string `json:"charge_flags"` // 费率活动标识,当交易享受活动优惠费率时,返回该活动的标识;
SettlementId string `json:"settlement_id"` // 支付清算编号,用于清算对账使用;
TradeSettleInfo *TradeSettleInfo `json:"trade_settle_info,omitempty"` // 返回的交易结算信息,包含分账、补差等信息
AuthTradePayMode string `json:"auth_trade_pay_mode"` // 预授权支付模式,该参数仅在信用预授权支付场景下返回。信用预授权支付:CREDIT_PREAUTH_PAY
BuyerUserType string `json:"buyer_user_type"` // 买家用户类型。CORPORATE:企业用户;PRIVATE:个人用户。
MdiscountAmount string `json:"mdiscount_amount"` // 商家优惠金额
DiscountAmount string `json:"discount_amount"` // 平台优惠金额
Subject string `json:"subject"` // 订单标题;
Body string `json:"body"` // 订单描述;
AlipaySubMerchantId string `json:"alipay_sub_merchant_id"` // 间连商户在支付宝端的商户编号;
ExtInfos string `json:"ext_infos"` // 交易额外信息,特殊场景下与支付宝约定返回。
PassbackParams string `json:"passback_params"` // 公用回传参数。返回支付时传入的passback_params参数信息
HBFQPayInfo *HBFQPayInfo `json:"hb_fq_pay_info"` // 若用户使用花呗分期支付,且商家开通返回此通知参数,则会返回花呗分期信息。json格式其它说明详见花呗分期信息说明。 注意:商家需与支付宝约定后才返回本参数。
CreditPayMode string `json:"credit_pay_mode"` // 信用支付模式。表示订单是采用信用支付方式(支付时买家没有出资,需要后续履约)。"creditAdvanceV2"表示芝麻先用后付模式,用户后续需要履约扣款。 此字段只有信用支付场景才有值,商户需要根据字段值单独处理。此字段以后可能扩展其他值,建议商户使用白名单方式识别,对于未识别的值做失败处理,并联系支付宝技术支持人员。
CreditBizOrderId string `json:"credit_biz_order_id"` // 信用业务单号。信用支付场景才有值,先用后付产品里是芝麻订单号。
HYBAmount string `json:"hyb_amount"` // 惠营宝回票金额
BKAgentRespInfo *BKAgentRespInfo `json:"bk_agent_resp_info"` // 间联交易下,返回给机构的信 息
ChargeInfoList []*ChargeInfo `json:"charge_info_list"` // 计费信息列表
DiscountGoodsDetail string `json:"discount_goods_detail"` // 本次交易支付所使用的单品券优惠的商品优惠信息
VoucherDetailList []*VoucherDetail `json:"voucher_detail_list,omitempty"` // 本交易支付时使用的所有优惠券信息
}
TradeQueryRsp 统一收单线下交易查询接口响应参数
type TradeRefund ¶
type TradeRefund struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OutTradeNo string `json:"out_trade_no,omitempty"` // 与 TradeNo 二选一
TradeNo string `json:"trade_no,omitempty"` // 与 OutTradeNo 二选一
RefundAmount string `json:"refund_amount"` // 必须 需要退款的金额,该金额不能大于订单金额,单位为元,支持两位小数
RefundReason string `json:"refund_reason"` // 可选 退款的原因说明
OutRequestNo string `json:"out_request_no"` // 必须 标识一次退款请求,同一笔交易多次退款需要保证唯一,如需部分退款,则此参数必传。
RefundRoyaltyParameters []*RefundRoyaltyParameter `json:"refund_royalty_parameters,omitempty"` // 可选 退分账明细信息。 注: 1.当面付且非直付通模式无需传入退分账明细,系统自动按退款金额与订单金额的比率,从收款方和分账收入方退款,不支持指定退款金额与退款方。2.直付通模式,电脑网站支付,手机 APP 支付,手机网站支付产品,须在退款请求中明确是否退分账,从哪个分账收入方退,退多少分账金额;如不明确,默认从收款方退款,收款方余额不足退款失败。不支持系统按比率退款。
QueryOptions []string `json:"query_options,omitempty"` // 可选 查询选项。 商户通过上送该参数来定制同步需要额外返回的信息字段,数组格式。支持:refund_detail_item_list:退款使用的资金渠道;deposit_back_info:触发银行卡冲退信息通知;
}
TradeRefund 统一收单交易退款接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.refund/
func (TradeRefund) APIName ¶
func (t TradeRefund) APIName() string
func (TradeRefund) Params ¶
func (t TradeRefund) Params() map[string]string
type TradeRefundAsync ¶
type TradeRefundAsync struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
NotifyURL string `json:"-"` // 可选
OutTradeNo string `json:"out_trade_no,omitempty"` // 与 TradeNo 二选一
TradeNo string `json:"trade_no,omitempty"` // 与 OutTradeNo 二选一
RefundAmount string `json:"refund_amount"` // 必须 需要退款的金额,该金额不能大于订单金额,单位为元,支持两位小数
RefundReason string `json:"refund_reason"` // 可选 退款的原因说明
OutRequestNo string `json:"out_request_no"` // 必须 标识一次退款请求,同一笔交易多次退款需要保证唯一,如需部分退款,则此参数必传。
OperatorId string `json:"operator_id"` // 可选 商户的操作员编号
StoreId string `json:"store_id"` // 可选 商户的门店编号
TerminalId string `json:"terminal_id"` // 可选 商户的终端编号
}
TradeRefundAsync 统一收单交易退款接口(异步)请求参数 https://opendocs.alipay.com/pre-apis/api_pre/alipay.trade.refund.apply
func (TradeRefundAsync) APIName ¶
func (t TradeRefundAsync) APIName() string
func (TradeRefundAsync) Params ¶
func (t TradeRefundAsync) Params() map[string]string
type TradeRefundAsyncRsp ¶
type TradeRefundAsyncRsp struct {
Error
TradeNo string `json:"trade_no"` // 支付宝交易号
OutTradeNo string `json:"out_trade_no"` // 商户订单号
OutRequestNo string `json:"out_request_no"` // 本笔退款对应的退款请求号
RefundAmount string `json:"refund_amount"` // 本次退款请求,对应的退款金额
RefundStatus string `json:"refund_status"` // REFUND_PROCESSING 退款处理中;REFUND_SUCCESS 退款处理成功;REFUND_FAIL 退款失败
}
TradeRefundAsyncRsp 统一收单交易退款接口(异步)响应参数
type TradeRefundRsp ¶
type TradeRefundRsp struct {
Error
TradeNo string `json:"trade_no"` // 支付宝交易号
OutTradeNo string `json:"out_trade_no"` // 商户订单号
BuyerLogonId string `json:"buyer_logon_id"` // 用户的登录id
BuyerUserId string `json:"buyer_user_id"` // 买家在支付宝的用户id
FundChange string `json:"fund_change"` // 本次退款是否发生了资金变化
RefundFee string `json:"refund_fee"` // 退款总金额
StoreName string `json:"store_name"` // 交易在支付时候的门店名称
RefundDetailItemList []*TradeFundBill `json:"refund_detail_item_list,omitempty"` // 退款使用的资金渠道
SendBackFee string `json:"send_back_fee"` // 本次商户实际退回金额。 说明:如需获取该值,需在入参query_options中传入 refund_detail_item_list。
RefundHYBAmount string `json:"refund_hyb_amount"` // 本次请求退惠营宝金额
RefundChargeInfoList []*RefundChargeInfo `json:"refund_charge_info_list,omitempty"` // 退费信息
}
TradeRefundRsp 统一收单交易退款接口响应参数
type TradeSettleDetail ¶
type TradeSettleInfo ¶
type TradeSettleInfo struct {
TradeSettleDetailList []*TradeSettleDetail `json:"trade_settle_detail_list"`
}
type TradeStatus ¶
type TradeStatus string
const ( TradeStatusWaitBuyerPay TradeStatus = "WAIT_BUYER_PAY" //(交易创建,等待买家付款) TradeStatusClosed TradeStatus = "TRADE_CLOSED" //(未付款交易超时关闭,或支付完成后全额退款) TradeStatusSuccess TradeStatus = "TRADE_SUCCESS" //(交易支付成功) TradeStatusFinished TradeStatus = "TRADE_FINISHED" //(交易结束,不可退款) )
type TradeWapMergePay ¶
type TradeWapMergePay struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
PreOrderNo string `json:"pre_order_no"` // 必选 预下单号。通过 alipay.trade.merge.precreate(统一收单合并支付预创建接口)返回。
}
TradeWapMergePay 无线Wap合并支付接口2.0 https://opendocs.alipay.com/open/028xra
func (TradeWapMergePay) APIName ¶
func (t TradeWapMergePay) APIName() string
func (TradeWapMergePay) Params ¶
func (t TradeWapMergePay) Params() map[string]string
type TradeWapPay ¶
type TradeWapPay struct {
Trade
QuitURL string `json:"quit_url,omitempty"`
AuthToken string `json:"auth_token,omitempty"` // 针对用户授权接口,获取用户相关数据时,用于标识用户授权关系
TimeExpire string `json:"time_expire,omitempty"` // 绝对超时时间,格式为yyyy-MM-dd HH:mm。
}
TradeWapPay 手机网站支付接口请求参数 https://docs.open.alipay.com/api_1/alipay.trade.wap.pay/
func (TradeWapPay) APIName ¶
func (t TradeWapPay) APIName() string
func (TradeWapPay) Params ¶
func (t TradeWapPay) Params() map[string]string
type UserCertDocCertVerifyConsult ¶
type UserCertDocCertVerifyConsult struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
AuthToken string `json:"-"` // 必选
VerifyId string `json:"verify_id"` // 信息校验验证ID。通过alipay.user.certdoc.certverify.preconsult(实名证件信息比对验证预咨询)接口获取
}
UserCertDocCertVerifyConsult 实名证件信息比对验证咨询接口请求参数 https://opendocs.alipay.com/apis/api_2/alipay.user.certdoc.certverify.consult
func (UserCertDocCertVerifyConsult) APIName ¶
func (u UserCertDocCertVerifyConsult) APIName() string
func (UserCertDocCertVerifyConsult) Params ¶
func (u UserCertDocCertVerifyConsult) Params() map[string]string
type UserCertDocCertVerifyConsultRsp ¶
type UserCertDocCertVerifyConsultRsp struct {
Error
Passed string `json:"passed"`
FailReason string `json:"fail_reason"`
FailParams string `json:"fail_params"`
}
UserCertDocCertVerifyConsultRsp 实名证件信息比对验证咨询接口响应参数
type UserCertDocCertVerifyPreConsult ¶
type UserCertDocCertVerifyPreConsult struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
UserName string `json:"user_name"` // 真实姓名
CertType string `json:"cert_type"` // 证件类型。暂仅支持 IDENTITY_CARD (身份证)。 ID
CertNo string `json:"cert_no"` // 证件号
Mobile string `json:"mobile"` // 手机号码 可选
LogonId string `json:"logon_id"` // 支付宝登录名 可选
ExtInfo map[string]interface{} `json:"ext_info"` // 拓展字段,JSON格式 可选
}
UserCertDocCertVerifyPreConsult 实名证件信息比对验证预咨询接口请求参数 https://opendocs.alipay.com/apis/api_2/alipay.user.certdoc.certverify.preconsult
func (UserCertDocCertVerifyPreConsult) APIName ¶
func (u UserCertDocCertVerifyPreConsult) APIName() string
func (UserCertDocCertVerifyPreConsult) Params ¶
func (u UserCertDocCertVerifyPreConsult) Params() map[string]string
type UserCertDocCertVerifyPreConsultRsp ¶
UserCertDocCertVerifyPreConsultRsp 实名证件信息比对验证预咨询接口响应参数
type UserCertifyOpenCertify ¶
type UserCertifyOpenCertify struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
CertifyId string `json:"certify_id"` // 必选 本次申请操作的唯一标识,由开放认证初始化接口调用后生成,后续的操作都需要用到
}
UserCertifyOpenCertify 身份认证开始认证接口请求参数 https://docs.open.alipay.com/api_2/alipay.user.certify.open.certify
func (UserCertifyOpenCertify) APIName ¶
func (u UserCertifyOpenCertify) APIName() string
func (UserCertifyOpenCertify) Params ¶
func (u UserCertifyOpenCertify) Params() map[string]string
type UserCertifyOpenCertifyRsp ¶
type UserCertifyOpenCertifyRsp struct {
Error
}
UserCertifyOpenCertifyRsp 身份认证开始认证接口响应参数
type UserCertifyOpenInitialize ¶
type UserCertifyOpenInitialize struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
OuterOrderNo string `json:"outer_order_no"` // 必选 商户请求的唯一标识,商户要保证其唯一性,值为32位长度的字母数字组合。建议:前面几位字符是商户自定义的简称,中间可以使用一段时间,后段可以使用一个随机或递增序列
BizCode CertifyBizCode `json:"biz_code"` // 必选 认证场景码。入参支持的认证场景码和商户签约的认证场景相关,取值如下: FACE:多因子人脸认证 CERT_PHOTO:多因子证照认证 CERT_PHOTO_FACE :多因子证照和人脸认证 SMART_FACE:多因子快捷认证
IdentityParam IdentityParam `json:"identity_param"` // 必选
MerchantConfig MerchantConfig `json:"merchant_config"` // 必选 商户个性化配置,格式为json,详细支持的字段说明为: return_url:需要回跳的目标地址,必填,一般指定为商户业务页面
FaceContrastPicture string `json:"face_contrast_picture,omitempty"` // 可选 自定义人脸比对图片的base64编码格式的string字符串
}
UserCertifyOpenInitialize 身份认证初始化服务接口请求参数 https://docs.open.alipay.com/api_2/alipay.user.certify.open.initialize
func (UserCertifyOpenInitialize) APIName ¶
func (u UserCertifyOpenInitialize) APIName() string
func (UserCertifyOpenInitialize) Params ¶
func (u UserCertifyOpenInitialize) Params() map[string]string
type UserCertifyOpenInitializeRsp ¶
UserCertifyOpenInitializeRsp 身份认证初始化服务接口响应参数
type UserCertifyOpenQuery ¶
type UserCertifyOpenQuery struct {
AuxParam
AppAuthToken string `json:"-"` // 可选
CertifyId string `json:"certify_id"` // 必选 本次申请操作的唯一标识,由开放认证初始化接口调用后生成,后续的操作都需要用到
}
UserCertifyOpenQuery 身份认证记录查询接口请求参数 https://docs.open.alipay.com/api_2/alipay.user.certify.open.query/
func (UserCertifyOpenQuery) APIName ¶
func (u UserCertifyOpenQuery) APIName() string
func (UserCertifyOpenQuery) Params ¶
func (u UserCertifyOpenQuery) Params() map[string]string
type UserCertifyOpenQueryRsp ¶
type UserCertifyOpenQueryRsp struct {
Error
Passed string `json:"passed"`
IdentityInfo string `json:"identity_info"`
MaterialInfo string `json:"material_info"`
}
UserCertifyOpenQueryRsp 身份认证记录查询接口响应参数
type UserInfoShare ¶
type UserInfoShare struct {
}
UserInfoShare 支付宝会员授权信息查询接口请求参数 https://docs.open.alipay.com/api_2/alipay.user.info.share
func (UserInfoShare) APIName ¶
func (u UserInfoShare) APIName() string
func (UserInfoShare) Params ¶
func (u UserInfoShare) Params() map[string]string
type VoucherDetail ¶
type VoucherDetail struct {
Id string `json:"id"` // 券id
Name string `json:"name"` // 券名称
Type string `json:"type"` // 当前有三种类型: ALIPAY_FIX_VOUCHER - 全场代金券, ALIPAY_DISCOUNT_VOUCHER - 折扣券, ALIPAY_ITEM_VOUCHER - 单品优惠
Amount string `json:"amount"` // 优惠券面额,它应该会等于商家出资加上其他出资方出资
MerchantContribute string `json:"merchant_contribute"` // 商家出资(特指发起交易的商家出资金额)
OtherContribute string `json:"other_contribute"` // 其他出资方出资金额,可能是支付宝,可能是品牌商,或者其他方,也可能是他们的一起出资
Memo string `json:"memo"` // 优惠券备注信息
}
type ZmAuthParams ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
pbkdf2
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
|
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0. |
|
pkcs12
Package pkcs12 implements some of PKCS#12.
|
Package pkcs12 implements some of PKCS#12. |
|
pkcs12/internal/rc2
Package rc2 implements the RC2 cipher
|
Package rc2 implements the RC2 cipher |
