Documentation
¶
Index ¶
- Variables
- type Deeplink
- type QPay
- type QPayCreateInvoiceInput
- type QPaySimpleInvoiceRequest
- type QPaySimpleInvoiceResponse
- type QpayInput
- type QpayInvoiceGetResponse
- type QpayLine
- type QpayOffset
- type QpayPaymentCancelRequest
- type QpayPaymentCheckRequest
- type QpayPaymentCheckResponse
- type QpayPaymentListRequest
- type QpayRow
- 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.MethodPost, } QPayPaymentCancel = utils.API{ Url: "/payment/cancel", Method: http.MethodDelete, } QPayPaymentRefund = utils.API{ Url: "/payment/refund/", Method: http.MethodDelete, } QPayPaymentList = utils.API{ Url: "/payment/url", Method: http.MethodPost, } QPayInvoiceCreate = utils.API{ Url: "/invoice", Method: http.MethodPost, } QPayInvoiceGet = utils.API{ Url: "/invoice/", Method: http.MethodGet, } QPayInvoiceCancel = utils.API{ Url: "/invoice/", Method: http.MethodDelete, } )
Functions ¶
This section is empty.
Types ¶
type QPay ¶
type QPay interface { CreateInvoice(input QPayCreateInvoiceInput) (QPaySimpleInvoiceResponse, error) GetInvoice(invoiceId string) (QpayInvoiceGetResponse, error) CancelInvoice(invoiceId string) (interface{}, error) GetPayment(invoiceId string) (interface{}, error) CheckPayment(invoiceId string, pageLimit, pageNumber int64) (QpayPaymentCheckResponse, error) CancelPayment(invoiceId, paymentUUID string) (QpayPaymentCheckResponse, error) RefundPayment(invoiceId, paymentUUID string) (interface{}, error) }
type QPayCreateInvoiceInput ¶ added in v1.0.2
type QPaySimpleInvoiceRequest ¶
type QPaySimpleInvoiceRequest struct { InvoiceCode string `json:"invoice_code"` // qpay-ээс өгсөн нэхэмжлэхийн код SenderInvoiceCode string `json:"sender_invoice_no"` // Байгууллагаас үүсгэх давтагдашгүй нэхэмжлэлийн дугаар InvoiceReceiverCode string `json:"invoice_receiver_code"` // Байгууллагын нэхэмжлэхийг хүлээн авч буй харилцагчийн дахин давтагдашгүй дугаар InvoiceDescription string `json:"invoice_description"` // Нэхэмжлэлийн утга Amount int64 `json:"amount"` // Мөнгөн дүн CallbackUrl string `json:"callback_url"` }
type QPaySimpleInvoiceResponse ¶
type QPaySimpleInvoiceResponse struct { InvoiceID string `json:"invoice_id"` // Object id QpayShortUrl string `json:"qPay_shortUrl"` // qr shortcut QrText string `json:"qr_text"` // Данс болон картын гүйлгээ дэмжих QR утга QrImage string `json:"qr_image"` // Base64 зурган QR код, Qpay лого голдоо агуулсан Urls []*Deeplink `json:"urls"` }
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 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 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 QpayRow ¶
type QpayRow struct { PaymentID string `json:"payment_id"` // QPay-ээс үүссэн гүйлгээний дугаар PaymentStatus string `json:"payment_status"` // Гүйлгээ төлөв // NEW: Гүйлгээ үүсгэгдсэн // FAILED: Гүйлгээ амжилтгүй // PAID: Төлөгдсөн // REFUNDED: Гүйлгээ буцаагдсан PaymentDate interface{} `json:"payment_date"` // Гүйлгээ хийгдсэн хугацаа PaymentFee string `json:"payment_fee"` // Гүйлгээний шимтгэл шимтгэл PaymentAmount string `json:"payment_amount"` // Гүйлгээний дүн PaymentCurrency string `json:"payment_currency"` // Гүйлгээний валют PaymentWallet string `json:"payemnt_wallet"` // Гүйлгээ хийгдэн воллет TransactionType string `json:"transaction_type"` // P2P or CARD }
Click to show internal directories.
Click to hide internal directories.