Documentation ¶
Index ¶
- func New(baseUrl string, clientId string, clientSecret string, timeout time.Duration) *ammana
- type AmmanaService
- type GenerateAccessTokenRequest
- type GenerateAccessTokenResponse
- type GetCardDetailRequest
- type GetCardDetailResponse
- type GetPaymentDetailResponse
- type OrderItem
- type OrderRequest
- type OrderResponse
- type SetSettlePaymentResponse
- type SetVoidPaymentResponse
- type SharedMeta
- type SharedRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New Function, create ammana pointer Required parameter : 1. Your ClientID (this from Team Ammana) 2. Your ClientSecret (this from Team Ammana) 3. BaseURL (hit to endpoint ex: https://paylater-dev.ammana.id/api/v1 for sandbox or https://paylater.ammana.id/api/v1 for production. this value based on https://paylater-dev.ammana.id/docs/1.x/overview)
Types ¶
type AmmanaService ¶
type AmmanaService interface { // Get Authentication Method GetAuth() (DataAuth GenerateAccessTokenResponse, err error) // Get Card Detail Method GetCardDetail(request GetCardDetailRequest) (resp GetCardDetailResponse, err error) // Get Order URL Redirect to Ammana Method GetOrderURL(request OrderRequest) (resp OrderResponse, err error) // Get Detail Payment Method GetPaymentDetail(invoiceCode string) (resp GetPaymentDetailResponse, err error) // Set Order to Settlement Method SetSettleOrder(invoiceCode string) (resp SetSettlePaymentResponse, err error) // Set Order to Void Method SetVoidOrder(invoiceCode string) (resp SetVoidPaymentResponse, err error) }
type GenerateAccessTokenRequest ¶
type GenerateAccessTokenRequest struct {
ClientSecret string `json:"client_secret"`
}
type GetCardDetailRequest ¶
type GetCardDetailResponse ¶
type GetCardDetailResponse struct { Data struct { ID string `json:"id"` Status string `json:"status"` LimitAmount int `json:"limit_amount"` UsageAmount int `json:"usage_amount"` AvailableAmount int `json:"available_amount"` } `json:"data"` Meta SharedMeta `json:"meta"` Message string `json:"message"` Type string `json:"type"` }
type GetPaymentDetailResponse ¶
type GetPaymentDetailResponse struct { Data struct { TransactionId string `json:"transaction_id"` Status string `json:"status"` InvoiceCode string `json:"invoice_code"` Total int `json:"total"` CreatedAt string `json:"created_at"` PaidAt string `json:"paid_at"` } `json:"data"` Meta SharedMeta `json:"meta"` Message string `json:"message"` Type string `json:"type"` }
type OrderRequest ¶
type OrderResponse ¶
type OrderResponse struct { Data struct { Url string `json:"url"` ExpiresIn int `json:"expires_in"` } `json:"data"` Meta SharedMeta `json:"meta"` Message string `json:"message"` Type string `json:"type"` }
type SetSettlePaymentResponse ¶
type SetSettlePaymentResponse struct { Data struct { TransactionId string `json:"transaction_id"` Status string `json:"status"` InvoiceCode string `json:"invoice_code"` Total int `json:"total"` CreatedAt string `json:"created_at"` PaidAt string `json:"paid_at"` SettledAt string `json:"settled_at"` } `json:"data"` Meta SharedMeta `json:"meta"` Message string `json:"message"` Type string `json:"type"` }
type SetVoidPaymentResponse ¶
type SetVoidPaymentResponse struct { Data struct { TransactionId string `json:"transaction_id"` Status string `json:"status"` InvoiceCode string `json:"invoice_code"` Total int `json:"total"` CreatedAt string `json:"created_at"` VoidAt string `json:"void_at"` } `json:"data"` Meta SharedMeta `json:"meta"` Message string `json:"message"` Type string `json:"type"` }
type SharedMeta ¶
type SharedMeta struct {}
type SharedRequest ¶
type SharedRequest struct {}
Click to show internal directories.
Click to hide internal directories.