Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateEwallet(ctx context.Context, payload fazz.PaymentCreateEwalletPayload) (*PaymentCreate, *fazz.Error)
- func (c *Client) CreateQRIS(ctx context.Context, payload fazz.PaymentCreateQRISPayload) (*PaymentCreate, *fazz.Error)
- func (c *Client) CreateRetailOutlet(ctx context.Context, payload fazz.PaymentCreateRetailPayload) (*PaymentCreate, *fazz.Error)
- func (c *Client) CreateVA(ctx context.Context, payload fazz.PaymentCreateVAPayload) (*PaymentCreate, *fazz.Error)
- func (c *Client) Payment(ctx context.Context, paymentId string) (*Payment, *fazz.Error)
- func (c *Client) Payments(ctx context.Context, params fazz.FazzParams) ([]Payment, *fazz.Error)
- func (c *Client) Update(ctx context.Context, paymentId string, payload fazz.PaymentUpdatePayload) (*PaymentUpdate, *fazz.Error)
- type Instructions
- type Payment
- type PaymentAttributes
- type PaymentCreate
- type PaymentMethod
- type PaymentUpdate
- type PaymentUpdateAttributes
- type Settement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) CreateEwallet ¶
func (c *Client) CreateEwallet(ctx context.Context, payload fazz.PaymentCreateEwalletPayload) (*PaymentCreate, *fazz.Error)
CreateEwallet return response from Create a Payment for E-Wallet type.
func (*Client) CreateQRIS ¶
func (c *Client) CreateQRIS(ctx context.Context, payload fazz.PaymentCreateQRISPayload) (*PaymentCreate, *fazz.Error)
CreateQRIS return response from Create a Payment for QRIS type.
func (*Client) CreateRetailOutlet ¶
func (c *Client) CreateRetailOutlet(ctx context.Context, payload fazz.PaymentCreateRetailPayload) (*PaymentCreate, *fazz.Error)
CreateRetailOutlet return response from Create a Payment for Retail Outlet type.
func (*Client) CreateVA ¶
func (c *Client) CreateVA(ctx context.Context, payload fazz.PaymentCreateVAPayload) (*PaymentCreate, *fazz.Error)
CreateVA return response from Create a Payment for Virtual Account type.
type Instructions ¶
type Instructions struct {
ImageUrl string `json:"imageUrl"` // QRIS
DisplayName string `json:"displayName"` // QRIS, VA, Retail Outlet
BankShortCode string `json:"bankShortCode"` // VA
AccountNo string `json:"accountNo"` // VA
RetailOutletName string `json:"retailOutletName"` // Retail Outlet
PaymentCode string `json:"paymentCode"` // Retail Outlet
}
Instructions is part of PaymentMethod
type Payment ¶
type Payment struct {
ID string `json:"id"`
Type string `json:"type"`
Attribute PaymentAttributes `json:"attributes"`
}
Payment represent response from List of Payments & Get a Payment API.
type PaymentAttributes ¶
type PaymentAttributes struct {
Status string `json:"status"`
Amount string `json:"amount"`
CreatedAt string `json:"createdAt"`
Description string `json:"description"`
ExpiredAt string `json:"expiredAt"`
ReferenceId string `json:"referenceId"`
Fees string `json:"fees"`
PaymentMethod PaymentMethod `json:"paymentMethod"`
}
PAymentAttributes is part of Payment
type PaymentCreate ¶
type PaymentCreate struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes PaymentAttributes `json:"attributes"`
}
PaymentCreate represent response from Create a Payment API. Attribute instructions for type QRIS, VA and Retail Outlet is wrapped in one struct and also Settlement from E-Wallet.
type PaymentMethod ¶
type PaymentMethod struct {
ID string `json:"id"`
Type string `json:"type"`
ReferenceId string `json:"referenceId"`
Instructions Instructions `json:"instructions"` // Wrap QRIS, VA and Retail Outlet in one instructions
Settlement Settement `json:"settlement"` // Wrap EWallet in one Settlement
}
PaymentMethod is part of PaymentAttributes
type PaymentUpdate ¶
type PaymentUpdate struct {
Type string `json:"type"`
Attributes PaymentUpdateAttributes `json:"attributes"`
}
PaymentUpdate represent response from Update a Payment API.
type PaymentUpdateAttributes ¶
type PaymentUpdateAttributes struct {
TargetId string `json:"targetId"`
TargetType string `json:"targetType"`
Action string `json:"action"`
}
PaymentUpdateAttributes is part of PaymentUpdate