lib

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const URL = "https://api.Tokopay.id/v1"

Variables

This section is empty.

Functions

func GenerateSignatureDefault

func GenerateSignatureDefault(MID string, Secret string) string

func GenerateSignatureOrder

func GenerateSignatureOrder(MID string, Secret string, RefId string) string

func IntToString

func IntToString(val int) string

func SendGet

func SendGet(url string) (string, error)

func SendPostJson

func SendPostJson(url string, data fiber.Map) (string, error)

func StringToInt

func StringToInt(val string) int

func ToIDR

func ToIDR(nominal int) string

Types

type Tokopay

type Tokopay interface {
	Order(params entity.TokopayOrderSimple) (entity.OutputOrderSimple, error)
	OrderAdvanced(params entity.TokopayOrderAdvanced)
	GetInfo() (entity.ReturnInfoMerchant, error)
}

func NewTokopayImpl

func NewTokopayImpl(param entity.TokopayCreden) Tokopay

type TokopayImpl

type TokopayImpl struct {
	MerchantId string
	Secret     string
}

func (TokopayImpl) GetInfo

func (t TokopayImpl) GetInfo() (entity.ReturnInfoMerchant, error)

func (TokopayImpl) Order

func (TokopayImpl) OrderAdvanced

func (t TokopayImpl) OrderAdvanced(params entity.TokopayOrderAdvanced)

Jump to

Keyboard shortcuts

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