Documentation ¶
Index ¶
- func NewDropInPayment(ctx context.Context, order *db.Order, cartCheckout *db.CartCheckout, ...) (*checkout.CreateCheckoutSessionResponse, error)
- func NewTender(ctx context.Context, pos, orderId string, amount float32) error
- func ProcessRedirect(ctx context.Context, sessionID, redirectResult string) (*checkout.PaymentDetailsResponse, error)
- func Refund(ctx context.Context, opts RefundOptions) (*checkout.PaymentRefundResponse, error)
- type AmountsReq
- type MessageHeader
- type PaymentRequest
- type PaymentTransaction
- type RefundOptions
- type SaleData
- type SaleToPOIRequest
- type SaleTransactionID
- type TerminalAPIRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDropInPayment ¶
func NewDropInPayment(ctx context.Context, order *db.Order, cartCheckout *db.CartCheckout, returnURL string) (*checkout.CreateCheckoutSessionResponse, error)
NewDropInPayment contains order that is converted from shopping cart and hence doesn't have checkout data. We must pass checkout data separately.
func ProcessRedirect ¶
func Refund ¶
func Refund(ctx context.Context, opts RefundOptions) (*checkout.PaymentRefundResponse, error)
Types ¶
type AmountsReq ¶
type MessageHeader ¶
type MessageHeader struct { ProtocolVersion string `json:"ProtocolVersion"` MessageClass string `json:"MessageClass"` MessageCategory string `json:"MessageCategory"` MessageType string `json:"MessageType"` SaleID string `json:"SaleID"` ServiceID string `json:"ServiceID"` POIID string `json:"POIID"` }
type PaymentRequest ¶
type PaymentRequest struct { SaleData SaleData `json:"SaleData"` PaymentTransaction PaymentTransaction `json:"PaymentTransaction"` }
type PaymentTransaction ¶
type PaymentTransaction struct {
AmountsReq AmountsReq `json:"AmountsReq"`
}
type RefundOptions ¶
type SaleData ¶
type SaleData struct {
SaleTransactionID SaleTransactionID `json:"SaleTransactionID"`
}
type SaleToPOIRequest ¶
type SaleToPOIRequest struct { MessageHeader MessageHeader `json:"MessageHeader"` PaymentRequest PaymentRequest `json:"PaymentRequest"` }
type SaleTransactionID ¶
type TerminalAPIRequest ¶
type TerminalAPIRequest struct {
SaleToPOIRequest SaleToPOIRequest `json:"SaleToPOIRequest"`
}
Click to show internal directories.
Click to hide internal directories.