utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMerchantOrderID

func CreateMerchantOrderID() string

CreateMerchantOrderID generates an order ID from the Unix timestamp in SECONDS.

func CreateNonceStr

func CreateNonceStr() string

CreateNonceStr generates a random UUID string. Note: Python uses uuid1 (time-based), Go uses uuid.New() (v4, random). This is generally acceptable and unlikely to be the source of an error.

func CreateTimestamp

func CreateTimestamp() string

CreateTimestamp generates a timestamp in seconds, matching the Python reference.

func SignRequestObject

func SignRequestObject(req map[string]any, privateKeyBase64 string) (string, error)

SignRequestObject prepares the canonical string and signs it using RSA-PSS.

Types

This section is empty.

Jump to

Keyboard shortcuts

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