Utils

package
v0.0.0-...-1ef35f0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

******************************************************************************************* Copyright © 2019 Xiippy.ai. All rights reserved. Australian patents awarded. PCT patent pending.

NOTES:

- No payment gateway SDK function is consumed directly. Interfaces are defined out of such interactions and then the interface is implemented for payment gateways. Design the interface with the most common members and data structures between different gateways. - A proper factory or provider must instantiate an instance of the interface that is interacted with. - Any major change made to SDKs should begin with the c sharp SDK with the mindset to keep the high-level syntax, structures and class names the same to minimise porting efforts to other languages. Do not use language specific features that do not exist in other languages. We are not in the business of doing the same thing from scratch multiple times in different forms. - Pascal Case for naming conventions should be used for all languages - No secret or passwords or keys must exist in the code when checked in

*******************************************************************************************

Index

Constants

View Source
const XiippyReqMomentHeader = "XIIPPY-MOMENT-V1"
View Source
const XiippyReqSignatureHeader = "XIIPPY-API-SIG-V1"

Variables

This section is empty.

Functions

func AddXiippyV1RequestSignatureToClient

func AddXiippyV1RequestSignatureToClient(content string, requestObj *http.Request, apiKey string)

func HashHMAC

func HashHMAC(key, message []byte) []byte

func VerifyXiippyV1RequestSignature

func VerifyXiippyV1RequestSignature(content string, moment int64, signature, apiKey string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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