Skip to content

mcmakler/trustpilot-authenticated-encryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

trustpilot-authenticated-encryption

Go implementation for Trustpilot Business Generated Links:

https://support.trustpilot.com/hc/en-us/articles/115004145087--Business-Generated-Links-for-developers-

Usage

Import

import "github.com/mcmakler/trustpilot-authenticated-encryption/trustpilotLinkGen"

Creating of TrustpilotLinkGenerator interface exemplar:

tLG, err := trustpilotLinkGen.NewTrustpilotLinkGenerator(
	encriptionKey,      //your base64 encoded encryption key 
	authenticationKey,  //your base64 encoded description key
	domain)             //your domain

Creating of payload:

trustpilotData := &trustpilotLinkGen.TrustpilotUserData{
		Email: "test@email.example",
		Name:  "Name Lastname",
		Ref:   "Reference Number",
		Skus:  []string{"Sku1", "Sku2"}, //Can be omitted
		Tags:  []string{"Tag1", "Tag2"}, //Can be omitted
	}

Generating of a link:

link, err := tLG.GenerateBusinessLink(trustpilotData)

About

Go implementation for Trustpilot Business Generated Links

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages