Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NetworkToken ¶
type NetworkToken struct {
mixin.Model[NetworkToken]
// Reference to the vault card token (tok_...)
CardTokenId string `json:"cardTokenId"`
// EMV payment token (DPAN) — NOT the real PAN
NetworkToken string `json:"networkToken,omitempty"`
// Token expiry (may differ from card expiry)
TokenExpiry string `json:"tokenExpiry,omitempty"`
// TSP reference ID for lifecycle management
TokenReference string `json:"tokenReference"`
// Payment Account Reference — links tokens across networks
PAR string `json:"par,omitempty"`
// Card network: visa, mastercard, amex
Network Network `json:"network"`
// Current status
Status Status `json:"status"`
// Token Requestor ID (identifies the merchant/platform)
TokenRequestorId string `json:"tokenRequestorId,omitempty"`
// Last successful cryptogram refresh
LastRefreshed time.Time `json:"lastRefreshed,omitempty"`
// Metadata for wallet integrations (Apple Pay, Google Pay)
WalletType string `json:"walletType,omitempty"` // apple_pay, google_pay, none
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
func New ¶
func New(db *datastore.Datastore) *NetworkToken
func (*NetworkToken) Defaults ¶
func (nt *NetworkToken) Defaults()
func (*NetworkToken) IsUsable ¶
func (nt *NetworkToken) IsUsable() bool
IsUsable returns true if the token can be used for transactions.
func (*NetworkToken) MarkDeleted ¶
func (nt *NetworkToken) MarkDeleted() error
Delete marks the token for deletion.
func (*NetworkToken) Resume ¶
func (nt *NetworkToken) Resume() error
Resume reactivates a suspended token.
func (*NetworkToken) Suspend ¶
func (nt *NetworkToken) Suspend() error
Suspend marks the token as suspended (e.g., lost card).
Click to show internal directories.
Click to hide internal directories.