pay_business

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package pay_business is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	RetCode_name = map[int32]string{
		0:       "SUCCESS",
		500:     "ERROR",
		50001:   "USER_NOT_EXIST",
		50002:   "USER_EXIST",
		50003:   "MERCHANT_NOT_EXIST",
		50004:   "MERCHANT_EXIST",
		50005:   "SHOP_NOT_EXIST",
		50006:   "SHOP_EXIST",
		50007:   "SKU_NOT_EXIST",
		50008:   "SKU_EXIST",
		50009:   "SKU_AMOUNT_NOT_ENOUGH",
		600000:  "USER_BALANCE_NOT_ENOUGH",
		6000001: "MERCHANT_BALANCE_NOT_ENOUGH",
		6000002: "ACCOUNT_LOCK",
		6000003: "MERCHANT_ACCOUNT_NOT_EXIST",
		6000004: "MERCHANT_ACCOUNT_STATE_LOCK",
		6000005: "USER_ACCOUNT_NOT_EXIST",
		6000006: "USER_ACCOUNT_STATE_LOCK",
		6000007: "DECIMAL_PARSE_ERR",
		6000008: "TRANSACTION_FAILED",
		6000009: "ACCOUNT_EXIST",
		6000010: "TRADE_PAY_RUN",
		6000011: "TRADE_PAY_SUCCESS",
		6000012: "TRADE_PAY_EXPIRE",
		6000013: "TRADE_ORDER_NOT_MATCH_USER",
		6000014: "USER_ACCOUNT_STATE_INVALID",
		6000015: "USER_CHARGE_RECORD_EXIST",
		6000016: "TRADE_UUID_EMPTY",
	}
	RetCode_value = map[string]int32{
		"SUCCESS":                     0,
		"ERROR":                       500,
		"USER_NOT_EXIST":              50001,
		"USER_EXIST":                  50002,
		"MERCHANT_NOT_EXIST":          50003,
		"MERCHANT_EXIST":              50004,
		"SHOP_NOT_EXIST":              50005,
		"SHOP_EXIST":                  50006,
		"SKU_NOT_EXIST":               50007,
		"SKU_EXIST":                   50008,
		"SKU_AMOUNT_NOT_ENOUGH":       50009,
		"USER_BALANCE_NOT_ENOUGH":     600000,
		"MERCHANT_BALANCE_NOT_ENOUGH": 6000001,
		"ACCOUNT_LOCK":                6000002,
		"MERCHANT_ACCOUNT_NOT_EXIST":  6000003,
		"MERCHANT_ACCOUNT_STATE_LOCK": 6000004,
		"USER_ACCOUNT_NOT_EXIST":      6000005,
		"USER_ACCOUNT_STATE_LOCK":     6000006,
		"DECIMAL_PARSE_ERR":           6000007,
		"TRANSACTION_FAILED":          6000008,
		"ACCOUNT_EXIST":               6000009,
		"TRADE_PAY_RUN":               6000010,
		"TRADE_PAY_SUCCESS":           6000011,
		"TRADE_PAY_EXPIRE":            6000012,
		"TRADE_ORDER_NOT_MATCH_USER":  6000013,
		"USER_ACCOUNT_STATE_INVALID":  6000014,
		"USER_CHARGE_RECORD_EXIST":    6000015,
		"TRADE_UUID_EMPTY":            6000016,
	}
)

Enum value maps for RetCode.

View Source
var (
	OperationType_name = map[int32]string{
		0: "CREATE",
		1: "UPDATE",
		2: "DELETE",
		3: "AUDIT",
		4: "PUT_AWAY",
	}
	OperationType_value = map[string]int32{
		"CREATE":   0,
		"UPDATE":   1,
		"DELETE":   2,
		"AUDIT":    3,
		"PUT_AWAY": 4,
	}
)

Enum value maps for OperationType.

View Source
var (
	CoinType_name = map[int32]string{
		0: "CNY",
		1: "USD",
	}
	CoinType_value = map[string]int32{
		"CNY": 0,
		"USD": 1,
	}
)

Enum value maps for CoinType.

View Source
var (
	AccountType_name = map[int32]string{
		0: "Person",
		1: "Company",
		2: "System",
	}
	AccountType_value = map[string]int32{
		"Person":  0,
		"Company": 1,
		"System":  2,
	}
)

Enum value maps for AccountType.

View Source
var (
	TradeType_name = map[int32]string{
		0: "PAY",
		1: "CHARGE",
	}
	TradeType_value = map[string]int32{
		"PAY":    0,
		"CHARGE": 1,
	}
)

Enum value maps for TradeType.

View Source
var File_proto_micro_mall_pay_proto_pay_business_pay_business_proto protoreflect.FileDescriptor

Functions

func RegisterPayBusinessServiceHandler

func RegisterPayBusinessServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterPayBusinessServiceHandler registers the http handlers for service PayBusinessService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterPayBusinessServiceHandlerClient

func RegisterPayBusinessServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PayBusinessServiceClient) error

RegisterPayBusinessServiceHandlerClient registers the http handlers for service PayBusinessService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PayBusinessServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PayBusinessServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PayBusinessServiceClient" to call the correct interceptors.

func RegisterPayBusinessServiceHandlerFromEndpoint

func RegisterPayBusinessServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterPayBusinessServiceHandlerFromEndpoint is same as RegisterPayBusinessServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterPayBusinessServiceHandlerServer

func RegisterPayBusinessServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PayBusinessServiceServer) error

RegisterPayBusinessServiceHandlerServer registers the http handlers for service PayBusinessService to "mux". UnaryRPC :call PayBusinessServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterPayBusinessServiceHandlerFromEndpoint instead.

func RegisterPayBusinessServiceServer

func RegisterPayBusinessServiceServer(s *grpc.Server, srv PayBusinessServiceServer)

Types

type AccountChargeRequest

type AccountChargeRequest struct {
	Owner       []string       `protobuf:"bytes,1,rep,name=owner,proto3" json:"owner,omitempty"`                                                               // 必填
	AccountType AccountType    `protobuf:"varint,2,opt,name=account_type,json=accountType,proto3,enum=pay_business.AccountType" json:"account_type,omitempty"` // 选填
	CoinType    CoinType       `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pay_business.CoinType" json:"coin_type,omitempty"`             // 选填
	Amount      string         `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`                                                             // 数量
	OutTradeNo  string         `protobuf:"bytes,5,opt,name=out_trade_no,json=outTradeNo,proto3" json:"out_trade_no,omitempty"`
	OpMeta      *OperationMeta `protobuf:"bytes,199,opt,name=op_meta,json=opMeta,proto3" json:"op_meta,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountChargeRequest) Descriptor deprecated

func (*AccountChargeRequest) Descriptor() ([]byte, []int)

Deprecated: Use AccountChargeRequest.ProtoReflect.Descriptor instead.

func (*AccountChargeRequest) GetAccountType

func (x *AccountChargeRequest) GetAccountType() AccountType

func (*AccountChargeRequest) GetAmount

func (x *AccountChargeRequest) GetAmount() string

func (*AccountChargeRequest) GetCoinType

func (x *AccountChargeRequest) GetCoinType() CoinType

func (*AccountChargeRequest) GetOpMeta

func (x *AccountChargeRequest) GetOpMeta() *OperationMeta

func (*AccountChargeRequest) GetOutTradeNo

func (x *AccountChargeRequest) GetOutTradeNo() string

func (*AccountChargeRequest) GetOwner

func (x *AccountChargeRequest) GetOwner() []string

func (*AccountChargeRequest) ProtoMessage

func (*AccountChargeRequest) ProtoMessage()

func (*AccountChargeRequest) ProtoReflect

func (x *AccountChargeRequest) ProtoReflect() protoreflect.Message

func (*AccountChargeRequest) Reset

func (x *AccountChargeRequest) Reset()

func (*AccountChargeRequest) String

func (x *AccountChargeRequest) String() string

type AccountChargeResponse

type AccountChargeResponse struct {
	Common *CommonResponse `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` // 全部充值成功或失败
	// contains filtered or unexported fields
}

func (*AccountChargeResponse) Descriptor deprecated

func (*AccountChargeResponse) Descriptor() ([]byte, []int)

Deprecated: Use AccountChargeResponse.ProtoReflect.Descriptor instead.

func (*AccountChargeResponse) GetCommon

func (x *AccountChargeResponse) GetCommon() *CommonResponse

func (*AccountChargeResponse) ProtoMessage

func (*AccountChargeResponse) ProtoMessage()

func (*AccountChargeResponse) ProtoReflect

func (x *AccountChargeResponse) ProtoReflect() protoreflect.Message

func (*AccountChargeResponse) Reset

func (x *AccountChargeResponse) Reset()

func (*AccountChargeResponse) String

func (x *AccountChargeResponse) String() string

type AccountEntry

type AccountEntry struct {
	Owner       string      `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	AccountType AccountType `protobuf:"varint,2,opt,name=account_type,json=accountType,proto3,enum=pay_business.AccountType" json:"account_type,omitempty"`
	CoinType    CoinType    `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pay_business.CoinType" json:"coin_type,omitempty"`
	Balance     string      `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountEntry) Descriptor deprecated

func (*AccountEntry) Descriptor() ([]byte, []int)

Deprecated: Use AccountEntry.ProtoReflect.Descriptor instead.

func (*AccountEntry) GetAccountType

func (x *AccountEntry) GetAccountType() AccountType

func (*AccountEntry) GetBalance

func (x *AccountEntry) GetBalance() string

func (*AccountEntry) GetCoinType

func (x *AccountEntry) GetCoinType() CoinType

func (*AccountEntry) GetOwner

func (x *AccountEntry) GetOwner() string

func (*AccountEntry) ProtoMessage

func (*AccountEntry) ProtoMessage()

func (*AccountEntry) ProtoReflect

func (x *AccountEntry) ProtoReflect() protoreflect.Message

func (*AccountEntry) Reset

func (x *AccountEntry) Reset()

func (*AccountEntry) String

func (x *AccountEntry) String() string

type AccountType

type AccountType int32
const (
	AccountType_Person  AccountType = 0
	AccountType_Company AccountType = 1
	AccountType_System  AccountType = 2
)

func (AccountType) Descriptor

func (AccountType) Enum

func (x AccountType) Enum() *AccountType

func (AccountType) EnumDescriptor deprecated

func (AccountType) EnumDescriptor() ([]byte, []int)

Deprecated: Use AccountType.Descriptor instead.

func (AccountType) Number

func (x AccountType) Number() protoreflect.EnumNumber

func (AccountType) String

func (x AccountType) String() string

func (AccountType) Type

type CoinType

type CoinType int32
const (
	CoinType_CNY CoinType = 0
	CoinType_USD CoinType = 1
)

func (CoinType) Descriptor

func (CoinType) Descriptor() protoreflect.EnumDescriptor

func (CoinType) Enum

func (x CoinType) Enum() *CoinType

func (CoinType) EnumDescriptor deprecated

func (CoinType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CoinType.Descriptor instead.

func (CoinType) Number

func (x CoinType) Number() protoreflect.EnumNumber

func (CoinType) String

func (x CoinType) String() string

func (CoinType) Type

type CommonResponse

type CommonResponse struct {
	Code RetCode `protobuf:"varint,1,opt,name=code,proto3,enum=pay_business.RetCode" json:"code,omitempty"`
	Msg  string  `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*CommonResponse) Descriptor deprecated

func (*CommonResponse) Descriptor() ([]byte, []int)

Deprecated: Use CommonResponse.ProtoReflect.Descriptor instead.

func (*CommonResponse) GetCode

func (x *CommonResponse) GetCode() RetCode

func (*CommonResponse) GetMsg

func (x *CommonResponse) GetMsg() string

func (*CommonResponse) ProtoMessage

func (*CommonResponse) ProtoMessage()

func (*CommonResponse) ProtoReflect

func (x *CommonResponse) ProtoReflect() protoreflect.Message

func (*CommonResponse) Reset

func (x *CommonResponse) Reset()

func (*CommonResponse) String

func (x *CommonResponse) String() string

type CreateAccountRequest

type CreateAccountRequest struct {
	Owner       string      `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	AccountType AccountType `protobuf:"varint,2,opt,name=account_type,json=accountType,proto3,enum=pay_business.AccountType" json:"account_type,omitempty"`
	CoinType    CoinType    `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pay_business.CoinType" json:"coin_type,omitempty"`
	Balance     string      `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateAccountRequest) Descriptor deprecated

func (*CreateAccountRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead.

func (*CreateAccountRequest) GetAccountType

func (x *CreateAccountRequest) GetAccountType() AccountType

func (*CreateAccountRequest) GetBalance

func (x *CreateAccountRequest) GetBalance() string

func (*CreateAccountRequest) GetCoinType

func (x *CreateAccountRequest) GetCoinType() CoinType

func (*CreateAccountRequest) GetOwner

func (x *CreateAccountRequest) GetOwner() string

func (*CreateAccountRequest) ProtoMessage

func (*CreateAccountRequest) ProtoMessage()

func (*CreateAccountRequest) ProtoReflect

func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message

func (*CreateAccountRequest) Reset

func (x *CreateAccountRequest) Reset()

func (*CreateAccountRequest) String

func (x *CreateAccountRequest) String() string

type CreateAccountResponse

type CreateAccountResponse struct {
	Common      *CommonResponse `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
	AccountCode string          `protobuf:"bytes,2,opt,name=account_code,json=accountCode,proto3" json:"account_code,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateAccountResponse) Descriptor deprecated

func (*CreateAccountResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateAccountResponse.ProtoReflect.Descriptor instead.

func (*CreateAccountResponse) GetAccountCode

func (x *CreateAccountResponse) GetAccountCode() string

func (*CreateAccountResponse) GetCommon

func (x *CreateAccountResponse) GetCommon() *CommonResponse

func (*CreateAccountResponse) ProtoMessage

func (*CreateAccountResponse) ProtoMessage()

func (*CreateAccountResponse) ProtoReflect

func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message

func (*CreateAccountResponse) Reset

func (x *CreateAccountResponse) Reset()

func (*CreateAccountResponse) String

func (x *CreateAccountResponse) String() string

type FindAccountRequest

type FindAccountRequest struct {
	Owner       []string    `protobuf:"bytes,1,rep,name=owner,proto3" json:"owner,omitempty"`                                                               // 必填
	AccountType AccountType `protobuf:"varint,2,opt,name=account_type,json=accountType,proto3,enum=pay_business.AccountType" json:"account_type,omitempty"` // 选填
	CoinType    CoinType    `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=pay_business.CoinType" json:"coin_type,omitempty"`             // 选填
	// contains filtered or unexported fields
}

func (*FindAccountRequest) Descriptor deprecated

func (*FindAccountRequest) Descriptor() ([]byte, []int)

Deprecated: Use FindAccountRequest.ProtoReflect.Descriptor instead.

func (*FindAccountRequest) GetAccountType

func (x *FindAccountRequest) GetAccountType() AccountType

func (*FindAccountRequest) GetCoinType

func (x *FindAccountRequest) GetCoinType() CoinType

func (*FindAccountRequest) GetOwner

func (x *FindAccountRequest) GetOwner() []string

func (*FindAccountRequest) ProtoMessage

func (*FindAccountRequest) ProtoMessage()

func (*FindAccountRequest) ProtoReflect

func (x *FindAccountRequest) ProtoReflect() protoreflect.Message

func (*FindAccountRequest) Reset

func (x *FindAccountRequest) Reset()

func (*FindAccountRequest) String

func (x *FindAccountRequest) String() string

type FindAccountResponse

type FindAccountResponse struct {
	Common    *CommonResponse `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
	EntryList []*AccountEntry `protobuf:"bytes,2,rep,name=entry_list,json=entryList,proto3" json:"entry_list,omitempty"`
	// contains filtered or unexported fields
}

func (*FindAccountResponse) Descriptor deprecated

func (*FindAccountResponse) Descriptor() ([]byte, []int)

Deprecated: Use FindAccountResponse.ProtoReflect.Descriptor instead.

func (*FindAccountResponse) GetCommon

func (x *FindAccountResponse) GetCommon() *CommonResponse

func (*FindAccountResponse) GetEntryList

func (x *FindAccountResponse) GetEntryList() []*AccountEntry

func (*FindAccountResponse) ProtoMessage

func (*FindAccountResponse) ProtoMessage()

func (*FindAccountResponse) ProtoReflect

func (x *FindAccountResponse) ProtoReflect() protoreflect.Message

func (*FindAccountResponse) Reset

func (x *FindAccountResponse) Reset()

func (*FindAccountResponse) String

func (x *FindAccountResponse) String() string

type GetTradeUUIDRequest

type GetTradeUUIDRequest struct {
	TradeType TradeType `protobuf:"varint,1,opt,name=trade_type,json=tradeType,proto3,enum=pay_business.TradeType" json:"trade_type,omitempty"`
	ClientId  string    `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	Uid       int64     `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTradeUUIDRequest) Descriptor deprecated

func (*GetTradeUUIDRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetTradeUUIDRequest.ProtoReflect.Descriptor instead.

func (*GetTradeUUIDRequest) GetClientId

func (x *GetTradeUUIDRequest) GetClientId() string

func (*GetTradeUUIDRequest) GetTradeType

func (x *GetTradeUUIDRequest) GetTradeType() TradeType

func (*GetTradeUUIDRequest) GetUid

func (x *GetTradeUUIDRequest) GetUid() int64

func (*GetTradeUUIDRequest) ProtoMessage

func (*GetTradeUUIDRequest) ProtoMessage()

func (*GetTradeUUIDRequest) ProtoReflect

func (x *GetTradeUUIDRequest) ProtoReflect() protoreflect.Message

func (*GetTradeUUIDRequest) Reset

func (x *GetTradeUUIDRequest) Reset()

func (*GetTradeUUIDRequest) String

func (x *GetTradeUUIDRequest) String() string

type GetTradeUUIDResponse

type GetTradeUUIDResponse struct {
	Common *CommonResponse `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
	Uuid   string          `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTradeUUIDResponse) Descriptor deprecated

func (*GetTradeUUIDResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetTradeUUIDResponse.ProtoReflect.Descriptor instead.

func (*GetTradeUUIDResponse) GetCommon

func (x *GetTradeUUIDResponse) GetCommon() *CommonResponse

func (*GetTradeUUIDResponse) GetUuid

func (x *GetTradeUUIDResponse) GetUuid() string

func (*GetTradeUUIDResponse) ProtoMessage

func (*GetTradeUUIDResponse) ProtoMessage()

func (*GetTradeUUIDResponse) ProtoReflect

func (x *GetTradeUUIDResponse) ProtoReflect() protoreflect.Message

func (*GetTradeUUIDResponse) Reset

func (x *GetTradeUUIDResponse) Reset()

func (*GetTradeUUIDResponse) String

func (x *GetTradeUUIDResponse) String() string

type OperationMeta

type OperationMeta struct {
	OpUid      int64  `protobuf:"varint,1,opt,name=op_uid,json=opUid,proto3" json:"op_uid,omitempty"`
	OpIp       string `protobuf:"bytes,2,opt,name=op_ip,json=opIp,proto3" json:"op_ip,omitempty"`
	OpPlatform string `protobuf:"bytes,3,opt,name=op_platform,json=opPlatform,proto3" json:"op_platform,omitempty"` // 操作平台
	OpDevice   string `protobuf:"bytes,4,opt,name=op_device,json=opDevice,proto3" json:"op_device,omitempty"`       // 操作设备
	// contains filtered or unexported fields
}

func (*OperationMeta) Descriptor deprecated

func (*OperationMeta) Descriptor() ([]byte, []int)

Deprecated: Use OperationMeta.ProtoReflect.Descriptor instead.

func (*OperationMeta) GetOpDevice

func (x *OperationMeta) GetOpDevice() string

func (*OperationMeta) GetOpIp

func (x *OperationMeta) GetOpIp() string

func (*OperationMeta) GetOpPlatform

func (x *OperationMeta) GetOpPlatform() string

func (*OperationMeta) GetOpUid

func (x *OperationMeta) GetOpUid() int64

func (*OperationMeta) ProtoMessage

func (*OperationMeta) ProtoMessage()

func (*OperationMeta) ProtoReflect

func (x *OperationMeta) ProtoReflect() protoreflect.Message

func (*OperationMeta) Reset

func (x *OperationMeta) Reset()

func (*OperationMeta) String

func (x *OperationMeta) String() string

type OperationType

type OperationType int32
const (
	OperationType_CREATE   OperationType = 0
	OperationType_UPDATE   OperationType = 1
	OperationType_DELETE   OperationType = 2
	OperationType_AUDIT    OperationType = 3
	OperationType_PUT_AWAY OperationType = 4
)

func (OperationType) Descriptor

func (OperationType) Enum

func (x OperationType) Enum() *OperationType

func (OperationType) EnumDescriptor deprecated

func (OperationType) EnumDescriptor() ([]byte, []int)

Deprecated: Use OperationType.Descriptor instead.

func (OperationType) Number

func (OperationType) String

func (x OperationType) String() string

func (OperationType) Type

type PayBusinessServiceClient

type PayBusinessServiceClient interface {
	// 统一收单支付
	TradePay(ctx context.Context, in *TradePayRequest, opts ...grpc.CallOption) (*TradePayResponse, error)
	// 创建账户
	CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...grpc.CallOption) (*CreateAccountResponse, error)
	// 获取账户
	FindAccount(ctx context.Context, in *FindAccountRequest, opts ...grpc.CallOption) (*FindAccountResponse, error)
	// 账户充值
	AccountCharge(ctx context.Context, in *AccountChargeRequest, opts ...grpc.CallOption) (*AccountChargeResponse, error)
	// 获取交易唯一ID
	GetTradeUUID(ctx context.Context, in *GetTradeUUIDRequest, opts ...grpc.CallOption) (*GetTradeUUIDResponse, error)
}

PayBusinessServiceClient is the client API for PayBusinessService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type PayBusinessServiceServer

type PayBusinessServiceServer interface {
	// 统一收单支付
	TradePay(context.Context, *TradePayRequest) (*TradePayResponse, error)
	// 创建账户
	CreateAccount(context.Context, *CreateAccountRequest) (*CreateAccountResponse, error)
	// 获取账户
	FindAccount(context.Context, *FindAccountRequest) (*FindAccountResponse, error)
	// 账户充值
	AccountCharge(context.Context, *AccountChargeRequest) (*AccountChargeResponse, error)
	// 获取交易唯一ID
	GetTradeUUID(context.Context, *GetTradeUUIDRequest) (*GetTradeUUIDResponse, error)
}

PayBusinessServiceServer is the server API for PayBusinessService service.

type RetCode

type RetCode int32
const (
	RetCode_SUCCESS                     RetCode = 0
	RetCode_ERROR                       RetCode = 500
	RetCode_USER_NOT_EXIST              RetCode = 50001
	RetCode_USER_EXIST                  RetCode = 50002
	RetCode_MERCHANT_NOT_EXIST          RetCode = 50003
	RetCode_MERCHANT_EXIST              RetCode = 50004
	RetCode_SHOP_NOT_EXIST              RetCode = 50005
	RetCode_SHOP_EXIST                  RetCode = 50006
	RetCode_SKU_NOT_EXIST               RetCode = 50007
	RetCode_SKU_EXIST                   RetCode = 50008
	RetCode_SKU_AMOUNT_NOT_ENOUGH       RetCode = 50009
	RetCode_USER_BALANCE_NOT_ENOUGH     RetCode = 600000
	RetCode_MERCHANT_BALANCE_NOT_ENOUGH RetCode = 6000001
	RetCode_ACCOUNT_LOCK                RetCode = 6000002
	RetCode_MERCHANT_ACCOUNT_NOT_EXIST  RetCode = 6000003
	RetCode_MERCHANT_ACCOUNT_STATE_LOCK RetCode = 6000004
	RetCode_USER_ACCOUNT_NOT_EXIST      RetCode = 6000005
	RetCode_USER_ACCOUNT_STATE_LOCK     RetCode = 6000006
	RetCode_DECIMAL_PARSE_ERR           RetCode = 6000007
	RetCode_TRANSACTION_FAILED          RetCode = 6000008
	RetCode_ACCOUNT_EXIST               RetCode = 6000009
	RetCode_TRADE_PAY_RUN               RetCode = 6000010
	RetCode_TRADE_PAY_SUCCESS           RetCode = 6000011
	RetCode_TRADE_PAY_EXPIRE            RetCode = 6000012
	RetCode_TRADE_ORDER_NOT_MATCH_USER  RetCode = 6000013
	RetCode_USER_ACCOUNT_STATE_INVALID  RetCode = 6000014
	RetCode_USER_CHARGE_RECORD_EXIST    RetCode = 6000015
	RetCode_TRADE_UUID_EMPTY            RetCode = 6000016
)

func (RetCode) Descriptor

func (RetCode) Descriptor() protoreflect.EnumDescriptor

func (RetCode) Enum

func (x RetCode) Enum() *RetCode

func (RetCode) EnumDescriptor deprecated

func (RetCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use RetCode.Descriptor instead.

func (RetCode) Number

func (x RetCode) Number() protoreflect.EnumNumber

func (RetCode) String

func (x RetCode) String() string

func (RetCode) Type

func (RetCode) Type() protoreflect.EnumType

type TradeGoodsDetail

type TradeGoodsDetail struct {
	Amount    string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`       // 需要支付数量
	Reduction string `protobuf:"bytes,2,opt,name=reduction,proto3" json:"reduction,omitempty"` // 满减
	// contains filtered or unexported fields
}

func (*TradeGoodsDetail) Descriptor deprecated

func (*TradeGoodsDetail) Descriptor() ([]byte, []int)

Deprecated: Use TradeGoodsDetail.ProtoReflect.Descriptor instead.

func (*TradeGoodsDetail) GetAmount

func (x *TradeGoodsDetail) GetAmount() string

func (*TradeGoodsDetail) GetReduction

func (x *TradeGoodsDetail) GetReduction() string

func (*TradeGoodsDetail) ProtoMessage

func (*TradeGoodsDetail) ProtoMessage()

func (*TradeGoodsDetail) ProtoReflect

func (x *TradeGoodsDetail) ProtoReflect() protoreflect.Message

func (*TradeGoodsDetail) Reset

func (x *TradeGoodsDetail) Reset()

func (*TradeGoodsDetail) String

func (x *TradeGoodsDetail) String() string

type TradePayEntry

type TradePayEntry struct {
	OutTradeNo  string            `protobuf:"bytes,1,opt,name=out_trade_no,json=outTradeNo,proto3" json:"out_trade_no,omitempty"` // 外部订单号
	TimeExpire  string            `protobuf:"bytes,2,opt,name=time_expire,json=timeExpire,proto3" json:"time_expire,omitempty"`   // 交易结束时间, 格式为 2018-06-08T10:34:56+08:00
	NotifyUrl   string            `protobuf:"bytes,3,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"`      // 交易通知地址, 通知URL必须为get请求,不携带body
	Description string            `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`                   // 商品描述
	Merchant    string            `protobuf:"bytes,5,opt,name=merchant,proto3" json:"merchant,omitempty"`                         // 商户code
	Attach      string            `protobuf:"bytes,6,opt,name=attach,proto3" json:"attach,omitempty"`                             // 附加数据,在支付和查询body中原样返回
	Detail      *TradeGoodsDetail `protobuf:"bytes,199,opt,name=detail,proto3" json:"detail,omitempty"`
	// contains filtered or unexported fields
}

func (*TradePayEntry) Descriptor deprecated

func (*TradePayEntry) Descriptor() ([]byte, []int)

Deprecated: Use TradePayEntry.ProtoReflect.Descriptor instead.

func (*TradePayEntry) GetAttach

func (x *TradePayEntry) GetAttach() string

func (*TradePayEntry) GetDescription

func (x *TradePayEntry) GetDescription() string

func (*TradePayEntry) GetDetail

func (x *TradePayEntry) GetDetail() *TradeGoodsDetail

func (*TradePayEntry) GetMerchant

func (x *TradePayEntry) GetMerchant() string

func (*TradePayEntry) GetNotifyUrl

func (x *TradePayEntry) GetNotifyUrl() string

func (*TradePayEntry) GetOutTradeNo

func (x *TradePayEntry) GetOutTradeNo() string

func (*TradePayEntry) GetTimeExpire

func (x *TradePayEntry) GetTimeExpire() string

func (*TradePayEntry) ProtoMessage

func (*TradePayEntry) ProtoMessage()

func (*TradePayEntry) ProtoReflect

func (x *TradePayEntry) ProtoReflect() protoreflect.Message

func (*TradePayEntry) Reset

func (x *TradePayEntry) Reset()

func (*TradePayEntry) String

func (x *TradePayEntry) String() string

type TradePayRequest

type TradePayRequest struct {
	Account   string           `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`                                               // 用户code
	CoinType  CoinType         `protobuf:"varint,2,opt,name=coin_type,json=coinType,proto3,enum=pay_business.CoinType" json:"coin_type,omitempty"` // 币种
	EntryList []*TradePayEntry `protobuf:"bytes,11,rep,name=entry_list,json=entryList,proto3" json:"entry_list,omitempty"`                         // 可以同时支付多个订单
	OpUid     int64            `protobuf:"varint,12,opt,name=op_uid,json=opUid,proto3" json:"op_uid,omitempty"`
	OpIp      string           `protobuf:"bytes,13,opt,name=op_ip,json=opIp,proto3" json:"op_ip,omitempty"`
	OutTxCode string           `protobuf:"bytes,15,opt,name=out_tx_code,json=outTxCode,proto3" json:"out_tx_code,omitempty"` // 外部交易号,如果只有一个订单则等于外部订单号
	// contains filtered or unexported fields
}

func (*TradePayRequest) Descriptor deprecated

func (*TradePayRequest) Descriptor() ([]byte, []int)

Deprecated: Use TradePayRequest.ProtoReflect.Descriptor instead.

func (*TradePayRequest) GetAccount

func (x *TradePayRequest) GetAccount() string

func (*TradePayRequest) GetCoinType

func (x *TradePayRequest) GetCoinType() CoinType

func (*TradePayRequest) GetEntryList

func (x *TradePayRequest) GetEntryList() []*TradePayEntry

func (*TradePayRequest) GetOpIp

func (x *TradePayRequest) GetOpIp() string

func (*TradePayRequest) GetOpUid

func (x *TradePayRequest) GetOpUid() int64

func (*TradePayRequest) GetOutTxCode

func (x *TradePayRequest) GetOutTxCode() string

func (*TradePayRequest) ProtoMessage

func (*TradePayRequest) ProtoMessage()

func (*TradePayRequest) ProtoReflect

func (x *TradePayRequest) ProtoReflect() protoreflect.Message

func (*TradePayRequest) Reset

func (x *TradePayRequest) Reset()

func (*TradePayRequest) String

func (x *TradePayRequest) String() string

type TradePayResponse

type TradePayResponse struct {
	Common  *CommonResponse `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"`
	TradeId string          `protobuf:"bytes,2,opt,name=trade_id,json=tradeId,proto3" json:"trade_id,omitempty"` // 支付ID,客户端需要存储
	// contains filtered or unexported fields
}

func (*TradePayResponse) Descriptor deprecated

func (*TradePayResponse) Descriptor() ([]byte, []int)

Deprecated: Use TradePayResponse.ProtoReflect.Descriptor instead.

func (*TradePayResponse) GetCommon

func (x *TradePayResponse) GetCommon() *CommonResponse

func (*TradePayResponse) GetTradeId

func (x *TradePayResponse) GetTradeId() string

func (*TradePayResponse) ProtoMessage

func (*TradePayResponse) ProtoMessage()

func (*TradePayResponse) ProtoReflect

func (x *TradePayResponse) ProtoReflect() protoreflect.Message

func (*TradePayResponse) Reset

func (x *TradePayResponse) Reset()

func (*TradePayResponse) String

func (x *TradePayResponse) String() string

type TradeType

type TradeType int32
const (
	TradeType_PAY    TradeType = 0
	TradeType_CHARGE TradeType = 1
)

func (TradeType) Descriptor

func (TradeType) Descriptor() protoreflect.EnumDescriptor

func (TradeType) Enum

func (x TradeType) Enum() *TradeType

func (TradeType) EnumDescriptor deprecated

func (TradeType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TradeType.Descriptor instead.

func (TradeType) Number

func (x TradeType) Number() protoreflect.EnumNumber

func (TradeType) String

func (x TradeType) String() string

func (TradeType) Type

type UnimplementedPayBusinessServiceServer

type UnimplementedPayBusinessServiceServer struct {
}

UnimplementedPayBusinessServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedPayBusinessServiceServer) AccountCharge

func (*UnimplementedPayBusinessServiceServer) CreateAccount

func (*UnimplementedPayBusinessServiceServer) FindAccount

func (*UnimplementedPayBusinessServiceServer) GetTradeUUID

func (*UnimplementedPayBusinessServiceServer) TradePay

Jump to

Keyboard shortcuts

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