Skip to content

sonda2208/pmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pmt

An implementation of the recipient side of Google Payment Method Token for verifying callbacks from Google Pay API for Passes

d, err := pmt.NewGPayKeysDownloader(pmt.WithEndpoint(pmt.GooglePassesKeysURL))
// handle error here

m, err := pmt.NewGPayPublicKeysManager(pmt.WithKeysDownloader(d))
// handle error here

r, err := pmt.NewPaymentMethodTokenRecipient(
    pmt.WithProtocolVersion(pmt.ECv2SigningOnly),
    pmt.WithSenderID("GooglePayPasses"),
    pmt.WithRecipientID("<your issuer ID>"),
    pmt.WithKeysManager(m),
)
// handle error here

sealedMessage := []byte(`<sealed message from Google>`)
msg, err := r.Unseal(sealedMessage)
// handle error here
// use "msg" to extract the details

About

Google PaymentMethodToken verifier

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages