pkg

package
v0.0.0-...-f9fff31 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	// GetMDKToken function gets the MDK token from card information
	GetMDKToken(cardInfo *veritrans.ClientCardInfo) (string, error)
	// CreateAccount function creates a veritrans account
	CreateAccount(accountParam *veritrans.AccountParam) (*veritrans.Account, error)
	// UpdateAccount function updates the veritrans account
	UpdateAccount(accountParam *veritrans.AccountParam) (*veritrans.Account, error)
	// CreateCard function adds a card into the account
	CreateCard(accountParam *veritrans.AccountParam) (*veritrans.Account, error)
	// UpdateCard function adds a card into the account
	UpdateCard(accountParam *veritrans.AccountParam) (*veritrans.Account, error)
	// DeleteCard function adds a card into the account
	DeleteCard(accountParam *veritrans.AccountParam) (*veritrans.Account, error)
	// GetCard function adds a card into the account
	GetCard(accountParam *veritrans.AccountParam) (*veritrans.Account, error)
	// Authorize function executes the veritrans payment
	Authorize(param *veritrans.Params) error
	// Authorize function executes the veritrans payment
	Capture(param *veritrans.Params) error
	// Cancel function cancels the veritrans payment
	Cancel(param *veritrans.Params) error
}

Service of the veritrans payment

func NewLoggingMiddleware

func NewLoggingMiddleware(logger log.Logger, service Service) Service

NewLoggingMiddleware function

func NewService

func NewService(config *ServiceConfig) Service

NewService initializes the veritrans service

type ServiceConfig

type ServiceConfig struct {
	MDKConfig        veritrans.MDKConfig
	ConnectionConfig veritrans.ConnectionConfig
}

ServiceConfig struct

func GetServiceConfig

func GetServiceConfig() *ServiceConfig

GetServiceConfig initializes the service configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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