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 CreateInvoiceInput struct { Amount float64 `json:"amount"` TransactionID string `json:"transactionId"` ReturnType ReturnType `json:"returnType"` Callback string `json:"callback"` GetToken bool `json:"getToken"` }
type CreateInvoiceRequest ¶
type CreateInvoiceResponse ¶
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.