payment

package
v2.16.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPaymentServiceEndpoints

func NewPaymentServiceEndpoints() []*api.Endpoint

func RegisterPaymentServiceHandler

func RegisterPaymentServiceHandler(s server.Server, hdlr PaymentServiceHandler, opts ...server.HandlerOption) error

Types

type CreateRequest

type CreateRequest struct {
	OrderUuid   string             `protobuf:"bytes,1,opt,name=order_uuid,json=orderUuid,proto3" json:"order_uuid,omitempty"`
	Url         *CreateRequest_Url `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	PaymentType string             `protobuf:"bytes,3,opt,name=payment_type,json=paymentType,proto3" json:"payment_type,omitempty"`
	MerchantId  string             `protobuf:"bytes,4,opt,name=merchant_id,json=merchantId,proto3" json:"merchant_id,omitempty"`
	Amount      float64            `protobuf:"fixed64,5,opt,name=amount,proto3" json:"amount,omitempty"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetAmount

func (m *CreateRequest) GetAmount() float64

func (*CreateRequest) GetMerchantId

func (m *CreateRequest) GetMerchantId() string

func (*CreateRequest) GetOrderUuid

func (m *CreateRequest) GetOrderUuid() string

func (*CreateRequest) GetPaymentType

func (m *CreateRequest) GetPaymentType() string

func (*CreateRequest) GetUrl

func (m *CreateRequest) GetUrl() *CreateRequest_Url

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) String

func (m *CreateRequest) String() string

func (*CreateRequest) Validate

func (m *CreateRequest) Validate() error

Validate checks the field values on CreateRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*CreateRequest) XXX_DiscardUnknown

func (m *CreateRequest) XXX_DiscardUnknown()

func (*CreateRequest) XXX_Marshal

func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateRequest) XXX_Merge

func (m *CreateRequest) XXX_Merge(src proto.Message)

func (*CreateRequest) XXX_Size

func (m *CreateRequest) XXX_Size() int

func (*CreateRequest) XXX_Unmarshal

func (m *CreateRequest) XXX_Unmarshal(b []byte) error

type CreateRequestValidationError

type CreateRequestValidationError struct {
	// contains filtered or unexported fields
}

CreateRequestValidationError is the validation error returned by CreateRequest.Validate if the designated constraints aren't met.

func (CreateRequestValidationError) Cause

Cause function returns cause value.

func (CreateRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateRequestValidationError) ErrorName

func (e CreateRequestValidationError) ErrorName() string

ErrorName returns error name.

func (CreateRequestValidationError) Field

Field function returns field value.

func (CreateRequestValidationError) Key

Key function returns key value.

func (CreateRequestValidationError) Reason

Reason function returns reason value.

type CreateRequest_Url

type CreateRequest_Url struct {
	Success string `protobuf:"bytes,1,opt,name=success,proto3" json:"success,omitempty"`
	Fail    string `protobuf:"bytes,2,opt,name=fail,proto3" json:"fail,omitempty"`
	Neutral string `protobuf:"bytes,3,opt,name=neutral,proto3" json:"neutral,omitempty"`
}

func (*CreateRequest_Url) Descriptor

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

func (*CreateRequest_Url) GetFail

func (m *CreateRequest_Url) GetFail() string

func (*CreateRequest_Url) GetNeutral

func (m *CreateRequest_Url) GetNeutral() string

func (*CreateRequest_Url) GetSuccess

func (m *CreateRequest_Url) GetSuccess() string

func (*CreateRequest_Url) ProtoMessage

func (*CreateRequest_Url) ProtoMessage()

func (*CreateRequest_Url) Reset

func (m *CreateRequest_Url) Reset()

func (*CreateRequest_Url) String

func (m *CreateRequest_Url) String() string

func (*CreateRequest_Url) Validate

func (m *CreateRequest_Url) Validate() error

Validate checks the field values on CreateRequest_Url with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*CreateRequest_Url) XXX_DiscardUnknown

func (m *CreateRequest_Url) XXX_DiscardUnknown()

func (*CreateRequest_Url) XXX_Marshal

func (m *CreateRequest_Url) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateRequest_Url) XXX_Merge

func (m *CreateRequest_Url) XXX_Merge(src proto.Message)

func (*CreateRequest_Url) XXX_Size

func (m *CreateRequest_Url) XXX_Size() int

func (*CreateRequest_Url) XXX_Unmarshal

func (m *CreateRequest_Url) XXX_Unmarshal(b []byte) error

type CreateRequest_UrlValidationError

type CreateRequest_UrlValidationError struct {
	// contains filtered or unexported fields
}

CreateRequest_UrlValidationError is the validation error returned by CreateRequest_Url.Validate if the designated constraints aren't met.

func (CreateRequest_UrlValidationError) Cause

Cause function returns cause value.

func (CreateRequest_UrlValidationError) Error

Error satisfies the builtin error interface

func (CreateRequest_UrlValidationError) ErrorName

ErrorName returns error name.

func (CreateRequest_UrlValidationError) Field

Field function returns field value.

func (CreateRequest_UrlValidationError) Key

Key function returns key value.

func (CreateRequest_UrlValidationError) Reason

Reason function returns reason value.

type CreateResponse

type CreateResponse struct {
	Uuid   string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Url    string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
}

func (*CreateResponse) Descriptor

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

func (*CreateResponse) GetStatus

func (m *CreateResponse) GetStatus() string

func (*CreateResponse) GetUrl

func (m *CreateResponse) GetUrl() string

func (*CreateResponse) GetUuid

func (m *CreateResponse) GetUuid() string

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) Reset

func (m *CreateResponse) Reset()

func (*CreateResponse) String

func (m *CreateResponse) String() string

func (*CreateResponse) Validate

func (m *CreateResponse) Validate() error

Validate checks the field values on CreateResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*CreateResponse) XXX_DiscardUnknown

func (m *CreateResponse) XXX_DiscardUnknown()

func (*CreateResponse) XXX_Marshal

func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateResponse) XXX_Merge

func (m *CreateResponse) XXX_Merge(src proto.Message)

func (*CreateResponse) XXX_Size

func (m *CreateResponse) XXX_Size() int

func (*CreateResponse) XXX_Unmarshal

func (m *CreateResponse) XXX_Unmarshal(b []byte) error

type CreateResponseValidationError

type CreateResponseValidationError struct {
	// contains filtered or unexported fields
}

CreateResponseValidationError is the validation error returned by CreateResponse.Validate if the designated constraints aren't met.

func (CreateResponseValidationError) Cause

Cause function returns cause value.

func (CreateResponseValidationError) Error

Error satisfies the builtin error interface

func (CreateResponseValidationError) ErrorName

func (e CreateResponseValidationError) ErrorName() string

ErrorName returns error name.

func (CreateResponseValidationError) Field

Field function returns field value.

func (CreateResponseValidationError) Key

Key function returns key value.

func (CreateResponseValidationError) Reason

Reason function returns reason value.

type Payment

type Payment struct {
	Uuid         string       `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty" bson:"uuid"`
	PaymentId    int64        `protobuf:"varint,2,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty" bson:"payment_id"`
	Url          *Payment_Url `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty" bson:"url"`
	Amount       float64      `protobuf:"fixed64,4,opt,name=amount,proto3" json:"amount,omitempty" bson:"amount"`
	RefundAmount float64      `protobuf:"fixed64,5,opt,name=refund_amount,json=refundAmount,proto3" json:"refund_amount,omitempty" bson:"refund_amount"`
	PaymentType  string       `protobuf:"bytes,6,opt,name=payment_type,json=paymentType,proto3" json:"payment_type,omitempty" bson:"payment_type"`
	Status       string       `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty" bson:"status"`
	ExternalId   string       `protobuf:"bytes,8,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty" bson:"external_id"`
	Email        string       `protobuf:"bytes,9,opt,name=email,proto3" json:"email,omitempty" bson:"email"`
	Phone        string       `protobuf:"bytes,10,opt,name=phone,proto3" json:"phone,omitempty" bson:"phone"`
	MerchantId   string       `protobuf:"bytes,11,opt,name=merchant_id,json=merchantId,proto3" json:"merchant_id,omitempty" bson:"merchant_id"`
	CreatedAt    string       `protobuf:"bytes,1001,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty" bson:"created_at"`
	UpdatedAt    string       `protobuf:"bytes,1002,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty" bson:"updated_at"`
}

func (*Payment) Descriptor

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

func (*Payment) GetAmount

func (m *Payment) GetAmount() float64

func (*Payment) GetCreatedAt

func (m *Payment) GetCreatedAt() string

func (*Payment) GetEmail

func (m *Payment) GetEmail() string

func (*Payment) GetExternalId

func (m *Payment) GetExternalId() string

func (*Payment) GetMerchantId

func (m *Payment) GetMerchantId() string

func (*Payment) GetPaymentId

func (m *Payment) GetPaymentId() int64

func (*Payment) GetPaymentType

func (m *Payment) GetPaymentType() string

func (*Payment) GetPhone

func (m *Payment) GetPhone() string

func (*Payment) GetRefundAmount

func (m *Payment) GetRefundAmount() float64

func (*Payment) GetStatus

func (m *Payment) GetStatus() string

func (*Payment) GetUpdatedAt

func (m *Payment) GetUpdatedAt() string

func (*Payment) GetUrl

func (m *Payment) GetUrl() *Payment_Url

func (*Payment) GetUuid

func (m *Payment) GetUuid() string

func (*Payment) ProtoMessage

func (*Payment) ProtoMessage()

func (*Payment) Reset

func (m *Payment) Reset()

func (*Payment) String

func (m *Payment) String() string

func (*Payment) Validate

func (m *Payment) Validate() error

Validate checks the field values on Payment with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Payment) XXX_DiscardUnknown

func (m *Payment) XXX_DiscardUnknown()

func (*Payment) XXX_Marshal

func (m *Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Payment) XXX_Merge

func (m *Payment) XXX_Merge(src proto.Message)

func (*Payment) XXX_Size

func (m *Payment) XXX_Size() int

func (*Payment) XXX_Unmarshal

func (m *Payment) XXX_Unmarshal(b []byte) error

type PaymentService

type PaymentService interface {
	Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
	Get(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
	Refund(ctx context.Context, in *RefundRequest, opts ...client.CallOption) (*shared.StatusResponse, error)
	Cancel(ctx context.Context, in *Request, opts ...client.CallOption) (*shared.StatusResponse, error)
	Finish(ctx context.Context, in *Request, opts ...client.CallOption) (*shared.StatusResponse, error)
	GetStatus(ctx context.Context, in *Request, opts ...client.CallOption) (*shared.StatusResponse, error)
}

func NewPaymentService

func NewPaymentService(name string, c client.Client) PaymentService

type PaymentValidationError

type PaymentValidationError struct {
	// contains filtered or unexported fields
}

PaymentValidationError is the validation error returned by Payment.Validate if the designated constraints aren't met.

func (PaymentValidationError) Cause

func (e PaymentValidationError) Cause() error

Cause function returns cause value.

func (PaymentValidationError) Error

func (e PaymentValidationError) Error() string

Error satisfies the builtin error interface

func (PaymentValidationError) ErrorName

func (e PaymentValidationError) ErrorName() string

ErrorName returns error name.

func (PaymentValidationError) Field

func (e PaymentValidationError) Field() string

Field function returns field value.

func (PaymentValidationError) Key

func (e PaymentValidationError) Key() bool

Key function returns key value.

func (PaymentValidationError) Reason

func (e PaymentValidationError) Reason() string

Reason function returns reason value.

type Payment_Url

type Payment_Url struct {
	Url     string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty" bson:"url"`
	Success string `protobuf:"bytes,2,opt,name=success,proto3" json:"success,omitempty" bson:"succes"`
	Fail    string `protobuf:"bytes,3,opt,name=fail,proto3" json:"fail,omitempty" bson:"fail"`
	Neutral string `protobuf:"bytes,4,opt,name=neutral,proto3" json:"neutral,omitempty" bson:"neutral"`
}

func (*Payment_Url) Descriptor

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

func (*Payment_Url) GetFail

func (m *Payment_Url) GetFail() string

func (*Payment_Url) GetNeutral

func (m *Payment_Url) GetNeutral() string

func (*Payment_Url) GetSuccess

func (m *Payment_Url) GetSuccess() string

func (*Payment_Url) GetUrl

func (m *Payment_Url) GetUrl() string

func (*Payment_Url) ProtoMessage

func (*Payment_Url) ProtoMessage()

func (*Payment_Url) Reset

func (m *Payment_Url) Reset()

func (*Payment_Url) String

func (m *Payment_Url) String() string

func (*Payment_Url) Validate

func (m *Payment_Url) Validate() error

Validate checks the field values on Payment_Url with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Payment_Url) XXX_DiscardUnknown

func (m *Payment_Url) XXX_DiscardUnknown()

func (*Payment_Url) XXX_Marshal

func (m *Payment_Url) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Payment_Url) XXX_Merge

func (m *Payment_Url) XXX_Merge(src proto.Message)

func (*Payment_Url) XXX_Size

func (m *Payment_Url) XXX_Size() int

func (*Payment_Url) XXX_Unmarshal

func (m *Payment_Url) XXX_Unmarshal(b []byte) error

type Payment_UrlValidationError

type Payment_UrlValidationError struct {
	// contains filtered or unexported fields
}

Payment_UrlValidationError is the validation error returned by Payment_Url.Validate if the designated constraints aren't met.

func (Payment_UrlValidationError) Cause

Cause function returns cause value.

func (Payment_UrlValidationError) Error

Error satisfies the builtin error interface

func (Payment_UrlValidationError) ErrorName

func (e Payment_UrlValidationError) ErrorName() string

ErrorName returns error name.

func (Payment_UrlValidationError) Field

Field function returns field value.

func (Payment_UrlValidationError) Key

Key function returns key value.

func (Payment_UrlValidationError) Reason

Reason function returns reason value.

type RefundRequest

type RefundRequest struct {
	Uuid   string  `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"`
}

func (*RefundRequest) Descriptor

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

func (*RefundRequest) GetAmount

func (m *RefundRequest) GetAmount() float64

func (*RefundRequest) GetUuid

func (m *RefundRequest) GetUuid() string

func (*RefundRequest) ProtoMessage

func (*RefundRequest) ProtoMessage()

func (*RefundRequest) Reset

func (m *RefundRequest) Reset()

func (*RefundRequest) String

func (m *RefundRequest) String() string

func (*RefundRequest) Validate

func (m *RefundRequest) Validate() error

Validate checks the field values on RefundRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*RefundRequest) XXX_DiscardUnknown

func (m *RefundRequest) XXX_DiscardUnknown()

func (*RefundRequest) XXX_Marshal

func (m *RefundRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefundRequest) XXX_Merge

func (m *RefundRequest) XXX_Merge(src proto.Message)

func (*RefundRequest) XXX_Size

func (m *RefundRequest) XXX_Size() int

func (*RefundRequest) XXX_Unmarshal

func (m *RefundRequest) XXX_Unmarshal(b []byte) error

type RefundRequestValidationError

type RefundRequestValidationError struct {
	// contains filtered or unexported fields
}

RefundRequestValidationError is the validation error returned by RefundRequest.Validate if the designated constraints aren't met.

func (RefundRequestValidationError) Cause

Cause function returns cause value.

func (RefundRequestValidationError) Error

Error satisfies the builtin error interface

func (RefundRequestValidationError) ErrorName

func (e RefundRequestValidationError) ErrorName() string

ErrorName returns error name.

func (RefundRequestValidationError) Field

Field function returns field value.

func (RefundRequestValidationError) Key

Key function returns key value.

func (RefundRequestValidationError) Reason

Reason function returns reason value.

type Request

type Request struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
}

func (*Request) Descriptor

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

func (*Request) GetUuid

func (m *Request) GetUuid() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) Validate

func (m *Request) Validate() error

Validate checks the field values on Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (m *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

type RequestValidationError

type RequestValidationError struct {
	// contains filtered or unexported fields
}

RequestValidationError is the validation error returned by Request.Validate if the designated constraints aren't met.

func (RequestValidationError) Cause

func (e RequestValidationError) Cause() error

Cause function returns cause value.

func (RequestValidationError) Error

func (e RequestValidationError) Error() string

Error satisfies the builtin error interface

func (RequestValidationError) ErrorName

func (e RequestValidationError) ErrorName() string

ErrorName returns error name.

func (RequestValidationError) Field

func (e RequestValidationError) Field() string

Field function returns field value.

func (RequestValidationError) Key

func (e RequestValidationError) Key() bool

Key function returns key value.

func (RequestValidationError) Reason

func (e RequestValidationError) Reason() string

Reason function returns reason value.

type Response added in v2.9.0

type Response struct {
	Data *Payment `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}

func (*Response) Descriptor added in v2.9.0

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

func (*Response) GetData added in v2.9.0

func (m *Response) GetData() *Payment

func (*Response) ProtoMessage added in v2.9.0

func (*Response) ProtoMessage()

func (*Response) Reset added in v2.9.0

func (m *Response) Reset()

func (*Response) String added in v2.9.0

func (m *Response) String() string

func (*Response) Validate added in v2.9.0

func (m *Response) Validate() error

Validate checks the field values on Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Response) XXX_DiscardUnknown added in v2.9.0

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal added in v2.9.0

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge added in v2.9.0

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size added in v2.9.0

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal added in v2.9.0

func (m *Response) XXX_Unmarshal(b []byte) error

type ResponseValidationError added in v2.9.0

type ResponseValidationError struct {
	// contains filtered or unexported fields
}

ResponseValidationError is the validation error returned by Response.Validate if the designated constraints aren't met.

func (ResponseValidationError) Cause added in v2.9.0

func (e ResponseValidationError) Cause() error

Cause function returns cause value.

func (ResponseValidationError) Error added in v2.9.0

func (e ResponseValidationError) Error() string

Error satisfies the builtin error interface

func (ResponseValidationError) ErrorName added in v2.9.0

func (e ResponseValidationError) ErrorName() string

ErrorName returns error name.

func (ResponseValidationError) Field added in v2.9.0

func (e ResponseValidationError) Field() string

Field function returns field value.

func (ResponseValidationError) Key added in v2.9.0

func (e ResponseValidationError) Key() bool

Key function returns key value.

func (ResponseValidationError) Reason added in v2.9.0

func (e ResponseValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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