Documentation
¶
Index ¶
- Variables
- type Deeplink
- type QPay
- type QPayInvoiceCreateRequest
- type QPayInvoiceReceiver
- type QPaySimpleInvoiceResponse
- type QpayInput
- type QpayInvoiceGetResponse
- type QpayLine
- type QpayLogin
- type QpayLoginResponse
- type QpayOffset
- type QpayPaymentCancelRequest
- type QpayPaymentCheckRequest
- type QpayPaymentCheckResponse
- type QpayPaymentListRequest
- type QpayTransaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( QPayAuthToken = utils.API{ Url: "/auth/token", Method: http.MethodPost, } QPayAuthRefresh = utils.API{ Url: "/auth/refresh", Method: http.MethodPost, } QPayPaymentGet = utils.API{ Url: "/payment/get/", Method: http.MethodGet, } QPayPaymentCheck = utils.API{ Url: "/payment/check/", Method: http.MethodGet, } QPayInvoiceCreate = utils.API{ Url: "/bill/create", Method: http.MethodPost, } QPayInvoiceGet = utils.API{ Url: "/invoice/", Method: http.MethodGet, } )
Functions ¶
This section is empty.
Types ¶
type QPay ¶
type QPay interface {
CreateInvoice(input QPayInvoiceCreateRequest) (QPaySimpleInvoiceResponse, error)
GetInvoice(invoiceId string) (QpayInvoiceGetResponse, error)
CheckPayment(paymentID string) (QpayPaymentCheckResponse, error)
}
type QPayInvoiceCreateRequest ¶
type QPayInvoiceCreateRequest struct {
TemplateID string `json:"template_id"`
MerchantID string `json:"merchant_id"`
BranchID string `json:"branch_id"`
PosID string `json:"pos_id"`
BillNo string `json:"bill_no"`
Date string `json:"date"`
Description string `json:"description"`
Amount float64 `json:"amount"`
BtukCode string `json:"btuk_code"`
VatFlag string `json:"vat_flag"`
Receiver QPayInvoiceReceiver `json:"receiver"`
}
type QPayInvoiceReceiver ¶
type QPaySimpleInvoiceResponse ¶
type QPaySimpleInvoiceResponse struct {
Name string `json:"name"`
Message string `json:"message"`
PaymentID int `json:"payment_id"`
QPayQrcode string `json:"qPay_QRcode"`
QPayQrimage string `json:"qPay_QRimage"`
CustomerID string `json:"customer_id"`
QPayURL string `json:"qPay_url"`
QPayDeeplink []Deeplink `json:"qPay_deeplink"`
}
type QpayInvoiceGetResponse ¶
type QpayInvoiceGetResponse struct {
AllowExceed bool `json:"allow_exceed"`
AllowPartial bool `json:"allow_partial"`
CallbackUrl string `json:"callback_url"`
DiscountAmount int64 `json:"discount_amount"`
EnableExpiry bool `json:"enable_expiry"`
ExpiryDate string `json:"expiry_date"`
GrossAmount int64 `json:"gross_amount"`
Inputs []*QpayInput `json:"inputs"`
InvoiceDescription string `json:"invoice_description"`
InvoiceDueDate interface{} `json:"invoice_due_date"`
InvoiceID string `json:"invoice_id"`
InvoiceStatus string `json:"invoice_status"`
Lines []*QpayLine `json:"lines"`
MaximumAmount int64 `json:"maximum_amount"`
MinimumAmount int64 `json:"minimum_amount"`
Note string `json:"note"`
SenderBranchCode string `json:"sender_branch_code"`
SenderBranchData string `json:"sender_branch_data"`
SenderInvoiceNo string `json:"sender_invoice_no"`
SurchargeAmount int64 `json:"surcharge_amount"`
TaxAmount int64 `json:"tax_amount"`
TotalAmount int64 `json:"total_amount"`
Transactions []*QpayTransaction `json:"transactions"`
}
type QpayLine ¶
type QpayLine struct {
Discounts []interface{} `json:"discounts"`
LineDescription string `json:"line_description"`
LineQuantity string `json:"line_quantity"`
LineUnitPrice string `json:"line_unit_price"`
Note string `json:"note"`
Surcharges []interface{} `json:"surcharges"`
TaxProductCode interface{} `json:"tax_product_code"`
Taxes []interface{} `json:"taxes"`
}
QLine V2
type QpayLoginResponse ¶
type QpayLoginResponse struct {
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
RefreshExpiresIn int `json:"refresh_expires_in"`
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
Scope string `json:"scope"`
NotBeforePolicy string `json:"not-before-policy"`
SessionState string `json:"session_state"`
}
type QpayOffset ¶
type QpayPaymentCancelRequest ¶
type QpayPaymentCancelRequest struct {
CallbackUrl string `json:"callback_url"` // Төлөгдсөн төлбөрийн ID-г Callback URL-аар авсаны дараа тухайн хэсэгт оруулж өгнө. Жш: https://qpay.mn/payment/result?payment_id=a2ab7ab0-80b0-4045-b79a-3052eda1ca89
Note string `json:"note"` // Тэмдэглэл
}
type QpayPaymentCheckRequest ¶
type QpayPaymentCheckRequest struct {
ObjectID string `json:"object_id" ` // Обьектын төрөл // INVOICE: Нэхэмжлэх // QR: QR код // ITEM: Бүтээгдэхүүн
ObjectType string `json:"object_type"` // Обьектын ID //Обьектын төрөл QR үед QR кодыг ашиглана
Offset QpayOffset `json:"offset"`
}
type QpayPaymentCheckResponse ¶
type QpayPaymentCheckResponse struct {
PaymentInfo struct {
PaymentStatus string `json:"payment_status"`
CustomerID string `json:"customer_id"`
QrAccountID string `json:"-"`
ItemID string `json:"-"`
PaymentAmount string `json:"-"`
TransactionID string `json:"-"`
LastPaymentDate string `json:"-"`
Transactions []QpayTransaction `json:"transactions"`
} `json:"payment_info"`
Name string `json:"name"`
Message string `json:"message"`
}
type QpayPaymentListRequest ¶
type QpayPaymentListRequest struct {
// ObjectID string `json:"object_id"` // Обьектын ID // Обьектын төрөл INVOICE үед Нэхэмлэхийн код(invoice_code) // Обьектын төрөл QR үед QR кодыг ашиглана
// ObjectType string `json:"object_type"` // Обьектын төрөл // INVOICE: Нэхэмжлэх // MERCHANT: Байгууллага // QR: QR код
MerchantID string `json:"merchant_id"` // Байгууллагын дугаар
MerchantBranchCode string `json:"merchant_branch_code"` // Байгууллагын салбарын код
MerchantTerminalCode string `json:"merchant_terminal_code"` // Байгууллагын терминал код
MerchantStaffCode string `json:"merchant_staff_code"` // Ажилтаны код
Offset QpayOffset `json:"offset"`
}
type QpayTransaction ¶
type QpayTransaction struct {
TransactionBankCode string `json:"transaction_bank_code"`
TransactionNo int `json:"transaction_no"`
TransactionDate string `json:"transaction_date"`
TransactionAmount float32 `json:"transaction_amount"`
TransactionCurrencyType int `json:"transaction_currency_type"`
BeneficiaryBankCode string `json:"beneficiary_bank_code"`
BeneficiaryBankName string `json:"beneficiary_bank_name"`
BeneficiaryAccountName string `json:"beneficiary_account_name"`
BeneficiaryAccountNumber string `json:"beneficiary_account_number"`
}
Click to show internal directories.
Click to hide internal directories.