v1

package
v1.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const OperationPaymentAlipayNotify = "/api.public.payment.v1.Payment/AlipayNotify"
View Source
const OperationPaymentEPayNotify = "/api.public.payment.v1.Payment/EPayNotify"
View Source
const OperationPaymentGetAvailablePaymentMethods = "/api.public.payment.v1.Payment/GetAvailablePaymentMethods"
View Source
const OperationPaymentStripeNotify = "/api.public.payment.v1.Payment/StripeNotify"

Variables

View Source
var File_public_payment_v1_payment_proto protoreflect.FileDescriptor
View Source
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

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

Cause function returns cause value.

func (AlipayNotifyReplyValidationError) Error

Error satisfies the builtin error interface

func (AlipayNotifyReplyValidationError) ErrorName

ErrorName returns error name.

func (AlipayNotifyReplyValidationError) Field

Field function returns field value.

func (AlipayNotifyReplyValidationError) Key

Key function returns key value.

func (AlipayNotifyReplyValidationError) Reason

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

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

Cause function returns cause value.

func (AlipayNotifyRequestValidationError) Error

Error satisfies the builtin error interface

func (AlipayNotifyRequestValidationError) ErrorName

ErrorName returns error name.

func (AlipayNotifyRequestValidationError) Field

Field function returns field value.

func (AlipayNotifyRequestValidationError) Key

Key function returns key value.

func (AlipayNotifyRequestValidationError) Reason

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

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

Cause function returns cause value.

func (EPayNotifyReplyValidationError) Error

Error satisfies the builtin error interface

func (EPayNotifyReplyValidationError) ErrorName

func (e EPayNotifyReplyValidationError) ErrorName() string

ErrorName returns error name.

func (EPayNotifyReplyValidationError) Field

Field function returns field value.

func (EPayNotifyReplyValidationError) Key

Key function returns key value.

func (EPayNotifyReplyValidationError) Reason

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

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

Cause function returns cause value.

func (EPayNotifyRequestValidationError) Error

Error satisfies the builtin error interface

func (EPayNotifyRequestValidationError) ErrorName

ErrorName returns error name.

func (EPayNotifyRequestValidationError) Field

Field function returns field value.

func (EPayNotifyRequestValidationError) Key

Key function returns key value.

func (EPayNotifyRequestValidationError) Reason

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

AlipayNotify AlipayNotify 支付宝回调

func (*PaymentHTTPClientImpl) EPayNotify

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

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

Cause function returns cause value.

func (PaymentMethodValidationError) Error

Error satisfies the builtin error interface

func (PaymentMethodValidationError) ErrorName

func (e PaymentMethodValidationError) ErrorName() string

ErrorName returns error name.

func (PaymentMethodValidationError) Field

Field function returns field value.

func (PaymentMethodValidationError) Key

Key function returns key value.

func (PaymentMethodValidationError) Reason

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

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

Cause function returns cause value.

func (PaymentMethodsReplyValidationError) Error

Error satisfies the builtin error interface

func (PaymentMethodsReplyValidationError) ErrorName

ErrorName returns error name.

func (PaymentMethodsReplyValidationError) Field

Field function returns field value.

func (PaymentMethodsReplyValidationError) Key

Key function returns key value.

func (PaymentMethodsReplyValidationError) Reason

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

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

Cause function returns cause value.

func (StripeNotifyReplyValidationError) Error

Error satisfies the builtin error interface

func (StripeNotifyReplyValidationError) ErrorName

ErrorName returns error name.

func (StripeNotifyReplyValidationError) Field

Field function returns field value.

func (StripeNotifyReplyValidationError) Key

Key function returns key value.

func (StripeNotifyReplyValidationError) Reason

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

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

Cause function returns cause value.

func (StripeNotifyRequestValidationError) Error

Error satisfies the builtin error interface

func (StripeNotifyRequestValidationError) ErrorName

ErrorName returns error name.

func (StripeNotifyRequestValidationError) Field

Field function returns field value.

func (StripeNotifyRequestValidationError) Key

Key function returns key value.

func (StripeNotifyRequestValidationError) Reason

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) EPayNotify

func (UnimplementedPaymentServer) GetAvailablePaymentMethods

func (UnimplementedPaymentServer) StripeNotify

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL