Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Call(method, path string, header map[string]string, body io.Reader, v interface{}) error
- func (c *Client) ExecuteRequest(req *http.Request, v interface{}) error
- func (c *Client) NewRequest(method string, fullPath string, headers map[string]string, body io.Reader) (*http.Request, error)
- type CoreGateway
- func (gateway *CoreGateway) Call(method, path string, header map[string]string, body io.Reader, v interface{}) error
- func (gateway *CoreGateway) GetToken() (res TokenResponse, err error)
- func (gateway *CoreGateway) InquiryCustomerNumber(token string, req InquiryByCustomerNumber) (resp InquiryByCustomerNumberResp, err error)
- func (gateway *CoreGateway) InquiryRequestID(token string, req InquiryByRequestID) (resp InquiryByCustomerNumberResp, err error)
- type InquiryByCustomerNumber
- type InquiryByCustomerNumberResp
- type InquiryByRequestID
- type Signature
- type TokenResponse
Constants ¶
View Source
const ( TOKEN_PATH = "/api/oauth/token" VA_PATH = "/va/payments" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { BaseUrl string ClientID string ClientSecret string ApiKey string ApiSecret string CompanyID string CompanyCode string Origin string LogLevel int Logger *log.Logger }
Client struct to initial bca package
func (*Client) Call ¶
func (c *Client) Call(method, path string, header map[string]string, body io.Reader, v interface{}) error
Call the API at specific `path` using the specified HTTP `method`. The result will be given to `v` if there is no error. If any error occurred, the return of this function is the error itself, otherwise nil.
func (*Client) ExecuteRequest ¶
ExecuteRequest : execute request
type CoreGateway ¶
type CoreGateway struct {
Client Client
}
CoreGateway struct
func (*CoreGateway) Call ¶
func (gateway *CoreGateway) Call(method, path string, header map[string]string, body io.Reader, v interface{}) error
Call : base method to call Core API
func (*CoreGateway) GetToken ¶
func (gateway *CoreGateway) GetToken() (res TokenResponse, err error)
func (*CoreGateway) InquiryCustomerNumber ¶
func (gateway *CoreGateway) InquiryCustomerNumber(token string, req InquiryByCustomerNumber) (resp InquiryByCustomerNumberResp, err error)
func (*CoreGateway) InquiryRequestID ¶
func (gateway *CoreGateway) InquiryRequestID(token string, req InquiryByRequestID) (resp InquiryByCustomerNumberResp, err error)
type InquiryByCustomerNumber ¶
type InquiryByCustomerNumberResp ¶
type InquiryByCustomerNumberResp struct { TransactionData []struct { DetailBills []struct { BillReference string `json:"BillReference"` BillNumber string `json:"BillNumber"` } `json:"DetailBills"` PaymentFlagStatus string `json:"PaymentFlagStatus"` RequestID string `json:"RequestID"` Reference string `json:"Reference"` TotalAmount string `json:"TotalAmount"` TransactionDate time.Time `json:"TransactionDate"` PaidAmount string `json:"PaidAmount"` } `json:"TransactionData"` }
type InquiryByRequestID ¶
Click to show internal directories.
Click to hide internal directories.