Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPaymentID ¶
func CheckPaymentID(paymentID string)
Types ¶
type AuthResponse ¶
type AuthResponse struct { TokenType string `json:"token_type"` RefreshExpiresIn int `json:"refresh_expires_in"` RefreshToken string `json:"refresh_token"` 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"` }
func Authenticate ¶
func Authenticate() (*AuthResponse, error)
type Bill ¶
type Bill struct { TemplateID string `json:"template_id"` MerchantID string `json:"merchant_id"` BranchID string `json:"branch_id"` PosID string `json:"pos_id"` Receiver Receiver `json:"receiver"` BillNumber string `json:"bill_no"` Date string `json:"date"` Description string `json:"description"` Amount int `json:"amount"` BtukCode string `json:"btuk_code"` VatFlag string `json:"vat_flag"` }
type BillResponse ¶
type BillResponse struct { PaymentID int64 `json:"payment_id"` QPayCode string `json:"qPay_QRcode"` QPayImage string `json:"qPay_QRimage"` QPayURL string `json:"qPay_url"` QPayShortURL string `json:"qPay_shortUrl"` QPayDeepLink []struct { Name string `json:"name"` Link string `json:"link"` } `json:"qPay_deeplink"` }
func CreateBill ¶
func CreateBill(bill Bill) (*BillResponse, error)
type CheckResponse ¶
type CheckResponse struct { ID int64 `json:"id"` TemplateID string `json:"template_id"` MerchantID string `json:"merchant_id"` BranchInfo struct { ID string `json:"id"` Email string `json:"email"` Name string `json:"name"` Phone interface{} `json:"phone"` Address interface{} `json:"address"` } `json:"branch_info"` StaffInfo interface{} `json:"staff_info"` MerchantCustomerInfo struct { ID string `json:"id"` RegisterNo string `json:"register_no"` Name string `json:"name"` Email string `json:"email"` PhoneNumber string `json:"phone_number"` Note string `json:"note"` } `json:"merchant_customer_info"` BillNo string `json:"bill_no"` AllowPartialPayment bool `json:"allow_partial_payment"` AllowTip bool `json:"allow_tip"` CurrencyType string `json:"currency_type"` GoodsDetail []struct { ID interface{} `json:"id"` Name string `json:"name"` BarCode interface{} `json:"bar_code"` Quantity int `json:"quantity"` UnitPrice int `json:"unit_price"` TaxInfo []interface{} `json:"tax_info"` } `json:"goods_detail"` Surcharge struct { } `json:"surcharge"` Discount struct { } `json:"discount"` Note interface{} `json:"note"` Attach interface{} `json:"attach"` PaymentMethod string `json:"payment_method"` CustomerQr interface{} `json:"customer_qr"` VatInfo struct { IsAutoGenerate bool `json:"is_auto_generate"` Vats []interface{} `json:"vats"` } `json:"vat_info"` PaymentInfo struct { PaymentStatus string `json:"payment_status"` TransactionID interface{} `json:"transaction_id"` LastPaymentDate interface{} `json:"last_payment_date"` Transactions []interface{} `json:"transactions"` } `json:"payment_info"` }
func Check ¶
func Check(billNumber string) (*CheckResponse, error)
Click to show internal directories.
Click to hide internal directories.