Documentation ¶
Index ¶
- func GetStatusReason(code int64) (reason string, err error)
- type AuthorizedPaymentTransaction
- type PaymentTransaction
- type RefundTransaction
- type Transaction
- type TransactionStatus
- type TransactionType
- type VPOS
- func (v *VPOS) GetRequest(transactionID string) (result int64, err error)
- func (v *VPOS) GetTransaction(transactionID string) (transaction Transaction, err error)
- func (v *VPOS) PaymentTransaction(transactionType TransactionType, mobile, amount string) (transactionID, idempotencyKey, nonce string, timeRemaining int64, err error)
- func (v *VPOS) PaymentWithAuthorization(parent_transaction_id, amount string) (transactionID, idempotencyKey, nonce string, timeRemaining int64, err error)
- func (v *VPOS) RefundOrCancelation(transactionType TransactionType, parentTransactionID string) (transactionID, idempotencyKey, nonce string, timeRemaining int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStatusReason ¶
Types ¶
type AuthorizedPaymentTransaction ¶
type AuthorizedPaymentTransaction struct { Type TransactionType `json:"type"` ParentTransactionID string `json:"parent_transaction_id"` Amount string `json:"amount"` CallbackURL string `json:"callback_url"` }
type PaymentTransaction ¶
type PaymentTransaction struct { Type TransactionType `json:"type"` PosID int64 `json:"pos_id"` Mobile string `json:"mobile"` Amount string `json:"amount"` CallbackURL string `json:"callback_url"` }
type RefundTransaction ¶
type RefundTransaction struct { Type TransactionType `json:"type"` ParentTransactionID string `json:"parent_transaction_id"` CallbackURL string `json:"call_back_url"` }
type Transaction ¶
type Transaction struct { ID string `json:"id"` Amount string `json:"amount"` ClearingPeriod string `json:"clearing_period"` Mobile string `json:"mobile"` ParentTransactionID string `json:"parent_transaction_id"` PosID int64 `json:"pos_id"` Status string `json:"status"` StatusDatetime string `json:"status_datetime"` StatusReason string `json:"status_reason"` Type TransactionType `json:"type"` }
type TransactionStatus ¶
type TransactionType ¶ added in v1.1.0
type TransactionType string
const ( TypePayment TransactionType = "payment" TypeRefund TransactionType = "refund" TypeAuthorization TransactionType = "authorization" TypeCancelation TransactionType = "cancelation" )
type VPOS ¶
type VPOS struct { Token string //Your VPOS Token PosID int64 //Your GPO POS ID PaymentCallbackURL string //Your Payment Callback URL RefundCallbackURL string //Your Refund Callback URL SupervisorCard string //Your GPO Supervisor Card }
func (*VPOS) GetRequest ¶ added in v1.1.0
func (*VPOS) GetTransaction ¶
func (v *VPOS) GetTransaction(transactionID string) (transaction Transaction, err error)
func (*VPOS) PaymentTransaction ¶
func (v *VPOS) PaymentTransaction(transactionType TransactionType, mobile, amount string) (transactionID, idempotencyKey, nonce string, timeRemaining int64, err error)
transactionType is either 'payment' or 'authorization' if transactionType is 'payment', it will create a new payment transaction if transactionType is 'authorization', it will create a new authorization transaction
func (*VPOS) PaymentWithAuthorization ¶
func (v *VPOS) PaymentWithAuthorization(parent_transaction_id, amount string) (transactionID, idempotencyKey, nonce string, timeRemaining int64, err error)
It creates a new payment transaction from a previously accepted authorization transaction
func (*VPOS) RefundOrCancelation ¶
func (v *VPOS) RefundOrCancelation(transactionType TransactionType, parentTransactionID string) (transactionID, idempotencyKey, nonce string, timeRemaining int64, err error)
transactionType is either 'refund' or 'cancelation' if transactionType is 'refund', it will create a new refund transaction if transactionType is 'cancelation', it will create a new cancelation transaction for a previously accepted payment authorization
Click to show internal directories.
Click to hide internal directories.