Skip to content

Go library that support Apple Local In-App Purchase (IAP) receipt processing.

License

Notifications You must be signed in to change notification settings

googollee/iaplocal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Build Status

Description

iaplocal is a Go library that supports Apple Local In-App Purchase (IAP) receipt processing.

  • Verify the receipt signature against App Root CA certificate.
  • Parse the receipt from binary, extract in-app receipts.
  • Validate the receipts hash with host GUID.

Installation

go install github.com/googollee/iaplocal

Usage

The simplest possible usage is:

rootBytes, _ := ioutil.ReadFile("./AppleComputerRootCertificate.cer")
rootCA, _ := x509.ParseCertificate(rootBytes)

receiptB64, _ := ioutil.ReadFile("./receipt_b64")
receiptBytes, _ := base64.StdEncoding.DecodeString(string(receiptB64))
receipt, _ := iaplocal.Parse(rootCA, receiptBytes)

guid, _ := uuid.FromString(hostGUID)
receipt.Verify(guid)

License

See LICENSE.

About

Go library that support Apple Local In-App Purchase (IAP) receipt processing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages