Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPayHTTPServer(s *http.Server, srv PayHTTPServer)
- func RegisterPayServer(s grpc.ServiceRegistrar, srv PayServer)
- type AddMerchantPaymentConfigRequest
- func (*AddMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddMerchantPaymentConfigRequest) GetApiKey() string
- func (x *AddMerchantPaymentConfigRequest) GetAppId() string
- func (x *AddMerchantPaymentConfigRequest) GetCompanyId() uint64
- func (x *AddMerchantPaymentConfigRequest) GetDescription() string
- func (x *AddMerchantPaymentConfigRequest) GetMchId() string
- func (x *AddMerchantPaymentConfigRequest) GetNotifyUrl() string
- func (x *AddMerchantPaymentConfigRequest) GetPrivateKey() string
- func (x *AddMerchantPaymentConfigRequest) GetSerialNo() string
- func (x *AddMerchantPaymentConfigRequest) GetStatus() uint32
- func (*AddMerchantPaymentConfigRequest) ProtoMessage()
- func (x *AddMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
- func (x *AddMerchantPaymentConfigRequest) Reset()
- func (x *AddMerchantPaymentConfigRequest) String() string
- type DeleteMerchantPaymentConfigRequest
- func (*DeleteMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteMerchantPaymentConfigRequest) GetId() uint64
- func (*DeleteMerchantPaymentConfigRequest) ProtoMessage()
- func (x *DeleteMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteMerchantPaymentConfigRequest) Reset()
- func (x *DeleteMerchantPaymentConfigRequest) String() string
- type Empty
- type GetMerchantPaymentConfigListRequest
- func (*GetMerchantPaymentConfigListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetMerchantPaymentConfigListRequest) GetApiKey() string
- func (x *GetMerchantPaymentConfigListRequest) GetAppId() string
- func (x *GetMerchantPaymentConfigListRequest) GetCompanyId() uint64
- func (x *GetMerchantPaymentConfigListRequest) GetDescription() string
- func (x *GetMerchantPaymentConfigListRequest) GetIncludeDeleted() bool
- func (x *GetMerchantPaymentConfigListRequest) GetMchId() string
- func (x *GetMerchantPaymentConfigListRequest) GetNotifyUrl() string
- func (x *GetMerchantPaymentConfigListRequest) GetPage() int64
- func (x *GetMerchantPaymentConfigListRequest) GetPageSize() int64
- func (x *GetMerchantPaymentConfigListRequest) GetPrivateKey() string
- func (x *GetMerchantPaymentConfigListRequest) GetSerialNo() string
- func (x *GetMerchantPaymentConfigListRequest) GetStatus() uint32
- func (*GetMerchantPaymentConfigListRequest) ProtoMessage()
- func (x *GetMerchantPaymentConfigListRequest) ProtoReflect() protoreflect.Message
- func (x *GetMerchantPaymentConfigListRequest) Reset()
- func (x *GetMerchantPaymentConfigListRequest) String() string
- type GetMerchantPaymentConfigRequest
- func (*GetMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetMerchantPaymentConfigRequest) GetAppId() string
- func (x *GetMerchantPaymentConfigRequest) GetId() uint64
- func (x *GetMerchantPaymentConfigRequest) GetIncludeDeleted() bool
- func (*GetMerchantPaymentConfigRequest) ProtoMessage()
- func (x *GetMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
- func (x *GetMerchantPaymentConfigRequest) Reset()
- func (x *GetMerchantPaymentConfigRequest) String() string
- type PayClient
- type PayHTTPClient
- type PayHTTPClientImpl
- func (c *PayHTTPClientImpl) AddMerchantPaymentConfig(ctx context.Context, in *AddMerchantPaymentConfigRequest, ...) (*Reply, error)
- func (c *PayHTTPClientImpl) DeleteMerchantPaymentConfig(ctx context.Context, in *DeleteMerchantPaymentConfigRequest, ...) (*Reply, error)
- func (c *PayHTTPClientImpl) GetMerchantPaymentConfig(ctx context.Context, in *GetMerchantPaymentConfigRequest, ...) (*Reply, error)
- func (c *PayHTTPClientImpl) GetMerchantPaymentConfigList(ctx context.Context, in *GetMerchantPaymentConfigListRequest, ...) (*Reply, error)
- func (c *PayHTTPClientImpl) Payment(ctx context.Context, in *PaymentRequest, opts ...http.CallOption) (*Reply, error)
- func (c *PayHTTPClientImpl) UserWithdraw(ctx context.Context, in *WechatNotifyRequest, opts ...http.CallOption) (*V3NotifyRsp, error)
- func (c *PayHTTPClientImpl) WechatNotify(ctx context.Context, in *WechatNotifyRequest, opts ...http.CallOption) (*V3NotifyRsp, error)
- type PayHTTPServer
- type PayServer
- type PaymentRequest
- func (*PaymentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PaymentRequest) GetAmount() uint64
- func (x *PaymentRequest) GetAppId() string
- func (x *PaymentRequest) GetDescription() string
- func (x *PaymentRequest) GetOpenId() string
- func (x *PaymentRequest) GetOrderId() string
- func (x *PaymentRequest) GetPaymentType() string
- func (*PaymentRequest) ProtoMessage()
- func (x *PaymentRequest) ProtoReflect() protoreflect.Message
- func (x *PaymentRequest) Reset()
- func (x *PaymentRequest) String() string
- type Reply
- type Resource
- func (*Resource) Descriptor() ([]byte, []int)deprecated
- func (x *Resource) GetAlgorithm() string
- func (x *Resource) GetAssociatedData() string
- func (x *Resource) GetCiphertext() string
- func (x *Resource) GetNonce() string
- func (x *Resource) GetOriginalType() string
- func (*Resource) ProtoMessage()
- func (x *Resource) ProtoReflect() protoreflect.Message
- func (x *Resource) Reset()
- func (x *Resource) String() string
- type UnimplementedPayServer
- func (UnimplementedPayServer) AddMerchantPaymentConfig(context.Context, *AddMerchantPaymentConfigRequest) (*Reply, error)
- func (UnimplementedPayServer) DeleteMerchantPaymentConfig(context.Context, *DeleteMerchantPaymentConfigRequest) (*Reply, error)
- func (UnimplementedPayServer) GetMerchantPaymentConfig(context.Context, *GetMerchantPaymentConfigRequest) (*Reply, error)
- func (UnimplementedPayServer) GetMerchantPaymentConfigList(context.Context, *GetMerchantPaymentConfigListRequest) (*Reply, error)
- func (UnimplementedPayServer) Payment(context.Context, *PaymentRequest) (*Reply, error)
- func (UnimplementedPayServer) UserWithdraw(context.Context, *WechatNotifyRequest) (*V3NotifyRsp, error)
- func (UnimplementedPayServer) WechatNotify(context.Context, *WechatNotifyRequest) (*V3NotifyRsp, error)
- type UnsafePayServer
- type V3NotifyRsp
- func (*V3NotifyRsp) Descriptor() ([]byte, []int)deprecated
- func (x *V3NotifyRsp) GetCode() string
- func (x *V3NotifyRsp) GetMessage() string
- func (*V3NotifyRsp) ProtoMessage()
- func (x *V3NotifyRsp) ProtoReflect() protoreflect.Message
- func (x *V3NotifyRsp) Reset()
- func (x *V3NotifyRsp) String() string
- type WechatNotifyRequest
- func (*WechatNotifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WechatNotifyRequest) GetAppId() string
- func (x *WechatNotifyRequest) GetCreateTime() string
- func (x *WechatNotifyRequest) GetEventType() string
- func (x *WechatNotifyRequest) GetId() string
- func (x *WechatNotifyRequest) GetOutBatchNo() string
- func (x *WechatNotifyRequest) GetResource() *Resource
- func (x *WechatNotifyRequest) GetResourceType() string
- func (x *WechatNotifyRequest) GetSummary() string
- func (*WechatNotifyRequest) ProtoMessage()
- func (x *WechatNotifyRequest) ProtoReflect() protoreflect.Message
- func (x *WechatNotifyRequest) Reset()
- func (x *WechatNotifyRequest) String() string
Constants ¶
const ( Pay_AddMerchantPaymentConfig_FullMethodName = "/api.pay.v1.Pay/AddMerchantPaymentConfig" Pay_GetMerchantPaymentConfig_FullMethodName = "/api.pay.v1.Pay/GetMerchantPaymentConfig" Pay_GetMerchantPaymentConfigList_FullMethodName = "/api.pay.v1.Pay/GetMerchantPaymentConfigList" Pay_DeleteMerchantPaymentConfig_FullMethodName = "/api.pay.v1.Pay/DeleteMerchantPaymentConfig" Pay_Payment_FullMethodName = "/api.pay.v1.Pay/Payment" Pay_WechatNotify_FullMethodName = "/api.pay.v1.Pay/WechatNotify" Pay_UserWithdraw_FullMethodName = "/api.pay.v1.Pay/UserWithdraw" )
const OperationPayAddMerchantPaymentConfig = "/api.pay.v1.Pay/AddMerchantPaymentConfig"
const OperationPayDeleteMerchantPaymentConfig = "/api.pay.v1.Pay/DeleteMerchantPaymentConfig"
const OperationPayGetMerchantPaymentConfig = "/api.pay.v1.Pay/GetMerchantPaymentConfig"
const OperationPayGetMerchantPaymentConfigList = "/api.pay.v1.Pay/GetMerchantPaymentConfigList"
const OperationPayPayment = "/api.pay.v1.Pay/Payment"
const OperationPayUserWithdraw = "/api.pay.v1.Pay/UserWithdraw"
const OperationPayWechatNotify = "/api.pay.v1.Pay/WechatNotify"
Variables ¶
var File_pay_v1_common_proto protoreflect.FileDescriptor
var File_pay_v1_pay_proto protoreflect.FileDescriptor
var Pay_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.pay.v1.Pay", HandlerType: (*PayServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddMerchantPaymentConfig", Handler: _Pay_AddMerchantPaymentConfig_Handler, }, { MethodName: "GetMerchantPaymentConfig", Handler: _Pay_GetMerchantPaymentConfig_Handler, }, { MethodName: "GetMerchantPaymentConfigList", Handler: _Pay_GetMerchantPaymentConfigList_Handler, }, { MethodName: "DeleteMerchantPaymentConfig", Handler: _Pay_DeleteMerchantPaymentConfig_Handler, }, { MethodName: "Payment", Handler: _Pay_Payment_Handler, }, { MethodName: "WechatNotify", Handler: _Pay_WechatNotify_Handler, }, { MethodName: "UserWithdraw", Handler: _Pay_UserWithdraw_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pay/v1/pay.proto", }
Pay_ServiceDesc is the grpc.ServiceDesc for Pay service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPayHTTPServer ¶
func RegisterPayHTTPServer(s *http.Server, srv PayHTTPServer)
func RegisterPayServer ¶
func RegisterPayServer(s grpc.ServiceRegistrar, srv PayServer)
Types ¶
type AddMerchantPaymentConfigRequest ¶
type AddMerchantPaymentConfigRequest struct { CompanyId uint64 `protobuf:"varint,1,opt,name=company_id,json=companyId,proto3" json:"company_id,omitempty"` // 所属公司ID AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // 微信支付应用ID MchId string `protobuf:"bytes,3,opt,name=mch_id,json=mchId,proto3" json:"mch_id,omitempty"` // 微信支付商户号 ApiKey string `protobuf:"bytes,4,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` // 微信支付API密钥 PrivateKey string `protobuf:"bytes,5,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // 微信支付证书私钥内容 SerialNo string `protobuf:"bytes,6,opt,name=serial_no,json=serialNo,proto3" json:"serial_no,omitempty"` // 微信支付证书序列号 NotifyUrl string `protobuf:"bytes,7,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` // 支付回调通知URL Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` // 支付参数描述 Status uint32 `protobuf:"varint,9,opt,name=status,proto3" json:"status,omitempty"` // 状态: 1-启用, 0-禁用 // contains filtered or unexported fields }
请求添加支付配置的消息
func (*AddMerchantPaymentConfigRequest) Descriptor
deprecated
func (*AddMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddMerchantPaymentConfigRequest.ProtoReflect.Descriptor instead.
func (*AddMerchantPaymentConfigRequest) GetApiKey ¶
func (x *AddMerchantPaymentConfigRequest) GetApiKey() string
func (*AddMerchantPaymentConfigRequest) GetAppId ¶
func (x *AddMerchantPaymentConfigRequest) GetAppId() string
func (*AddMerchantPaymentConfigRequest) GetCompanyId ¶
func (x *AddMerchantPaymentConfigRequest) GetCompanyId() uint64
func (*AddMerchantPaymentConfigRequest) GetDescription ¶
func (x *AddMerchantPaymentConfigRequest) GetDescription() string
func (*AddMerchantPaymentConfigRequest) GetMchId ¶
func (x *AddMerchantPaymentConfigRequest) GetMchId() string
func (*AddMerchantPaymentConfigRequest) GetNotifyUrl ¶
func (x *AddMerchantPaymentConfigRequest) GetNotifyUrl() string
func (*AddMerchantPaymentConfigRequest) GetPrivateKey ¶
func (x *AddMerchantPaymentConfigRequest) GetPrivateKey() string
func (*AddMerchantPaymentConfigRequest) GetSerialNo ¶
func (x *AddMerchantPaymentConfigRequest) GetSerialNo() string
func (*AddMerchantPaymentConfigRequest) GetStatus ¶
func (x *AddMerchantPaymentConfigRequest) GetStatus() uint32
func (*AddMerchantPaymentConfigRequest) ProtoMessage ¶
func (*AddMerchantPaymentConfigRequest) ProtoMessage()
func (*AddMerchantPaymentConfigRequest) ProtoReflect ¶
func (x *AddMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
func (*AddMerchantPaymentConfigRequest) Reset ¶
func (x *AddMerchantPaymentConfigRequest) Reset()
func (*AddMerchantPaymentConfigRequest) String ¶
func (x *AddMerchantPaymentConfigRequest) String() string
type DeleteMerchantPaymentConfigRequest ¶
type DeleteMerchantPaymentConfigRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 配置ID // contains filtered or unexported fields }
请求删除支付配置的消息
func (*DeleteMerchantPaymentConfigRequest) Descriptor
deprecated
func (*DeleteMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteMerchantPaymentConfigRequest.ProtoReflect.Descriptor instead.
func (*DeleteMerchantPaymentConfigRequest) GetId ¶
func (x *DeleteMerchantPaymentConfigRequest) GetId() uint64
func (*DeleteMerchantPaymentConfigRequest) ProtoMessage ¶
func (*DeleteMerchantPaymentConfigRequest) ProtoMessage()
func (*DeleteMerchantPaymentConfigRequest) ProtoReflect ¶
func (x *DeleteMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
func (*DeleteMerchantPaymentConfigRequest) Reset ¶
func (x *DeleteMerchantPaymentConfigRequest) Reset()
func (*DeleteMerchantPaymentConfigRequest) String ¶
func (x *DeleteMerchantPaymentConfigRequest) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
空消息
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetMerchantPaymentConfigListRequest ¶
type GetMerchantPaymentConfigListRequest struct { CompanyId uint64 `protobuf:"varint,1,opt,name=company_id,json=companyId,proto3" json:"company_id,omitempty"` // 所属公司ID AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // 微信支付应用ID MchId string `protobuf:"bytes,3,opt,name=mch_id,json=mchId,proto3" json:"mch_id,omitempty"` // 微信支付商户号 ApiKey string `protobuf:"bytes,4,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` // 微信支付API密钥 PrivateKey string `protobuf:"bytes,5,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` // 微信支付证书私钥内容 SerialNo string `protobuf:"bytes,6,opt,name=serial_no,json=serialNo,proto3" json:"serial_no,omitempty"` // 微信支付证书序列号 NotifyUrl string `protobuf:"bytes,7,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` // 支付回调通知URL Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` // 支付参数描述 Status uint32 `protobuf:"varint,9,opt,name=status,proto3" json:"status,omitempty"` // 状态: 1-启用, 0-禁用 PageSize int64 `protobuf:"varint,10,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页数量 Page int64 `protobuf:"varint,11,opt,name=page,proto3" json:"page,omitempty"` // 页码 IncludeDeleted bool `protobuf:"varint,12,opt,name=include_deleted,json=includeDeleted,proto3" json:"include_deleted,omitempty"` // 是否已包含删除的 // contains filtered or unexported fields }
请求查询支付配置的消息列表
func (*GetMerchantPaymentConfigListRequest) Descriptor
deprecated
func (*GetMerchantPaymentConfigListRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMerchantPaymentConfigListRequest.ProtoReflect.Descriptor instead.
func (*GetMerchantPaymentConfigListRequest) GetApiKey ¶
func (x *GetMerchantPaymentConfigListRequest) GetApiKey() string
func (*GetMerchantPaymentConfigListRequest) GetAppId ¶
func (x *GetMerchantPaymentConfigListRequest) GetAppId() string
func (*GetMerchantPaymentConfigListRequest) GetCompanyId ¶
func (x *GetMerchantPaymentConfigListRequest) GetCompanyId() uint64
func (*GetMerchantPaymentConfigListRequest) GetDescription ¶
func (x *GetMerchantPaymentConfigListRequest) GetDescription() string
func (*GetMerchantPaymentConfigListRequest) GetIncludeDeleted ¶
func (x *GetMerchantPaymentConfigListRequest) GetIncludeDeleted() bool
func (*GetMerchantPaymentConfigListRequest) GetMchId ¶
func (x *GetMerchantPaymentConfigListRequest) GetMchId() string
func (*GetMerchantPaymentConfigListRequest) GetNotifyUrl ¶
func (x *GetMerchantPaymentConfigListRequest) GetNotifyUrl() string
func (*GetMerchantPaymentConfigListRequest) GetPage ¶
func (x *GetMerchantPaymentConfigListRequest) GetPage() int64
func (*GetMerchantPaymentConfigListRequest) GetPageSize ¶
func (x *GetMerchantPaymentConfigListRequest) GetPageSize() int64
func (*GetMerchantPaymentConfigListRequest) GetPrivateKey ¶
func (x *GetMerchantPaymentConfigListRequest) GetPrivateKey() string
func (*GetMerchantPaymentConfigListRequest) GetSerialNo ¶
func (x *GetMerchantPaymentConfigListRequest) GetSerialNo() string
func (*GetMerchantPaymentConfigListRequest) GetStatus ¶
func (x *GetMerchantPaymentConfigListRequest) GetStatus() uint32
func (*GetMerchantPaymentConfigListRequest) ProtoMessage ¶
func (*GetMerchantPaymentConfigListRequest) ProtoMessage()
func (*GetMerchantPaymentConfigListRequest) ProtoReflect ¶
func (x *GetMerchantPaymentConfigListRequest) ProtoReflect() protoreflect.Message
func (*GetMerchantPaymentConfigListRequest) Reset ¶
func (x *GetMerchantPaymentConfigListRequest) Reset()
func (*GetMerchantPaymentConfigListRequest) String ¶
func (x *GetMerchantPaymentConfigListRequest) String() string
type GetMerchantPaymentConfigRequest ¶
type GetMerchantPaymentConfigRequest struct { AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // 微信支付应用ID Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // 主键ID IncludeDeleted bool `protobuf:"varint,3,opt,name=include_deleted,json=includeDeleted,proto3" json:"include_deleted,omitempty"` // 是否已包含删除的 // contains filtered or unexported fields }
请求查询支付配置的消息
func (*GetMerchantPaymentConfigRequest) Descriptor
deprecated
func (*GetMerchantPaymentConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetMerchantPaymentConfigRequest.ProtoReflect.Descriptor instead.
func (*GetMerchantPaymentConfigRequest) GetAppId ¶
func (x *GetMerchantPaymentConfigRequest) GetAppId() string
func (*GetMerchantPaymentConfigRequest) GetId ¶
func (x *GetMerchantPaymentConfigRequest) GetId() uint64
func (*GetMerchantPaymentConfigRequest) GetIncludeDeleted ¶
func (x *GetMerchantPaymentConfigRequest) GetIncludeDeleted() bool
func (*GetMerchantPaymentConfigRequest) ProtoMessage ¶
func (*GetMerchantPaymentConfigRequest) ProtoMessage()
func (*GetMerchantPaymentConfigRequest) ProtoReflect ¶
func (x *GetMerchantPaymentConfigRequest) ProtoReflect() protoreflect.Message
func (*GetMerchantPaymentConfigRequest) Reset ¶
func (x *GetMerchantPaymentConfigRequest) Reset()
func (*GetMerchantPaymentConfigRequest) String ¶
func (x *GetMerchantPaymentConfigRequest) String() string
type PayClient ¶
type PayClient interface { // 添加支付配置 AddMerchantPaymentConfig(ctx context.Context, in *AddMerchantPaymentConfigRequest, opts ...grpc.CallOption) (*Reply, error) // 获取单挑配置 GetMerchantPaymentConfig(ctx context.Context, in *GetMerchantPaymentConfigRequest, opts ...grpc.CallOption) (*Reply, error) // 获取配置列表 GetMerchantPaymentConfigList(ctx context.Context, in *GetMerchantPaymentConfigListRequest, opts ...grpc.CallOption) (*Reply, error) // 删除配置 DeleteMerchantPaymentConfig(ctx context.Context, in *DeleteMerchantPaymentConfigRequest, opts ...grpc.CallOption) (*Reply, error) // 发起支付 Payment(ctx context.Context, in *PaymentRequest, opts ...grpc.CallOption) (*Reply, error) // 异步接受微信通知 WechatNotify(ctx context.Context, in *WechatNotifyRequest, opts ...grpc.CallOption) (*V3NotifyRsp, error) // 异步接受微信通知 UserWithdraw(ctx context.Context, in *WechatNotifyRequest, opts ...grpc.CallOption) (*V3NotifyRsp, error) }
PayClient is the client API for Pay service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPayClient ¶
func NewPayClient(cc grpc.ClientConnInterface) PayClient
type PayHTTPClient ¶
type PayHTTPClient interface { AddMerchantPaymentConfig(ctx context.Context, req *AddMerchantPaymentConfigRequest, opts ...http.CallOption) (rsp *Reply, err error) DeleteMerchantPaymentConfig(ctx context.Context, req *DeleteMerchantPaymentConfigRequest, opts ...http.CallOption) (rsp *Reply, err error) GetMerchantPaymentConfig(ctx context.Context, req *GetMerchantPaymentConfigRequest, opts ...http.CallOption) (rsp *Reply, err error) GetMerchantPaymentConfigList(ctx context.Context, req *GetMerchantPaymentConfigListRequest, opts ...http.CallOption) (rsp *Reply, err error) Payment(ctx context.Context, req *PaymentRequest, opts ...http.CallOption) (rsp *Reply, err error) UserWithdraw(ctx context.Context, req *WechatNotifyRequest, opts ...http.CallOption) (rsp *V3NotifyRsp, err error) WechatNotify(ctx context.Context, req *WechatNotifyRequest, opts ...http.CallOption) (rsp *V3NotifyRsp, err error) }
func NewPayHTTPClient ¶
func NewPayHTTPClient(client *http.Client) PayHTTPClient
type PayHTTPClientImpl ¶
type PayHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*PayHTTPClientImpl) AddMerchantPaymentConfig ¶
func (c *PayHTTPClientImpl) AddMerchantPaymentConfig(ctx context.Context, in *AddMerchantPaymentConfigRequest, opts ...http.CallOption) (*Reply, error)
func (*PayHTTPClientImpl) DeleteMerchantPaymentConfig ¶
func (c *PayHTTPClientImpl) DeleteMerchantPaymentConfig(ctx context.Context, in *DeleteMerchantPaymentConfigRequest, opts ...http.CallOption) (*Reply, error)
func (*PayHTTPClientImpl) GetMerchantPaymentConfig ¶
func (c *PayHTTPClientImpl) GetMerchantPaymentConfig(ctx context.Context, in *GetMerchantPaymentConfigRequest, opts ...http.CallOption) (*Reply, error)
func (*PayHTTPClientImpl) GetMerchantPaymentConfigList ¶
func (c *PayHTTPClientImpl) GetMerchantPaymentConfigList(ctx context.Context, in *GetMerchantPaymentConfigListRequest, opts ...http.CallOption) (*Reply, error)
func (*PayHTTPClientImpl) Payment ¶
func (c *PayHTTPClientImpl) Payment(ctx context.Context, in *PaymentRequest, opts ...http.CallOption) (*Reply, error)
func (*PayHTTPClientImpl) UserWithdraw ¶
func (c *PayHTTPClientImpl) UserWithdraw(ctx context.Context, in *WechatNotifyRequest, opts ...http.CallOption) (*V3NotifyRsp, error)
func (*PayHTTPClientImpl) WechatNotify ¶
func (c *PayHTTPClientImpl) WechatNotify(ctx context.Context, in *WechatNotifyRequest, opts ...http.CallOption) (*V3NotifyRsp, error)
type PayHTTPServer ¶
type PayHTTPServer interface { // AddMerchantPaymentConfig 添加支付配置 AddMerchantPaymentConfig(context.Context, *AddMerchantPaymentConfigRequest) (*Reply, error) // DeleteMerchantPaymentConfig 删除配置 DeleteMerchantPaymentConfig(context.Context, *DeleteMerchantPaymentConfigRequest) (*Reply, error) // GetMerchantPaymentConfig 获取单挑配置 GetMerchantPaymentConfig(context.Context, *GetMerchantPaymentConfigRequest) (*Reply, error) // GetMerchantPaymentConfigList 获取配置列表 GetMerchantPaymentConfigList(context.Context, *GetMerchantPaymentConfigListRequest) (*Reply, error) // Payment 发起支付 Payment(context.Context, *PaymentRequest) (*Reply, error) // UserWithdraw 异步接受微信通知 UserWithdraw(context.Context, *WechatNotifyRequest) (*V3NotifyRsp, error) // WechatNotify 异步接受微信通知 WechatNotify(context.Context, *WechatNotifyRequest) (*V3NotifyRsp, error) }
type PayServer ¶
type PayServer interface { // 添加支付配置 AddMerchantPaymentConfig(context.Context, *AddMerchantPaymentConfigRequest) (*Reply, error) // 获取单挑配置 GetMerchantPaymentConfig(context.Context, *GetMerchantPaymentConfigRequest) (*Reply, error) // 获取配置列表 GetMerchantPaymentConfigList(context.Context, *GetMerchantPaymentConfigListRequest) (*Reply, error) // 删除配置 DeleteMerchantPaymentConfig(context.Context, *DeleteMerchantPaymentConfigRequest) (*Reply, error) // 发起支付 Payment(context.Context, *PaymentRequest) (*Reply, error) // 异步接受微信通知 WechatNotify(context.Context, *WechatNotifyRequest) (*V3NotifyRsp, error) // 异步接受微信通知 UserWithdraw(context.Context, *WechatNotifyRequest) (*V3NotifyRsp, error) // contains filtered or unexported methods }
PayServer is the server API for Pay service. All implementations must embed UnimplementedPayServer for forward compatibility.
type PaymentRequest ¶
type PaymentRequest struct { Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` // 支付金额(以分为单位,如100表示1元) AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // 微信支付应用ID OrderId string `protobuf:"bytes,3,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 商户订单号 OpenId string `protobuf:"bytes,4,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` // openID Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // 支付说明或备注 PaymentType string `protobuf:"bytes,6,opt,name=payment_type,json=paymentType,proto3" json:"payment_type,omitempty"` // 支付类型 // contains filtered or unexported fields }
发起支付请求
func (*PaymentRequest) Descriptor
deprecated
func (*PaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use PaymentRequest.ProtoReflect.Descriptor instead.
func (*PaymentRequest) GetAmount ¶
func (x *PaymentRequest) GetAmount() uint64
func (*PaymentRequest) GetAppId ¶
func (x *PaymentRequest) GetAppId() string
func (*PaymentRequest) GetDescription ¶
func (x *PaymentRequest) GetDescription() string
func (*PaymentRequest) GetOpenId ¶
func (x *PaymentRequest) GetOpenId() string
func (*PaymentRequest) GetOrderId ¶
func (x *PaymentRequest) GetOrderId() string
func (*PaymentRequest) GetPaymentType ¶
func (x *PaymentRequest) GetPaymentType() string
func (*PaymentRequest) ProtoMessage ¶
func (*PaymentRequest) ProtoMessage()
func (*PaymentRequest) ProtoReflect ¶
func (x *PaymentRequest) ProtoReflect() protoreflect.Message
func (*PaymentRequest) Reset ¶
func (x *PaymentRequest) Reset()
func (*PaymentRequest) String ¶
func (x *PaymentRequest) String() string
type Reply ¶
type Reply struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // 状态码 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 提示信息 Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // json字符串 // contains filtered or unexported fields }
func (*Reply) ProtoReflect ¶
func (x *Reply) ProtoReflect() protoreflect.Message
type Resource ¶
type Resource struct { OriginalType string `protobuf:"bytes,1,opt,name=original_type,json=originalType,proto3" json:"original_type,omitempty"` // 原始类型 Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // 加密算法 Ciphertext string `protobuf:"bytes,3,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` // 密文 AssociatedData string `protobuf:"bytes,4,opt,name=associated_data,json=associatedData,proto3" json:"associated_data,omitempty"` // 关联数据 Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` // 随机数 // contains filtered or unexported fields }
资源对象
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
type UnimplementedPayServer ¶
type UnimplementedPayServer struct{}
UnimplementedPayServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPayServer) AddMerchantPaymentConfig ¶
func (UnimplementedPayServer) AddMerchantPaymentConfig(context.Context, *AddMerchantPaymentConfigRequest) (*Reply, error)
func (UnimplementedPayServer) DeleteMerchantPaymentConfig ¶
func (UnimplementedPayServer) DeleteMerchantPaymentConfig(context.Context, *DeleteMerchantPaymentConfigRequest) (*Reply, error)
func (UnimplementedPayServer) GetMerchantPaymentConfig ¶
func (UnimplementedPayServer) GetMerchantPaymentConfig(context.Context, *GetMerchantPaymentConfigRequest) (*Reply, error)
func (UnimplementedPayServer) GetMerchantPaymentConfigList ¶
func (UnimplementedPayServer) GetMerchantPaymentConfigList(context.Context, *GetMerchantPaymentConfigListRequest) (*Reply, error)
func (UnimplementedPayServer) Payment ¶
func (UnimplementedPayServer) Payment(context.Context, *PaymentRequest) (*Reply, error)
func (UnimplementedPayServer) UserWithdraw ¶
func (UnimplementedPayServer) UserWithdraw(context.Context, *WechatNotifyRequest) (*V3NotifyRsp, error)
func (UnimplementedPayServer) WechatNotify ¶
func (UnimplementedPayServer) WechatNotify(context.Context, *WechatNotifyRequest) (*V3NotifyRsp, error)
type UnsafePayServer ¶
type UnsafePayServer interface {
// contains filtered or unexported methods
}
UnsafePayServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PayServer will result in compilation errors.
type V3NotifyRsp ¶
type V3NotifyRsp struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 响应码 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 响应消息 // contains filtered or unexported fields }
V3NotifyRsp 表示通知响应消息
func (*V3NotifyRsp) Descriptor
deprecated
func (*V3NotifyRsp) Descriptor() ([]byte, []int)
Deprecated: Use V3NotifyRsp.ProtoReflect.Descriptor instead.
func (*V3NotifyRsp) GetCode ¶
func (x *V3NotifyRsp) GetCode() string
func (*V3NotifyRsp) GetMessage ¶
func (x *V3NotifyRsp) GetMessage() string
func (*V3NotifyRsp) ProtoMessage ¶
func (*V3NotifyRsp) ProtoMessage()
func (*V3NotifyRsp) ProtoReflect ¶
func (x *V3NotifyRsp) ProtoReflect() protoreflect.Message
func (*V3NotifyRsp) Reset ¶
func (x *V3NotifyRsp) Reset()
func (*V3NotifyRsp) String ¶
func (x *V3NotifyRsp) String() string
type WechatNotifyRequest ¶
type WechatNotifyRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 事件 ID CreateTime string `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // 创建时间 ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` // 资源类型 EventType string `protobuf:"bytes,4,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` // 事件类型 Summary string `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary,omitempty"` // 事件描述 Resource *Resource `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` // 资源对象 AppId string `protobuf:"bytes,7,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // APPID OutBatchNo string `protobuf:"bytes,8,opt,name=out_batch_no,json=outBatchNo,proto3" json:"out_batch_no,omitempty"` //out_batch_no // contains filtered or unexported fields }
事件通知
func (*WechatNotifyRequest) Descriptor
deprecated
func (*WechatNotifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use WechatNotifyRequest.ProtoReflect.Descriptor instead.
func (*WechatNotifyRequest) GetAppId ¶
func (x *WechatNotifyRequest) GetAppId() string
func (*WechatNotifyRequest) GetCreateTime ¶
func (x *WechatNotifyRequest) GetCreateTime() string
func (*WechatNotifyRequest) GetEventType ¶
func (x *WechatNotifyRequest) GetEventType() string
func (*WechatNotifyRequest) GetId ¶
func (x *WechatNotifyRequest) GetId() string
func (*WechatNotifyRequest) GetOutBatchNo ¶
func (x *WechatNotifyRequest) GetOutBatchNo() string
func (*WechatNotifyRequest) GetResource ¶
func (x *WechatNotifyRequest) GetResource() *Resource
func (*WechatNotifyRequest) GetResourceType ¶
func (x *WechatNotifyRequest) GetResourceType() string
func (*WechatNotifyRequest) GetSummary ¶
func (x *WechatNotifyRequest) GetSummary() string
func (*WechatNotifyRequest) ProtoMessage ¶
func (*WechatNotifyRequest) ProtoMessage()
func (*WechatNotifyRequest) ProtoReflect ¶
func (x *WechatNotifyRequest) ProtoReflect() protoreflect.Message
func (*WechatNotifyRequest) Reset ¶
func (x *WechatNotifyRequest) Reset()
func (*WechatNotifyRequest) String ¶
func (x *WechatNotifyRequest) String() string