utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PHYSICAL = "PHYSICAL"
	VIRTUAL  = "VIRTUAL"
)

Basket item types

View Source
const (
	TL  = "TRY"
	EUR = "EUR"
	USD = "USD"
	GBP = "GBP"
	IRR = "IRR"
	NOK = "NOK"
	RUB = "RUB"
	CHF = "CHF"
)

Currency

View Source
const (
	TR = "tr"
	EN = "en"
)

Locale

View Source
const (
	MOBILE         = "MOBILE"
	WEB            = "WEB"
	MOBILE_WEB     = "MOBILE_WEB"
	MOBILE_IOS     = "MOBILE_IOS"
	MOBILE_ANDROID = "MOBILE_ANDROID"
	MOBILE_WINDOWS = "MOBILE_WINDOWS"
	MOBILE_TABLET  = "MOBILE_TABLET"
	MOBILE_PHONE   = "MOBILE_PHONE"
)

Payment channels

View Source
const (
	PRODUCT      = "PRODUCT"
	LISTING      = "LISTING"
	SUBSCRIPTION = "SUBSCRIPTION"
)

Payment groups

View Source
const SINGLE_INSTALLMENT = "1"

Variables

This section is empty.

Functions

func GenerateHashHMACSHA256

func GenerateHashHMACSHA256(randomKey, uriPath, requestBody, secretKey string) string

func JsonEncode

func JsonEncode(jsonObject map[string]interface{}) (string, error)

func NewJsonBuilder

func NewJsonBuilder() *jsonBuilder

func NewRequestStringBuilder

func NewRequestStringBuilder() *requestStringBuilder

func RandString

func RandString(n int) string

Types

type RequestConvertible

type RequestConvertible interface {
	ToPKIRequestString() string
	GetJsonObject() map[string]interface{}
}

Jump to

Keyboard shortcuts

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