qpayquick

package
v1.2.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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,
	}

	QPayCreateCompany = utils.API{
		Url:    "/merchant/company",
		Method: http.MethodPost,
	}
	QPayCreatePerson = utils.API{
		Url:    "/merchant/person",
		Method: http.MethodPost,
	}
	QPayGetMerchant = utils.API{
		Url:    "/merchant/",
		Method: http.MethodGet,
	}
	QPayMerchantList = utils.API{
		Url:    "/merchant/list",
		Method: http.MethodPost,
	}

	QPayInvoiceCreate = utils.API{
		Url:    "/invoice",
		Method: http.MethodPost,
	}
	QPayInvoiceGet = utils.API{
		Url:    "/invoice/",
		Method: http.MethodGet,
	}

	QPayPaymentCheck = utils.API{
		Url:    "/payment/check",
		Method: http.MethodPost,
	}
)

Functions

This section is empty.

Types

type QPayQuick

type QPayQuick interface {
	CreateCompany(input QpayCompanyCreateRequest) (QpayCompanyCreateResponse, error)
	CreatePerson(input QpayPersonCreateRequest) (QpayPersonCreateResponse, error)
	GetMerchant(merchantID string) (QpayMerchantGetResponse, error)
	ListMerchant(input QpayOffset) (QpayMerchantListResponse, error)
	CreateInvoice(input QpayInvoiceRequest) (QpayInvoiceResponse, error)
	GetInvoice(invoiceId string) (QpayInvoiceGetResponse, error)
	CheckPayment(invoiceID string) (QpayPaymentCheckResponse, error)
}

func New

func New(username, password, endpoint, callback, invoiceCode, terminalID string) QPayQuick

type QpayBankAccountRequest

type QpayBankAccountRequest struct {
	AccountBankCode string `json:"account_bank_code"`
	AccountNumber   string `json:"account_number"`
	AccountName     string `json:"account_name"`
	IsDefault       bool   `json:"is_default"`
}

type QpayBankAccountResponse

type QpayBankAccountResponse struct {
	ID              string `json:"id"`
	AccountBankCode string `json:"account_bank_code"`
	AccountNumber   string `json:"account_number"`
	AccountName     string `json:"account_name"`
	IsDefault       bool   `json:"is_default"`
	InvoiceID       string `json:"invoice_id"`
}

type QpayCompanyCreateRequest

type QpayCompanyCreateRequest struct {
	OwnerRegNo     string `json:"owner_register_no"`
	OwnerFirstName string `json:"owner_first_name"`
	OwnerLastName  string `json:"owner_last_name"`
	LocationLat    string `json:"location_lat"`
	LocationLng    string `json:"location_lng"`
	RegisterNo     string `json:"register_nubmer"`
	Name           string `json:"name"`
	MCCcode        string `json:"mcc_code"`
	City           string `json:"city"`
	District       string `json:"district"`
	Address        string `json:"address"`
	Phone          string `json:"phone"`
	Email          string `json:"email"`
}

type QpayCompanyCreateResponse

type QpayCompanyCreateResponse struct {
	ID             string `json:"id"`
	VendorID       string `json:"vendor_id"`
	Type           string `json:"type"`
	RegisterNo     string `json:"register_number"`
	Name           string `json:"name"`
	OwnerRegNo     string `json:"owner_register_no"`
	OwnerFirstName string `json:"owner_first_name"`
	OwnerLastName  string `json:"owner_last_name"`
	MCCcode        string `json:"mcc_code"`
	City           string `json:"city"`
	District       string `json:"district"`
	Address        string `json:"address"`
	Phone          string `json:"phone"`
	Email          string `json:"email"`
	LocationLat    string `json:"location_lat"`
	LocationLng    string `json:"location_lng"`
}

type QpayInvoiceGetResponse

type QpayInvoiceGetResponse struct {
	ID                  string                    `json:"id"`
	TerminalID          string                    `json:"terminal_id"`
	Amount              string                    `json:"amount"`
	QrCode              string                    `json:"qr_code"`
	Description         string                    `json:"description"`
	InvoiceStatus       string                    `json:"invoice_status"`
	InvoiceStatusDate   string                    `json:"invoice_status_date"`
	CallbackUrl         string                    `json:"callback_url"`
	CustomerName        string                    `json:"customer_name"`
	Currency            string                    `json:"currency"`
	MCCcode             string                    `json:"mcc_code"`
	LegacyID            string                    `json:"legacy_id"`
	VendorID            string                    `json:"vendor_id"`
	ProcessCodeID       string                    `json:"process_code_id"`
	QrImage             string                    `json:"qr_image"`
	InvoiceBankAccounts []QpayBankAccountResponse `json:"invoice_bank_accounts"`
}

type QpayInvoiceRequest

type QpayInvoiceRequest struct {
	MerchantID   string                   `json:"merchant_id"`
	BranchCode   string                   `json:"branch_code"`
	Amount       float64                  `json:"amount"`
	Currency     string                   `json:"currency"`
	CustomerName string                   `json:"customer_name"`
	CallbackUrl  string                   `json:"callback_url"`
	Description  string                   `json:"description"`
	MCCcode      string                   `json:"mcc_code"`
	BankAccounts []QpayBankAccountRequest `json:"bank_accounts"`
}

type QpayInvoiceResponse

type QpayInvoiceResponse struct {
	ID                  string                    `json:"id"`
	TerminalID          string                    `json:"terminal_id"`
	Amount              string                    `json:"amount"`
	QrCode              string                    `json:"qr_code"`
	Description         string                    `json:"description"`
	InvoiceStatus       string                    `json:"invoice_status"`
	InvoiceStatusDate   string                    `json:"invoice_status_date"`
	CallbackUrl         string                    `json:"callback_url"`
	CustomerName        string                    `json:"customer_name"`
	Currency            string                    `json:"currency"`
	MCCcode             string                    `json:"mcc_code"`
	LegacyID            string                    `json:"legacy_id"`
	VendorID            string                    `json:"vendor_id"`
	ProcessCodeID       string                    `json:"process_code_id"`
	QrImage             string                    `json:"qr_image"`
	InvoiceBankAccounts []QpayBankAccountResponse `json:"invoice_bank_accounts"`
	Urls                []QpayUrls                `json:"urls"`
}

type QpayMerchantGetResponse

type QpayMerchantGetResponse struct {
	CreateDate string `json:"created_date"`
	ID         string `json:"id"`
	Type       string `json:"type"`
	RegisterNo string `json:"register_number"`
	Name       string `json:"name"`
	FirstName  string `json:"first_name"`
	LastName   string `json:"last_name"`
	MCCcode    string `json:"mcc_code"`
	City       string `json:"city"`
	District   string `json:"district"`
	Address    string `json:"address"`
	Phone      string `json:"phone"`
	Email      string `json:"email"`
}

type QpayMerchantListRequest

type QpayMerchantListRequest struct {
	Offset QpayOffset `json:"offset"`
}

type QpayMerchantListResponse

type QpayMerchantListResponse struct {
	Count int                       `json:"count"`
	Items []QpayMerchantGetResponse `json:"rows"`
}

type QpayOffset

type QpayOffset struct {
	PageNumber int64 `json:"page_number"` // Хуудасны тоо
	PageLimit  int64 `json:"page_limit"`  // Хуудасны хязгаар max <= 100
}

type QpayPayment added in v1.2.31

type QpayPayment struct {
	ID                 string             `json:"id"`
	TerminalID         string             `json:"terminal_id"`
	WalletCustomerID   string             `json:"wallet_customer_id"`
	Amount             string             `json:"amount"`
	Currency           string             `json:"currency"`
	PaymentName        string             `json:"payment_name"`
	PaymentDescription string             `json:"payment_description"`
	PaidBy             string             `json:"paid_by"`
	Note               string             `json:"note"`
	PaymentStatus      string             `json:"payment_status"`
	PaymentStatusDate  string             `json:"payment_status_date"`
	Transactions       []QpayTransactions `json:"transactions"`
}

type QpayPaymentCheckRequest

type QpayPaymentCheckRequest struct {
	InvoiceID string `json:"invoice_id"`
}

type QpayPaymentCheckResponse

type QpayPaymentCheckResponse struct {
	ID                string        `json:"id"`
	InvoiceStatus     string        `json:"invoice_status"`
	InvoiceStatusDate string        `json:"invoice_status_date"`
	Payments          []QpayPayment `json:"payments"`
}

type QpayPersonCreateRequest

type QpayPersonCreateRequest struct {
	RegisterNo string `json:"register_number"`
	FirstName  string `json:"first_name"`
	LastName   string `json:"last_name"`
	MCCcode    string `json:"mcc_code"`
	City       string `json:"city"`
	District   string `json:"district"`
	Address    string `json:"address"`
	Phone      string `json:"phone"`
	Email      string `json:"email"`
}

type QpayPersonCreateResponse

type QpayPersonCreateResponse struct {
	ID         string `json:"id"`
	VendorID   string `json:"vendor_id"`
	Type       string `json:"type"`
	RegisterNo string `json:"register_number"`
	FirstName  string `json:"first_name"`
	LastName   string `json:"last_name"`
	MCCcode    string `json:"mcc_code"`
	City       string `json:"city"`
	District   string `json:"district"`
	Address    string `json:"address"`
	Phone      string `json:"phone"`
	Email      string `json:"email"`
}

type QpayTransactions added in v1.2.31

type QpayTransactions struct {
	ID                  string `json:"id"`
	Description         string `json:"description"`
	TransactionBankCode string `json:"transaction_bank_code"`
	AccountBankCode     string `json:"account_bank_code"`
	AccountBankName     string `json:"account_bank_name"`
	AccountNumber       string `json:"account_number"`
	Status              string `json:"status"`
	Amount              string `json:"amount"`
	Currency            string `json:"currency"`
}

type QpayUrls

type QpayUrls struct {
	Name        string `json:"name"`
	Descriptoin string `json:"description"`
	Link        string `json:"link"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL