Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPaymentHTTPServer(s *http.Server, srv PaymentHTTPServer)
- func RegisterPaymentServer(s grpc.ServiceRegistrar, srv PaymentServer)
- type AlipayNotifyReply
- func (*AlipayNotifyReply) Descriptor() ([]byte, []int)deprecated
- func (x *AlipayNotifyReply) GetResponse() string
- func (*AlipayNotifyReply) ProtoMessage()
- func (x *AlipayNotifyReply) ProtoReflect() protoreflect.Message
- func (x *AlipayNotifyReply) Reset()
- func (x *AlipayNotifyReply) String() string
- func (m *AlipayNotifyReply) Validate() error
- func (m *AlipayNotifyReply) ValidateAll() error
- type AlipayNotifyReplyMultiError
- type AlipayNotifyReplyValidationError
- func (e AlipayNotifyReplyValidationError) Cause() error
- func (e AlipayNotifyReplyValidationError) Error() string
- func (e AlipayNotifyReplyValidationError) ErrorName() string
- func (e AlipayNotifyReplyValidationError) Field() string
- func (e AlipayNotifyReplyValidationError) Key() bool
- func (e AlipayNotifyReplyValidationError) Reason() string
- type AlipayNotifyRequest
- func (*AlipayNotifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AlipayNotifyRequest) GetAppId() string
- func (x *AlipayNotifyRequest) GetAuthAppId() string
- func (x *AlipayNotifyRequest) GetBody() string
- func (x *AlipayNotifyRequest) GetBuyerPayAmount() string
- func (x *AlipayNotifyRequest) GetCharset() string
- func (x *AlipayNotifyRequest) GetExtraParams() map[string]string
- func (x *AlipayNotifyRequest) GetGmtCreate() string
- func (x *AlipayNotifyRequest) GetGmtPayment() string
- func (x *AlipayNotifyRequest) GetNotifyTime() string
- func (x *AlipayNotifyRequest) GetNotifyType() string
- func (x *AlipayNotifyRequest) GetOutTradeNo() string
- func (x *AlipayNotifyRequest) GetReceiptAmount() string
- func (x *AlipayNotifyRequest) GetSellerEmail() string
- func (x *AlipayNotifyRequest) GetSellerId() string
- func (x *AlipayNotifyRequest) GetSign() string
- func (x *AlipayNotifyRequest) GetSubject() string
- func (x *AlipayNotifyRequest) GetToken() string
- func (x *AlipayNotifyRequest) GetTotalAmount() string
- func (x *AlipayNotifyRequest) GetTradeNo() string
- func (x *AlipayNotifyRequest) GetTradeStatus() string
- func (x *AlipayNotifyRequest) GetVersion() string
- func (*AlipayNotifyRequest) ProtoMessage()
- func (x *AlipayNotifyRequest) ProtoReflect() protoreflect.Message
- func (x *AlipayNotifyRequest) Reset()
- func (x *AlipayNotifyRequest) String() string
- func (m *AlipayNotifyRequest) Validate() error
- func (m *AlipayNotifyRequest) ValidateAll() error
- type AlipayNotifyRequestMultiError
- type AlipayNotifyRequestValidationError
- func (e AlipayNotifyRequestValidationError) Cause() error
- func (e AlipayNotifyRequestValidationError) Error() string
- func (e AlipayNotifyRequestValidationError) ErrorName() string
- func (e AlipayNotifyRequestValidationError) Field() string
- func (e AlipayNotifyRequestValidationError) Key() bool
- func (e AlipayNotifyRequestValidationError) Reason() string
- type EPayNotifyReply
- func (*EPayNotifyReply) Descriptor() ([]byte, []int)deprecated
- func (x *EPayNotifyReply) GetResponse() string
- func (*EPayNotifyReply) ProtoMessage()
- func (x *EPayNotifyReply) ProtoReflect() protoreflect.Message
- func (x *EPayNotifyReply) Reset()
- func (x *EPayNotifyReply) String() string
- func (m *EPayNotifyReply) Validate() error
- func (m *EPayNotifyReply) ValidateAll() error
- type EPayNotifyReplyMultiError
- type EPayNotifyReplyValidationError
- func (e EPayNotifyReplyValidationError) Cause() error
- func (e EPayNotifyReplyValidationError) Error() string
- func (e EPayNotifyReplyValidationError) ErrorName() string
- func (e EPayNotifyReplyValidationError) Field() string
- func (e EPayNotifyReplyValidationError) Key() bool
- func (e EPayNotifyReplyValidationError) Reason() string
- type EPayNotifyRequest
- func (*EPayNotifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EPayNotifyRequest) GetExtraParams() map[string]string
- func (x *EPayNotifyRequest) GetMoney() string
- func (x *EPayNotifyRequest) GetName() string
- func (x *EPayNotifyRequest) GetOutTradeNo() string
- func (x *EPayNotifyRequest) GetParam() string
- func (x *EPayNotifyRequest) GetPid() string
- func (x *EPayNotifyRequest) GetSign() string
- func (x *EPayNotifyRequest) GetToken() string
- func (x *EPayNotifyRequest) GetTradeNo() string
- func (x *EPayNotifyRequest) GetTradeStatus() string
- func (x *EPayNotifyRequest) GetType() string
- func (*EPayNotifyRequest) ProtoMessage()
- func (x *EPayNotifyRequest) ProtoReflect() protoreflect.Message
- func (x *EPayNotifyRequest) Reset()
- func (x *EPayNotifyRequest) String() string
- func (m *EPayNotifyRequest) Validate() error
- func (m *EPayNotifyRequest) ValidateAll() error
- type EPayNotifyRequestMultiError
- type EPayNotifyRequestValidationError
- func (e EPayNotifyRequestValidationError) Cause() error
- func (e EPayNotifyRequestValidationError) Error() string
- func (e EPayNotifyRequestValidationError) ErrorName() string
- func (e EPayNotifyRequestValidationError) Field() string
- func (e EPayNotifyRequestValidationError) Key() bool
- func (e EPayNotifyRequestValidationError) Reason() string
- type PaymentClient
- type PaymentHTTPClient
- type PaymentHTTPClientImpl
- func (c *PaymentHTTPClientImpl) AlipayNotify(ctx context.Context, in *AlipayNotifyRequest, opts ...http.CallOption) (*AlipayNotifyReply, error)
- func (c *PaymentHTTPClientImpl) EPayNotify(ctx context.Context, in *EPayNotifyRequest, opts ...http.CallOption) (*EPayNotifyReply, error)
- func (c *PaymentHTTPClientImpl) GetAvailablePaymentMethods(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*PaymentMethodsReply, error)
- func (c *PaymentHTTPClientImpl) StripeNotify(ctx context.Context, in *StripeNotifyRequest, opts ...http.CallOption) (*StripeNotifyReply, error)
- type PaymentHTTPServer
- type PaymentMethod
- func (*PaymentMethod) Descriptor() ([]byte, []int)deprecated
- func (x *PaymentMethod) GetDescription() string
- func (x *PaymentMethod) GetFeeAmount() int64
- func (x *PaymentMethod) GetFeeMode() uint32
- func (x *PaymentMethod) GetFeePercent() int64
- func (x *PaymentMethod) GetIcon() string
- func (x *PaymentMethod) GetId() int64
- func (x *PaymentMethod) GetName() string
- func (x *PaymentMethod) GetPlatform() string
- func (*PaymentMethod) ProtoMessage()
- func (x *PaymentMethod) ProtoReflect() protoreflect.Message
- func (x *PaymentMethod) Reset()
- func (x *PaymentMethod) String() string
- func (m *PaymentMethod) Validate() error
- func (m *PaymentMethod) ValidateAll() error
- type PaymentMethodMultiError
- type PaymentMethodValidationError
- func (e PaymentMethodValidationError) Cause() error
- func (e PaymentMethodValidationError) Error() string
- func (e PaymentMethodValidationError) ErrorName() string
- func (e PaymentMethodValidationError) Field() string
- func (e PaymentMethodValidationError) Key() bool
- func (e PaymentMethodValidationError) Reason() string
- type PaymentMethodsReply
- func (*PaymentMethodsReply) Descriptor() ([]byte, []int)deprecated
- func (x *PaymentMethodsReply) GetList() []*PaymentMethod
- func (*PaymentMethodsReply) ProtoMessage()
- func (x *PaymentMethodsReply) ProtoReflect() protoreflect.Message
- func (x *PaymentMethodsReply) Reset()
- func (x *PaymentMethodsReply) String() string
- func (m *PaymentMethodsReply) Validate() error
- func (m *PaymentMethodsReply) ValidateAll() error
- type PaymentMethodsReplyMultiError
- type PaymentMethodsReplyValidationError
- func (e PaymentMethodsReplyValidationError) Cause() error
- func (e PaymentMethodsReplyValidationError) Error() string
- func (e PaymentMethodsReplyValidationError) ErrorName() string
- func (e PaymentMethodsReplyValidationError) Field() string
- func (e PaymentMethodsReplyValidationError) Key() bool
- func (e PaymentMethodsReplyValidationError) Reason() string
- type PaymentServer
- type StripeNotifyReply
- func (*StripeNotifyReply) Descriptor() ([]byte, []int)deprecated
- func (x *StripeNotifyReply) GetCode() int32
- func (x *StripeNotifyReply) GetMessage() string
- func (*StripeNotifyReply) ProtoMessage()
- func (x *StripeNotifyReply) ProtoReflect() protoreflect.Message
- func (x *StripeNotifyReply) Reset()
- func (x *StripeNotifyReply) String() string
- func (m *StripeNotifyReply) Validate() error
- func (m *StripeNotifyReply) ValidateAll() error
- type StripeNotifyReplyMultiError
- type StripeNotifyReplyValidationError
- func (e StripeNotifyReplyValidationError) Cause() error
- func (e StripeNotifyReplyValidationError) Error() string
- func (e StripeNotifyReplyValidationError) ErrorName() string
- func (e StripeNotifyReplyValidationError) Field() string
- func (e StripeNotifyReplyValidationError) Key() bool
- func (e StripeNotifyReplyValidationError) Reason() string
- type StripeNotifyRequest
- func (*StripeNotifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StripeNotifyRequest) GetPayload() []byte
- func (x *StripeNotifyRequest) GetStripeSignature() string
- func (x *StripeNotifyRequest) GetToken() string
- func (*StripeNotifyRequest) ProtoMessage()
- func (x *StripeNotifyRequest) ProtoReflect() protoreflect.Message
- func (x *StripeNotifyRequest) Reset()
- func (x *StripeNotifyRequest) String() string
- func (m *StripeNotifyRequest) Validate() error
- func (m *StripeNotifyRequest) ValidateAll() error
- type StripeNotifyRequestMultiError
- type StripeNotifyRequestValidationError
- func (e StripeNotifyRequestValidationError) Cause() error
- func (e StripeNotifyRequestValidationError) Error() string
- func (e StripeNotifyRequestValidationError) ErrorName() string
- func (e StripeNotifyRequestValidationError) Field() string
- func (e StripeNotifyRequestValidationError) Key() bool
- func (e StripeNotifyRequestValidationError) Reason() string
- type UnimplementedPaymentServer
- func (UnimplementedPaymentServer) AlipayNotify(context.Context, *AlipayNotifyRequest) (*AlipayNotifyReply, error)
- func (UnimplementedPaymentServer) EPayNotify(context.Context, *EPayNotifyRequest) (*EPayNotifyReply, error)
- func (UnimplementedPaymentServer) GetAvailablePaymentMethods(context.Context, *emptypb.Empty) (*PaymentMethodsReply, error)
- func (UnimplementedPaymentServer) StripeNotify(context.Context, *StripeNotifyRequest) (*StripeNotifyReply, error)
- type UnsafePaymentServer
Constants ¶
const ( Payment_GetAvailablePaymentMethods_FullMethodName = "/api.public.payment.v1.Payment/GetAvailablePaymentMethods" Payment_AlipayNotify_FullMethodName = "/api.public.payment.v1.Payment/AlipayNotify" Payment_EPayNotify_FullMethodName = "/api.public.payment.v1.Payment/EPayNotify" Payment_StripeNotify_FullMethodName = "/api.public.payment.v1.Payment/StripeNotify" )
const OperationPaymentAlipayNotify = "/api.public.payment.v1.Payment/AlipayNotify"
const OperationPaymentEPayNotify = "/api.public.payment.v1.Payment/EPayNotify"
const OperationPaymentGetAvailablePaymentMethods = "/api.public.payment.v1.Payment/GetAvailablePaymentMethods"
const OperationPaymentStripeNotify = "/api.public.payment.v1.Payment/StripeNotify"
Variables ¶
var File_public_payment_v1_payment_proto protoreflect.FileDescriptor
var Payment_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.public.payment.v1.Payment", HandlerType: (*PaymentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAvailablePaymentMethods", Handler: _Payment_GetAvailablePaymentMethods_Handler, }, { MethodName: "AlipayNotify", Handler: _Payment_AlipayNotify_Handler, }, { MethodName: "EPayNotify", Handler: _Payment_EPayNotify_Handler, }, { MethodName: "StripeNotify", Handler: _Payment_StripeNotify_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "public/payment/v1/payment.proto", }
Payment_ServiceDesc is the grpc.ServiceDesc for Payment service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPaymentHTTPServer ¶
func RegisterPaymentHTTPServer(s *http.Server, srv PaymentHTTPServer)
func RegisterPaymentServer ¶
func RegisterPaymentServer(s grpc.ServiceRegistrar, srv PaymentServer)
Types ¶
type AlipayNotifyReply ¶
type AlipayNotifyReply struct {
Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // 响应内容("success" 或 "failure")
// contains filtered or unexported fields
}
AlipayNotifyReply 支付宝回调响应
func (*AlipayNotifyReply) Descriptor
deprecated
func (*AlipayNotifyReply) Descriptor() ([]byte, []int)
Deprecated: Use AlipayNotifyReply.ProtoReflect.Descriptor instead.
func (*AlipayNotifyReply) GetResponse ¶
func (x *AlipayNotifyReply) GetResponse() string
func (*AlipayNotifyReply) ProtoMessage ¶
func (*AlipayNotifyReply) ProtoMessage()
func (*AlipayNotifyReply) ProtoReflect ¶
func (x *AlipayNotifyReply) ProtoReflect() protoreflect.Message
func (*AlipayNotifyReply) Reset ¶
func (x *AlipayNotifyReply) Reset()
func (*AlipayNotifyReply) String ¶
func (x *AlipayNotifyReply) String() string
func (*AlipayNotifyReply) Validate ¶
func (m *AlipayNotifyReply) Validate() error
Validate checks the field values on AlipayNotifyReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AlipayNotifyReply) ValidateAll ¶
func (m *AlipayNotifyReply) ValidateAll() error
ValidateAll checks the field values on AlipayNotifyReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AlipayNotifyReplyMultiError, or nil if none found.
type AlipayNotifyReplyMultiError ¶
type AlipayNotifyReplyMultiError []error
AlipayNotifyReplyMultiError is an error wrapping multiple validation errors returned by AlipayNotifyReply.ValidateAll() if the designated constraints aren't met.
func (AlipayNotifyReplyMultiError) AllErrors ¶
func (m AlipayNotifyReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AlipayNotifyReplyMultiError) Error ¶
func (m AlipayNotifyReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AlipayNotifyReplyValidationError ¶
type AlipayNotifyReplyValidationError struct {
// contains filtered or unexported fields
}
AlipayNotifyReplyValidationError is the validation error returned by AlipayNotifyReply.Validate if the designated constraints aren't met.
func (AlipayNotifyReplyValidationError) Cause ¶
func (e AlipayNotifyReplyValidationError) Cause() error
Cause function returns cause value.
func (AlipayNotifyReplyValidationError) Error ¶
func (e AlipayNotifyReplyValidationError) Error() string
Error satisfies the builtin error interface
func (AlipayNotifyReplyValidationError) ErrorName ¶
func (e AlipayNotifyReplyValidationError) ErrorName() string
ErrorName returns error name.
func (AlipayNotifyReplyValidationError) Field ¶
func (e AlipayNotifyReplyValidationError) Field() string
Field function returns field value.
func (AlipayNotifyReplyValidationError) Key ¶
func (e AlipayNotifyReplyValidationError) Key() bool
Key function returns key value.
func (AlipayNotifyReplyValidationError) Reason ¶
func (e AlipayNotifyReplyValidationError) Reason() string
Reason function returns reason value.
type AlipayNotifyRequest ¶
type AlipayNotifyRequest struct {
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 支付配置token (从URL路径提取)
TradeNo string `protobuf:"bytes,2,opt,name=trade_no,json=tradeNo,proto3" json:"trade_no,omitempty"` // 商户订单号
OutTradeNo string `protobuf:"bytes,3,opt,name=out_trade_no,json=outTradeNo,proto3" json:"out_trade_no,omitempty"` // 商户订单号
TradeStatus string `protobuf:"bytes,4,opt,name=trade_status,json=tradeStatus,proto3" json:"trade_status,omitempty"` // 交易状态
TotalAmount string `protobuf:"bytes,5,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount,omitempty"` // 交易金额
ReceiptAmount string `protobuf:"bytes,6,opt,name=receipt_amount,json=receiptAmount,proto3" json:"receipt_amount,omitempty"` // 实收金额
BuyerPayAmount string `protobuf:"bytes,7,opt,name=buyer_pay_amount,json=buyerPayAmount,proto3" json:"buyer_pay_amount,omitempty"` // 买家付款金额
Subject string `protobuf:"bytes,8,opt,name=subject,proto3" json:"subject,omitempty"` // 订单标题
Body string `protobuf:"bytes,9,opt,name=body,proto3" json:"body,omitempty"` // 订单描述
GmtCreate string `protobuf:"bytes,10,opt,name=gmt_create,json=gmtCreate,proto3" json:"gmt_create,omitempty"` // 交易创建时间
GmtPayment string `protobuf:"bytes,11,opt,name=gmt_payment,json=gmtPayment,proto3" json:"gmt_payment,omitempty"` // 交易付款时间
NotifyTime string `protobuf:"bytes,12,opt,name=notify_time,json=notifyTime,proto3" json:"notify_time,omitempty"` // 通知时间
AppId string `protobuf:"bytes,13,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` // 应用ID
SellerId string `protobuf:"bytes,14,opt,name=seller_id,json=sellerId,proto3" json:"seller_id,omitempty"` // 卖家ID
SellerEmail string `protobuf:"bytes,15,opt,name=seller_email,json=sellerEmail,proto3" json:"seller_email,omitempty"` // 卖家邮箱
NotifyType string `protobuf:"bytes,16,opt,name=notify_type,json=notifyType,proto3" json:"notify_type,omitempty"` // 通知类型
AuthAppId string `protobuf:"bytes,17,opt,name=auth_app_id,json=authAppId,proto3" json:"auth_app_id,omitempty"` // 授权应用ID
Charset string `protobuf:"bytes,18,opt,name=charset,proto3" json:"charset,omitempty"` // 编码格式
Version string `protobuf:"bytes,19,opt,name=version,proto3" json:"version,omitempty"` // 调用的接口版本
Sign string `protobuf:"bytes,20,opt,name=sign,proto3" json:"sign,omitempty"` // 签名
ExtraParams map[string]string `` // 额外参数
/* 183-byte string literal not displayed */
// contains filtered or unexported fields
}
AlipayNotifyRequest 支付宝回调请求
func (*AlipayNotifyRequest) Descriptor
deprecated
func (*AlipayNotifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use AlipayNotifyRequest.ProtoReflect.Descriptor instead.
func (*AlipayNotifyRequest) GetAppId ¶
func (x *AlipayNotifyRequest) GetAppId() string
func (*AlipayNotifyRequest) GetAuthAppId ¶
func (x *AlipayNotifyRequest) GetAuthAppId() string
func (*AlipayNotifyRequest) GetBody ¶
func (x *AlipayNotifyRequest) GetBody() string
func (*AlipayNotifyRequest) GetBuyerPayAmount ¶
func (x *AlipayNotifyRequest) GetBuyerPayAmount() string
func (*AlipayNotifyRequest) GetCharset ¶
func (x *AlipayNotifyRequest) GetCharset() string
func (*AlipayNotifyRequest) GetExtraParams ¶
func (x *AlipayNotifyRequest) GetExtraParams() map[string]string
func (*AlipayNotifyRequest) GetGmtCreate ¶
func (x *AlipayNotifyRequest) GetGmtCreate() string
func (*AlipayNotifyRequest) GetGmtPayment ¶
func (x *AlipayNotifyRequest) GetGmtPayment() string
func (*AlipayNotifyRequest) GetNotifyTime ¶
func (x *AlipayNotifyRequest) GetNotifyTime() string
func (*AlipayNotifyRequest) GetNotifyType ¶
func (x *AlipayNotifyRequest) GetNotifyType() string
func (*AlipayNotifyRequest) GetOutTradeNo ¶
func (x *AlipayNotifyRequest) GetOutTradeNo() string
func (*AlipayNotifyRequest) GetReceiptAmount ¶
func (x *AlipayNotifyRequest) GetReceiptAmount() string
func (*AlipayNotifyRequest) GetSellerEmail ¶
func (x *AlipayNotifyRequest) GetSellerEmail() string
func (*AlipayNotifyRequest) GetSellerId ¶
func (x *AlipayNotifyRequest) GetSellerId() string
func (*AlipayNotifyRequest) GetSign ¶
func (x *AlipayNotifyRequest) GetSign() string
func (*AlipayNotifyRequest) GetSubject ¶
func (x *AlipayNotifyRequest) GetSubject() string
func (*AlipayNotifyRequest) GetToken ¶
func (x *AlipayNotifyRequest) GetToken() string
func (*AlipayNotifyRequest) GetTotalAmount ¶
func (x *AlipayNotifyRequest) GetTotalAmount() string
func (*AlipayNotifyRequest) GetTradeNo ¶
func (x *AlipayNotifyRequest) GetTradeNo() string
func (*AlipayNotifyRequest) GetTradeStatus ¶
func (x *AlipayNotifyRequest) GetTradeStatus() string
func (*AlipayNotifyRequest) GetVersion ¶
func (x *AlipayNotifyRequest) GetVersion() string
func (*AlipayNotifyRequest) ProtoMessage ¶
func (*AlipayNotifyRequest) ProtoMessage()
func (*AlipayNotifyRequest) ProtoReflect ¶
func (x *AlipayNotifyRequest) ProtoReflect() protoreflect.Message
func (*AlipayNotifyRequest) Reset ¶
func (x *AlipayNotifyRequest) Reset()
func (*AlipayNotifyRequest) String ¶
func (x *AlipayNotifyRequest) String() string
func (*AlipayNotifyRequest) Validate ¶
func (m *AlipayNotifyRequest) Validate() error
Validate checks the field values on AlipayNotifyRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*AlipayNotifyRequest) ValidateAll ¶
func (m *AlipayNotifyRequest) ValidateAll() error
ValidateAll checks the field values on AlipayNotifyRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AlipayNotifyRequestMultiError, or nil if none found.
type AlipayNotifyRequestMultiError ¶
type AlipayNotifyRequestMultiError []error
AlipayNotifyRequestMultiError is an error wrapping multiple validation errors returned by AlipayNotifyRequest.ValidateAll() if the designated constraints aren't met.
func (AlipayNotifyRequestMultiError) AllErrors ¶
func (m AlipayNotifyRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AlipayNotifyRequestMultiError) Error ¶
func (m AlipayNotifyRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AlipayNotifyRequestValidationError ¶
type AlipayNotifyRequestValidationError struct {
// contains filtered or unexported fields
}
AlipayNotifyRequestValidationError is the validation error returned by AlipayNotifyRequest.Validate if the designated constraints aren't met.
func (AlipayNotifyRequestValidationError) Cause ¶
func (e AlipayNotifyRequestValidationError) Cause() error
Cause function returns cause value.
func (AlipayNotifyRequestValidationError) Error ¶
func (e AlipayNotifyRequestValidationError) Error() string
Error satisfies the builtin error interface
func (AlipayNotifyRequestValidationError) ErrorName ¶
func (e AlipayNotifyRequestValidationError) ErrorName() string
ErrorName returns error name.
func (AlipayNotifyRequestValidationError) Field ¶
func (e AlipayNotifyRequestValidationError) Field() string
Field function returns field value.
func (AlipayNotifyRequestValidationError) Key ¶
func (e AlipayNotifyRequestValidationError) Key() bool
Key function returns key value.
func (AlipayNotifyRequestValidationError) Reason ¶
func (e AlipayNotifyRequestValidationError) Reason() string
Reason function returns reason value.
type EPayNotifyReply ¶
type EPayNotifyReply struct {
Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // 响应内容("success" 或 "failure")
// contains filtered or unexported fields
}
EPayNotifyReply 易支付回调响应
func (*EPayNotifyReply) Descriptor
deprecated
func (*EPayNotifyReply) Descriptor() ([]byte, []int)
Deprecated: Use EPayNotifyReply.ProtoReflect.Descriptor instead.
func (*EPayNotifyReply) GetResponse ¶
func (x *EPayNotifyReply) GetResponse() string
func (*EPayNotifyReply) ProtoMessage ¶
func (*EPayNotifyReply) ProtoMessage()
func (*EPayNotifyReply) ProtoReflect ¶
func (x *EPayNotifyReply) ProtoReflect() protoreflect.Message
func (*EPayNotifyReply) Reset ¶
func (x *EPayNotifyReply) Reset()
func (*EPayNotifyReply) String ¶
func (x *EPayNotifyReply) String() string
func (*EPayNotifyReply) Validate ¶
func (m *EPayNotifyReply) Validate() error
Validate checks the field values on EPayNotifyReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*EPayNotifyReply) ValidateAll ¶
func (m *EPayNotifyReply) ValidateAll() error
ValidateAll checks the field values on EPayNotifyReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EPayNotifyReplyMultiError, or nil if none found.
type EPayNotifyReplyMultiError ¶
type EPayNotifyReplyMultiError []error
EPayNotifyReplyMultiError is an error wrapping multiple validation errors returned by EPayNotifyReply.ValidateAll() if the designated constraints aren't met.
func (EPayNotifyReplyMultiError) AllErrors ¶
func (m EPayNotifyReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EPayNotifyReplyMultiError) Error ¶
func (m EPayNotifyReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EPayNotifyReplyValidationError ¶
type EPayNotifyReplyValidationError struct {
// contains filtered or unexported fields
}
EPayNotifyReplyValidationError is the validation error returned by EPayNotifyReply.Validate if the designated constraints aren't met.
func (EPayNotifyReplyValidationError) Cause ¶
func (e EPayNotifyReplyValidationError) Cause() error
Cause function returns cause value.
func (EPayNotifyReplyValidationError) Error ¶
func (e EPayNotifyReplyValidationError) Error() string
Error satisfies the builtin error interface
func (EPayNotifyReplyValidationError) ErrorName ¶
func (e EPayNotifyReplyValidationError) ErrorName() string
ErrorName returns error name.
func (EPayNotifyReplyValidationError) Field ¶
func (e EPayNotifyReplyValidationError) Field() string
Field function returns field value.
func (EPayNotifyReplyValidationError) Key ¶
func (e EPayNotifyReplyValidationError) Key() bool
Key function returns key value.
func (EPayNotifyReplyValidationError) Reason ¶
func (e EPayNotifyReplyValidationError) Reason() string
Reason function returns reason value.
type EPayNotifyRequest ¶
type EPayNotifyRequest struct {
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 支付配置token (从URL路径提取)
Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"` // 商户ID
TradeNo string `protobuf:"bytes,3,opt,name=trade_no,json=tradeNo,proto3" json:"trade_no,omitempty"` // 商户订单号
OutTradeNo string `protobuf:"bytes,4,opt,name=out_trade_no,json=outTradeNo,proto3" json:"out_trade_no,omitempty"` // 商户订单号
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` // 支付方式(alipay, wxpay等)
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` // 商品名称
Money string `protobuf:"bytes,7,opt,name=money,proto3" json:"money,omitempty"` // 交易金额
TradeStatus string `protobuf:"bytes,8,opt,name=trade_status,json=tradeStatus,proto3" json:"trade_status,omitempty"` // 交易状态
Param string `protobuf:"bytes,9,opt,name=param,proto3" json:"param,omitempty"` // 自定义参数
Sign string `protobuf:"bytes,10,opt,name=sign,proto3" json:"sign,omitempty"` // 签名
ExtraParams map[string]string `` // 额外参数
/* 183-byte string literal not displayed */
// contains filtered or unexported fields
}
EPayNotifyRequest 易支付回调请求
func (*EPayNotifyRequest) Descriptor
deprecated
func (*EPayNotifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use EPayNotifyRequest.ProtoReflect.Descriptor instead.
func (*EPayNotifyRequest) GetExtraParams ¶
func (x *EPayNotifyRequest) GetExtraParams() map[string]string
func (*EPayNotifyRequest) GetMoney ¶
func (x *EPayNotifyRequest) GetMoney() string
func (*EPayNotifyRequest) GetName ¶
func (x *EPayNotifyRequest) GetName() string
func (*EPayNotifyRequest) GetOutTradeNo ¶
func (x *EPayNotifyRequest) GetOutTradeNo() string
func (*EPayNotifyRequest) GetParam ¶
func (x *EPayNotifyRequest) GetParam() string
func (*EPayNotifyRequest) GetPid ¶
func (x *EPayNotifyRequest) GetPid() string
func (*EPayNotifyRequest) GetSign ¶
func (x *EPayNotifyRequest) GetSign() string
func (*EPayNotifyRequest) GetToken ¶
func (x *EPayNotifyRequest) GetToken() string
func (*EPayNotifyRequest) GetTradeNo ¶
func (x *EPayNotifyRequest) GetTradeNo() string
func (*EPayNotifyRequest) GetTradeStatus ¶
func (x *EPayNotifyRequest) GetTradeStatus() string
func (*EPayNotifyRequest) GetType ¶
func (x *EPayNotifyRequest) GetType() string
func (*EPayNotifyRequest) ProtoMessage ¶
func (*EPayNotifyRequest) ProtoMessage()
func (*EPayNotifyRequest) ProtoReflect ¶
func (x *EPayNotifyRequest) ProtoReflect() protoreflect.Message
func (*EPayNotifyRequest) Reset ¶
func (x *EPayNotifyRequest) Reset()
func (*EPayNotifyRequest) String ¶
func (x *EPayNotifyRequest) String() string
func (*EPayNotifyRequest) Validate ¶
func (m *EPayNotifyRequest) Validate() error
Validate checks the field values on EPayNotifyRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*EPayNotifyRequest) ValidateAll ¶
func (m *EPayNotifyRequest) ValidateAll() error
ValidateAll checks the field values on EPayNotifyRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EPayNotifyRequestMultiError, or nil if none found.
type EPayNotifyRequestMultiError ¶
type EPayNotifyRequestMultiError []error
EPayNotifyRequestMultiError is an error wrapping multiple validation errors returned by EPayNotifyRequest.ValidateAll() if the designated constraints aren't met.
func (EPayNotifyRequestMultiError) AllErrors ¶
func (m EPayNotifyRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EPayNotifyRequestMultiError) Error ¶
func (m EPayNotifyRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EPayNotifyRequestValidationError ¶
type EPayNotifyRequestValidationError struct {
// contains filtered or unexported fields
}
EPayNotifyRequestValidationError is the validation error returned by EPayNotifyRequest.Validate if the designated constraints aren't met.
func (EPayNotifyRequestValidationError) Cause ¶
func (e EPayNotifyRequestValidationError) Cause() error
Cause function returns cause value.
func (EPayNotifyRequestValidationError) Error ¶
func (e EPayNotifyRequestValidationError) Error() string
Error satisfies the builtin error interface
func (EPayNotifyRequestValidationError) ErrorName ¶
func (e EPayNotifyRequestValidationError) ErrorName() string
ErrorName returns error name.
func (EPayNotifyRequestValidationError) Field ¶
func (e EPayNotifyRequestValidationError) Field() string
Field function returns field value.
func (EPayNotifyRequestValidationError) Key ¶
func (e EPayNotifyRequestValidationError) Key() bool
Key function returns key value.
func (EPayNotifyRequestValidationError) Reason ¶
func (e EPayNotifyRequestValidationError) Reason() string
Reason function returns reason value.
type PaymentClient ¶
type PaymentClient interface {
// GetAvailablePaymentMethods 获取可用支付方式
GetAvailablePaymentMethods(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PaymentMethodsReply, error)
// AlipayNotify 支付宝回调
AlipayNotify(ctx context.Context, in *AlipayNotifyRequest, opts ...grpc.CallOption) (*AlipayNotifyReply, error)
// EPayNotify 易支付回调
EPayNotify(ctx context.Context, in *EPayNotifyRequest, opts ...grpc.CallOption) (*EPayNotifyReply, error)
// StripeNotify Stripe回调
StripeNotify(ctx context.Context, in *StripeNotifyRequest, opts ...grpc.CallOption) (*StripeNotifyReply, error)
}
PaymentClient is the client API for Payment 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.
Payment service 支付服务(包含回调接口,不需要认证)
func NewPaymentClient ¶
func NewPaymentClient(cc grpc.ClientConnInterface) PaymentClient
type PaymentHTTPClient ¶
type PaymentHTTPClient interface {
// AlipayNotify AlipayNotify 支付宝回调
AlipayNotify(ctx context.Context, req *AlipayNotifyRequest, opts ...http.CallOption) (rsp *AlipayNotifyReply, err error)
// EPayNotify EPayNotify 易支付回调
EPayNotify(ctx context.Context, req *EPayNotifyRequest, opts ...http.CallOption) (rsp *EPayNotifyReply, err error)
// GetAvailablePaymentMethods GetAvailablePaymentMethods 获取可用支付方式
GetAvailablePaymentMethods(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *PaymentMethodsReply, err error)
// StripeNotify StripeNotify Stripe回调
StripeNotify(ctx context.Context, req *StripeNotifyRequest, opts ...http.CallOption) (rsp *StripeNotifyReply, err error)
}
func NewPaymentHTTPClient ¶
func NewPaymentHTTPClient(client *http.Client) PaymentHTTPClient
type PaymentHTTPClientImpl ¶
type PaymentHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*PaymentHTTPClientImpl) AlipayNotify ¶
func (c *PaymentHTTPClientImpl) AlipayNotify(ctx context.Context, in *AlipayNotifyRequest, opts ...http.CallOption) (*AlipayNotifyReply, error)
AlipayNotify AlipayNotify 支付宝回调
func (*PaymentHTTPClientImpl) EPayNotify ¶
func (c *PaymentHTTPClientImpl) EPayNotify(ctx context.Context, in *EPayNotifyRequest, opts ...http.CallOption) (*EPayNotifyReply, error)
EPayNotify EPayNotify 易支付回调
func (*PaymentHTTPClientImpl) GetAvailablePaymentMethods ¶
func (c *PaymentHTTPClientImpl) GetAvailablePaymentMethods(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*PaymentMethodsReply, error)
GetAvailablePaymentMethods GetAvailablePaymentMethods 获取可用支付方式
func (*PaymentHTTPClientImpl) StripeNotify ¶
func (c *PaymentHTTPClientImpl) StripeNotify(ctx context.Context, in *StripeNotifyRequest, opts ...http.CallOption) (*StripeNotifyReply, error)
StripeNotify StripeNotify Stripe回调
type PaymentHTTPServer ¶
type PaymentHTTPServer interface {
// AlipayNotify AlipayNotify 支付宝回调
AlipayNotify(context.Context, *AlipayNotifyRequest) (*AlipayNotifyReply, error)
// EPayNotify EPayNotify 易支付回调
EPayNotify(context.Context, *EPayNotifyRequest) (*EPayNotifyReply, error)
// GetAvailablePaymentMethods GetAvailablePaymentMethods 获取可用支付方式
GetAvailablePaymentMethods(context.Context, *emptypb.Empty) (*PaymentMethodsReply, error)
// StripeNotify StripeNotify Stripe回调
StripeNotify(context.Context, *StripeNotifyRequest) (*StripeNotifyReply, error)
}
type PaymentMethod ¶
type PaymentMethod struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Icon string `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"`
FeeMode uint32 `protobuf:"varint,6,opt,name=fee_mode,json=feeMode,proto3" json:"fee_mode,omitempty"`
FeePercent int64 `protobuf:"varint,7,opt,name=fee_percent,json=feePercent,proto3" json:"fee_percent,omitempty"`
FeeAmount int64 `protobuf:"varint,8,opt,name=fee_amount,json=feeAmount,proto3" json:"fee_amount,omitempty"`
// contains filtered or unexported fields
}
PaymentMethod 支付方式
func (*PaymentMethod) Descriptor
deprecated
func (*PaymentMethod) Descriptor() ([]byte, []int)
Deprecated: Use PaymentMethod.ProtoReflect.Descriptor instead.
func (*PaymentMethod) GetDescription ¶
func (x *PaymentMethod) GetDescription() string
func (*PaymentMethod) GetFeeAmount ¶
func (x *PaymentMethod) GetFeeAmount() int64
func (*PaymentMethod) GetFeeMode ¶
func (x *PaymentMethod) GetFeeMode() uint32
func (*PaymentMethod) GetFeePercent ¶
func (x *PaymentMethod) GetFeePercent() int64
func (*PaymentMethod) GetIcon ¶
func (x *PaymentMethod) GetIcon() string
func (*PaymentMethod) GetId ¶
func (x *PaymentMethod) GetId() int64
func (*PaymentMethod) GetName ¶
func (x *PaymentMethod) GetName() string
func (*PaymentMethod) GetPlatform ¶
func (x *PaymentMethod) GetPlatform() string
func (*PaymentMethod) ProtoMessage ¶
func (*PaymentMethod) ProtoMessage()
func (*PaymentMethod) ProtoReflect ¶
func (x *PaymentMethod) ProtoReflect() protoreflect.Message
func (*PaymentMethod) Reset ¶
func (x *PaymentMethod) Reset()
func (*PaymentMethod) String ¶
func (x *PaymentMethod) String() string
func (*PaymentMethod) Validate ¶
func (m *PaymentMethod) Validate() error
Validate checks the field values on PaymentMethod with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*PaymentMethod) ValidateAll ¶
func (m *PaymentMethod) ValidateAll() error
ValidateAll checks the field values on PaymentMethod with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaymentMethodMultiError, or nil if none found.
type PaymentMethodMultiError ¶
type PaymentMethodMultiError []error
PaymentMethodMultiError is an error wrapping multiple validation errors returned by PaymentMethod.ValidateAll() if the designated constraints aren't met.
func (PaymentMethodMultiError) AllErrors ¶
func (m PaymentMethodMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PaymentMethodMultiError) Error ¶
func (m PaymentMethodMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PaymentMethodValidationError ¶
type PaymentMethodValidationError struct {
// contains filtered or unexported fields
}
PaymentMethodValidationError is the validation error returned by PaymentMethod.Validate if the designated constraints aren't met.
func (PaymentMethodValidationError) Cause ¶
func (e PaymentMethodValidationError) Cause() error
Cause function returns cause value.
func (PaymentMethodValidationError) Error ¶
func (e PaymentMethodValidationError) Error() string
Error satisfies the builtin error interface
func (PaymentMethodValidationError) ErrorName ¶
func (e PaymentMethodValidationError) ErrorName() string
ErrorName returns error name.
func (PaymentMethodValidationError) Field ¶
func (e PaymentMethodValidationError) Field() string
Field function returns field value.
func (PaymentMethodValidationError) Key ¶
func (e PaymentMethodValidationError) Key() bool
Key function returns key value.
func (PaymentMethodValidationError) Reason ¶
func (e PaymentMethodValidationError) Reason() string
Reason function returns reason value.
type PaymentMethodsReply ¶
type PaymentMethodsReply struct {
List []*PaymentMethod `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
// contains filtered or unexported fields
}
PaymentMethodsReply 获取可用支付方式响应
func (*PaymentMethodsReply) Descriptor
deprecated
func (*PaymentMethodsReply) Descriptor() ([]byte, []int)
Deprecated: Use PaymentMethodsReply.ProtoReflect.Descriptor instead.
func (*PaymentMethodsReply) GetList ¶
func (x *PaymentMethodsReply) GetList() []*PaymentMethod
func (*PaymentMethodsReply) ProtoMessage ¶
func (*PaymentMethodsReply) ProtoMessage()
func (*PaymentMethodsReply) ProtoReflect ¶
func (x *PaymentMethodsReply) ProtoReflect() protoreflect.Message
func (*PaymentMethodsReply) Reset ¶
func (x *PaymentMethodsReply) Reset()
func (*PaymentMethodsReply) String ¶
func (x *PaymentMethodsReply) String() string
func (*PaymentMethodsReply) Validate ¶
func (m *PaymentMethodsReply) Validate() error
Validate checks the field values on PaymentMethodsReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*PaymentMethodsReply) ValidateAll ¶
func (m *PaymentMethodsReply) ValidateAll() error
ValidateAll checks the field values on PaymentMethodsReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaymentMethodsReplyMultiError, or nil if none found.
type PaymentMethodsReplyMultiError ¶
type PaymentMethodsReplyMultiError []error
PaymentMethodsReplyMultiError is an error wrapping multiple validation errors returned by PaymentMethodsReply.ValidateAll() if the designated constraints aren't met.
func (PaymentMethodsReplyMultiError) AllErrors ¶
func (m PaymentMethodsReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PaymentMethodsReplyMultiError) Error ¶
func (m PaymentMethodsReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PaymentMethodsReplyValidationError ¶
type PaymentMethodsReplyValidationError struct {
// contains filtered or unexported fields
}
PaymentMethodsReplyValidationError is the validation error returned by PaymentMethodsReply.Validate if the designated constraints aren't met.
func (PaymentMethodsReplyValidationError) Cause ¶
func (e PaymentMethodsReplyValidationError) Cause() error
Cause function returns cause value.
func (PaymentMethodsReplyValidationError) Error ¶
func (e PaymentMethodsReplyValidationError) Error() string
Error satisfies the builtin error interface
func (PaymentMethodsReplyValidationError) ErrorName ¶
func (e PaymentMethodsReplyValidationError) ErrorName() string
ErrorName returns error name.
func (PaymentMethodsReplyValidationError) Field ¶
func (e PaymentMethodsReplyValidationError) Field() string
Field function returns field value.
func (PaymentMethodsReplyValidationError) Key ¶
func (e PaymentMethodsReplyValidationError) Key() bool
Key function returns key value.
func (PaymentMethodsReplyValidationError) Reason ¶
func (e PaymentMethodsReplyValidationError) Reason() string
Reason function returns reason value.
type PaymentServer ¶
type PaymentServer interface {
// GetAvailablePaymentMethods 获取可用支付方式
GetAvailablePaymentMethods(context.Context, *emptypb.Empty) (*PaymentMethodsReply, error)
// AlipayNotify 支付宝回调
AlipayNotify(context.Context, *AlipayNotifyRequest) (*AlipayNotifyReply, error)
// EPayNotify 易支付回调
EPayNotify(context.Context, *EPayNotifyRequest) (*EPayNotifyReply, error)
// StripeNotify Stripe回调
StripeNotify(context.Context, *StripeNotifyRequest) (*StripeNotifyReply, error)
// contains filtered or unexported methods
}
PaymentServer is the server API for Payment service. All implementations must embed UnimplementedPaymentServer for forward compatibility.
Payment service 支付服务(包含回调接口,不需要认证)
type StripeNotifyReply ¶
type StripeNotifyReply struct {
Code int32 `protobuf:"varint,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
}
StripeNotifyReply Stripe回调响应
func (*StripeNotifyReply) Descriptor
deprecated
func (*StripeNotifyReply) Descriptor() ([]byte, []int)
Deprecated: Use StripeNotifyReply.ProtoReflect.Descriptor instead.
func (*StripeNotifyReply) GetCode ¶
func (x *StripeNotifyReply) GetCode() int32
func (*StripeNotifyReply) GetMessage ¶
func (x *StripeNotifyReply) GetMessage() string
func (*StripeNotifyReply) ProtoMessage ¶
func (*StripeNotifyReply) ProtoMessage()
func (*StripeNotifyReply) ProtoReflect ¶
func (x *StripeNotifyReply) ProtoReflect() protoreflect.Message
func (*StripeNotifyReply) Reset ¶
func (x *StripeNotifyReply) Reset()
func (*StripeNotifyReply) String ¶
func (x *StripeNotifyReply) String() string
func (*StripeNotifyReply) Validate ¶
func (m *StripeNotifyReply) Validate() error
Validate checks the field values on StripeNotifyReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*StripeNotifyReply) ValidateAll ¶
func (m *StripeNotifyReply) ValidateAll() error
ValidateAll checks the field values on StripeNotifyReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StripeNotifyReplyMultiError, or nil if none found.
type StripeNotifyReplyMultiError ¶
type StripeNotifyReplyMultiError []error
StripeNotifyReplyMultiError is an error wrapping multiple validation errors returned by StripeNotifyReply.ValidateAll() if the designated constraints aren't met.
func (StripeNotifyReplyMultiError) AllErrors ¶
func (m StripeNotifyReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (StripeNotifyReplyMultiError) Error ¶
func (m StripeNotifyReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type StripeNotifyReplyValidationError ¶
type StripeNotifyReplyValidationError struct {
// contains filtered or unexported fields
}
StripeNotifyReplyValidationError is the validation error returned by StripeNotifyReply.Validate if the designated constraints aren't met.
func (StripeNotifyReplyValidationError) Cause ¶
func (e StripeNotifyReplyValidationError) Cause() error
Cause function returns cause value.
func (StripeNotifyReplyValidationError) Error ¶
func (e StripeNotifyReplyValidationError) Error() string
Error satisfies the builtin error interface
func (StripeNotifyReplyValidationError) ErrorName ¶
func (e StripeNotifyReplyValidationError) ErrorName() string
ErrorName returns error name.
func (StripeNotifyReplyValidationError) Field ¶
func (e StripeNotifyReplyValidationError) Field() string
Field function returns field value.
func (StripeNotifyReplyValidationError) Key ¶
func (e StripeNotifyReplyValidationError) Key() bool
Key function returns key value.
func (StripeNotifyReplyValidationError) Reason ¶
func (e StripeNotifyReplyValidationError) Reason() string
Reason function returns reason value.
type StripeNotifyRequest ¶
type StripeNotifyRequest struct {
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 支付配置token (从URL路径提取)
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // 回调载荷(JSON)
StripeSignature string `protobuf:"bytes,3,opt,name=stripe_signature,json=stripeSignature,proto3" json:"stripe_signature,omitempty"` // Stripe签名(Stripe-Signature头)
// contains filtered or unexported fields
}
StripeNotifyRequest Stripe回调请求
func (*StripeNotifyRequest) Descriptor
deprecated
func (*StripeNotifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use StripeNotifyRequest.ProtoReflect.Descriptor instead.
func (*StripeNotifyRequest) GetPayload ¶
func (x *StripeNotifyRequest) GetPayload() []byte
func (*StripeNotifyRequest) GetStripeSignature ¶
func (x *StripeNotifyRequest) GetStripeSignature() string
func (*StripeNotifyRequest) GetToken ¶
func (x *StripeNotifyRequest) GetToken() string
func (*StripeNotifyRequest) ProtoMessage ¶
func (*StripeNotifyRequest) ProtoMessage()
func (*StripeNotifyRequest) ProtoReflect ¶
func (x *StripeNotifyRequest) ProtoReflect() protoreflect.Message
func (*StripeNotifyRequest) Reset ¶
func (x *StripeNotifyRequest) Reset()
func (*StripeNotifyRequest) String ¶
func (x *StripeNotifyRequest) String() string
func (*StripeNotifyRequest) Validate ¶
func (m *StripeNotifyRequest) Validate() error
Validate checks the field values on StripeNotifyRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*StripeNotifyRequest) ValidateAll ¶
func (m *StripeNotifyRequest) ValidateAll() error
ValidateAll checks the field values on StripeNotifyRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in StripeNotifyRequestMultiError, or nil if none found.
type StripeNotifyRequestMultiError ¶
type StripeNotifyRequestMultiError []error
StripeNotifyRequestMultiError is an error wrapping multiple validation errors returned by StripeNotifyRequest.ValidateAll() if the designated constraints aren't met.
func (StripeNotifyRequestMultiError) AllErrors ¶
func (m StripeNotifyRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (StripeNotifyRequestMultiError) Error ¶
func (m StripeNotifyRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type StripeNotifyRequestValidationError ¶
type StripeNotifyRequestValidationError struct {
// contains filtered or unexported fields
}
StripeNotifyRequestValidationError is the validation error returned by StripeNotifyRequest.Validate if the designated constraints aren't met.
func (StripeNotifyRequestValidationError) Cause ¶
func (e StripeNotifyRequestValidationError) Cause() error
Cause function returns cause value.
func (StripeNotifyRequestValidationError) Error ¶
func (e StripeNotifyRequestValidationError) Error() string
Error satisfies the builtin error interface
func (StripeNotifyRequestValidationError) ErrorName ¶
func (e StripeNotifyRequestValidationError) ErrorName() string
ErrorName returns error name.
func (StripeNotifyRequestValidationError) Field ¶
func (e StripeNotifyRequestValidationError) Field() string
Field function returns field value.
func (StripeNotifyRequestValidationError) Key ¶
func (e StripeNotifyRequestValidationError) Key() bool
Key function returns key value.
func (StripeNotifyRequestValidationError) Reason ¶
func (e StripeNotifyRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedPaymentServer ¶
type UnimplementedPaymentServer struct{}
UnimplementedPaymentServer 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 (UnimplementedPaymentServer) AlipayNotify ¶
func (UnimplementedPaymentServer) AlipayNotify(context.Context, *AlipayNotifyRequest) (*AlipayNotifyReply, error)
func (UnimplementedPaymentServer) EPayNotify ¶
func (UnimplementedPaymentServer) EPayNotify(context.Context, *EPayNotifyRequest) (*EPayNotifyReply, error)
func (UnimplementedPaymentServer) GetAvailablePaymentMethods ¶
func (UnimplementedPaymentServer) GetAvailablePaymentMethods(context.Context, *emptypb.Empty) (*PaymentMethodsReply, error)
func (UnimplementedPaymentServer) StripeNotify ¶
func (UnimplementedPaymentServer) StripeNotify(context.Context, *StripeNotifyRequest) (*StripeNotifyReply, error)
type UnsafePaymentServer ¶
type UnsafePaymentServer interface {
// contains filtered or unexported methods
}
UnsafePaymentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PaymentServer will result in compilation errors.