Documentation
¶
Index ¶
- func New(baseUrl string, apiKey string, merchantId string, merchantSecret string, ...) *cicil
- type Buyer
- type CancelOrderRequest
- type CancelOrderResponse
- type CheckoutRequest
- type CheckoutResponse
- type CicilService
- type ItemList
- type SellerList
- type Shipment
- type Transaction
- type UpdateStatusRequest
- type UpdateStatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(baseUrl string, apiKey string, merchantId string, merchantSecret string, timeout time.Duration) *cicil
New Function, create cicil pointer Required parameter : 1. Your MerchantID (this from Team cicil) 2. Your MerchantSecret (this from Team cicil) 3. Your APIKey (this from Team cicil) 3. BaseURL (hit to endpoint ex: https://sandbox-api.cicil.dev/v1 for sandbox. this value based on https://docs.cicil.app/#introduction)
Types ¶
type Buyer ¶
type Buyer struct {
Fullname string `json:"fullname"`
Email string `json:"email"`
Phone string `json:"phone"`
Address string `json:"address"`
City string `json:"city,omitempty"`
District string `json:"district,omitempty"`
PostalCode string `json:"postal_code"`
Company string `json:"company,omitempty"`
Country string `json:"country,omitempty"`
}
type CancelOrderRequest ¶
type CancelOrderResponse ¶
type CheckoutRequest ¶
type CheckoutRequest struct {
Transaction Transaction `json:"transaction"`
PushURL string `json:"push_url"`
RedirectURL string `json:"redirect_url"`
Buyer Buyer `json:"buyer"`
Shipment Shipment `json:"shipment"`
SellerList []SellerList `json:"seller_list,omitempty"`
BackURL string `json:"back_url"`
}
type CheckoutResponse ¶
type CicilService ¶
type CicilService interface {
GetToken() (digest string, dateNowReturn string)
GetCheckoutURL(param CheckoutRequest) (resp CheckoutResponse, err error)
SetCancelOrder(param CancelOrderRequest) (resp CancelOrderResponse, err error)
UpdateStatus(param UpdateStatusRequest) (resp UpdateStatusResponse, err error)
}
type SellerList ¶
type Shipment ¶
type Shipment struct {
ShipmentProvider string `json:"shipment_provider"`
ShipmentPrice int `json:"shipment_price"`
ShipmentTax int `json:"shipment_tax"`
Address string `json:"address"`
City string `json:"city,omitempty"`
District string `json:"district,omitempty"`
PostalCode string `json:"postal_code"`
Phone string `json:"phone"`
Company string `json:"company,omitempty"`
Name string `json:"name"`
Country string `json:"country,omitempty"`
}
type Transaction ¶
type UpdateStatusRequest ¶
type UpdateStatusRequest struct {
PONumber string `json:"po_number"`
POStatus string `json:"po_status"`
TransactionID string `json:"transaction_id"`
Reason string `json:"reason,omitempty"`
ShipmentNo string `json:"shipment_no,omitempty"`
ShipmentProvider string `json:"shipment_provider,omitempty"`
}
type UpdateStatusResponse ¶
Click to show internal directories.
Click to hide internal directories.