Documentation ¶
Index ¶
- func CreateSignatureHeaders(apiKey string, secretKey string) string
- func Sha1(s string) string
- func Stringify(m interface{}) string
- type Address
- type Client
- type CoreGateway
- func (gateway *CoreGateway) CheckStatus(req *RequestCheckStatus) (ResponseCheckStatus, error)
- func (gateway *CoreGateway) CheckoutPayment(req *RequestCheckoutPayment) (ResponseCheckoutPayment, error)
- func (gateway *CoreGateway) GetInstallment(req *RequestGetInstallment) (ResponseGetInstallment, error)
- type CustomerDetail
- type Env
- type Error
- type Item
- type Logger
- type Payment
- type RequestCheckStatus
- type RequestCheckoutPayment
- type RequestGetInstallment
- type RequestNotification
- type ResponseCheckStatus
- type ResponseCheckoutPayment
- type ResponseGetInstallment
- type Seller
- type TransactionDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSignatureHeaders ¶
Types ¶
type Address ¶
type Address struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Address string `json:"address"` City string `json:"city"` PostalCode string `json:"postalCode"` Phone string `json:"phone"` CountryCode string `json:"countryCode"` }
This object use at seller object
type Client ¶
type CoreGateway ¶
type CoreGateway struct {
Client Client
}
func (*CoreGateway) CheckStatus ¶
func (gateway *CoreGateway) CheckStatus(req *RequestCheckStatus) (ResponseCheckStatus, error)
func (*CoreGateway) CheckoutPayment ¶
func (gateway *CoreGateway) CheckoutPayment(req *RequestCheckoutPayment) (ResponseCheckoutPayment, error)
func (*CoreGateway) GetInstallment ¶
func (gateway *CoreGateway) GetInstallment(req *RequestGetInstallment) (ResponseGetInstallment, error)
type CustomerDetail ¶
type CustomerDetail struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email"` Phone string `json:"phone"` }
This object use at payload checkout payment
type Env ¶
type Env int8
const ( // Sandbox : represent sandbox environment Sandbox Env // Production : represent production environment Production )
type Error ¶
type Error struct { Kind string `json:"kind"` Message interface{} `json:"message"` }
Error general message f
type Item ¶
type Item struct { ID string `json:"id"` Name string `json:"name"` Price float64 `json:"price"` Url string `json:"url,omitempty"` ImageURL string `json:"imageUrl,omitempty"` Type string `json:"type,omitempty"` Category string `json:"category,omitempty"` Quantity int64 `json:"quantity"` ParentType string `json:"parentType"` ParentID string `json:"parentId"` }
This object use at payload get available installment, and checkout payment
type Payment ¶
type Payment struct { ID string `json:"id"` Tenure int `json:"tenure"` Rate float64 `json:"rate"` Amount float64 `json:"amount"` PaymentType string `json:"paymentType"` MonthlyInstallment float64 `json:"monthlyInstallment"` MerchantDiscountRate float64 `json:"merchantDiscountRate,omitempty"` DiscountedMonthlyInstallment float64 `json:"discountedMonthlyInstallment,omitempty"` InstallmentAmount float64 `json:"installmentAmount"` DownPayment float64 `json:"downPayment,omitempty"` Provision float64 `json:"provision,omitempty"` }
Response For Installment Calculation
type RequestCheckStatus ¶
type RequestCheckStatus struct {
MerchantOrderId string `url:"merchantOrderId"`
}
This object use for get status at indodana
type RequestCheckoutPayment ¶
type RequestCheckoutPayment struct { TransactionDetail TransactionDetail `json:"transactionDetails"` CustomerDetail CustomerDetail `json:"customerDetails"` Seller []Seller `json:"sellers"` BillingAddress *Address `json:"billingAddress"` ShippingAddress *Address `json:"shippingAddress"` PaymentType string `json:"paymentType"` ApprovedNotificationURL string `json:"approvedNotificationUrl"` CancellationRedirectURL string `json:"cancellationRedirectUrl"` BackToStoreURL string `json:"backToStoreUrl"` ExpirationAt string `json:"expirationAt"` }
This object use checkout payment
type RequestGetInstallment ¶
This object use for get available installment
type RequestNotification ¶
type RequestNotification struct { Amount float64 `json:"amount"` PaymentType string `json:"paymentType"` TransactionStatus string `json:"transactionStatus"` MerchantOrderId string `json:"merchantOrderId"` TransactionTime string `json:"transactionTime"` TransactionID string `json:"transactionId"` }
This object use for get available installment
type ResponseCheckStatus ¶
type ResponseCheckStatus struct { Status string `json:"status"` FraudStatus string `json:"fraudStatus"` LegalName string `json:"legalName"` Amount float64 `json:"amount"` PaymentType string `json:"paymentType"` TransactionStatus string `json:"transactionStatus"` MerchantOrderID string `json:"merchantOrderId"` TransactionTime string `json:"transactionTime"` TransactionID string `json:"transactionId"` EntityID string `json:"entityId,omitempty"` Message string `json:"message,omitempty"` }
Response Check Status Transaction
type ResponseCheckoutPayment ¶
type ResponseCheckoutPayment struct { Status string `json:"status"` RedirectURL string `json:"redirectUrl,omitempty"` TransactionID string `json:"transactionId,omitempty"` Error Error `json:"error,omitempty"` }
Response Get Installment Available
type ResponseGetInstallment ¶
type ResponseGetInstallment struct { Status string `json:"status"` Payment []Payment `json:"payments,omitempty"` Error Error `json:"error,omitempty"` }
Response Get Installment Available
type Seller ¶
type Seller struct { ID string `json:"id"` Name string `json:"name"` URL string `json:"url"` SellerIDNumber string `json:"sellerIdNumber"` Email string `json:"email"` Address *Address `json:"address"` }
This object use at payload checkout payment
type TransactionDetail ¶
type TransactionDetail struct { Amount float64 `json:"amount"` MerchantOrderId string `json:"merchantOrderId"` Items []Item `json:"items"` }
This object use at payload checkout payment
Click to show internal directories.
Click to hide internal directories.