Documentation ¶
Index ¶
Constants ¶
View Source
const ( MN = Lang("MN") EN = Lang("EN") )
View Source
const ( EcommercePay = PaymentMethod("payment") SocialPay = PaymentMethod("socialpay") )
View Source
const ( POST = ReturnType("POST") GET = ReturnType("GET") MOBILE = ReturnType("MOBILE") )
Variables ¶
View Source
var ( ECommerceInvoiceCreate = utils.API{ Url: "/api/invoice", Method: http.MethodPost, } ECommerceInquiry = utils.API{ Url: "/api/inquiry", Method: http.MethodPost, } ECommercePayByToken = utils.API{ Url: "/api/pay", Method: http.MethodPost, } )
Functions ¶
This section is empty.
Types ¶
type ByTokenRequest ¶
type ByTokenResponse ¶
type CreateInvoiceInput ¶ added in v1.0.1
type CreateInvoiceRequest ¶
type CreateInvoiceRequest struct { Amount string `json:"amount"` Checksum string `json:"checksum"` TransactionID string `json:"transactionId"` ReturnType string `json:"returnType"` Callback string `json:"callback"` GenerateToken string `json:"genToken"` SocialDeeplink string `json:"socialDeeplink"` }
type CreateInvoiceResponse ¶
type CreateInvoiceResponse struct { Invoice string `json:"invoice"` Checksum string `json:"checksum"` TransactionID string `json:"transactionId"` Timestamp string `json:"timestamp"` Status int `json:"status"` Error string `json:"error"` Message string `json:"message"` Path string `json:"path"` SocialDeeplink string `json:"socialDeeplink"` }
type Ecommerce ¶
type Ecommerce interface { CreateInvoice(input CreateInvoiceInput) (CreateInvoiceResponse, error) Inquiry(transactionId string) (InquiryResponse, error) PayByToken(amount float64, token string, transactionId string, returnUrl string) (ByTokenResponse, error) GetUrlByInvoiceId(invoice string, lang Lang, paymentMethod PaymentMethod) string }
type InquiryRequest ¶
type InquiryResponse ¶
type InquiryResponse struct { Amount string `json:"amount"` Bank string `json:"bank"` Status string `json:"status"` ErrorDesc string `json:"errorDesc"` ErrorCode string `json:"errorCode"` CardHolder string `json:"cardHolder"` CardNumber string `json:"cardNumber"` TransactionID string `json:"transactionId"` Token string `json:"token"` }
type PaymentMethod ¶
type PaymentMethod string
type ReturnType ¶ added in v1.0.1
type ReturnType string
Click to show internal directories.
Click to hide internal directories.