Punchh x-pch-digest Generator
The Punchh x-pch-digest Generator enables developers to generate valid x-pch-digest signatures used for client authentication for Mobile and Online Ordering APIs.
This sample application has methods that show how to generate the x-pch-digest for Mobile and Online Ordering APIs. The methods are generate_SHA1_hash() and generate_SHA256_hash(). The sample application also shows how to properly use these digests to authenticate the HTTPS clients of the Mobile and Online Ordering APIs. It also shows how not to do it.
The sample usage of these APIs shows how to:
- Use the Mobile API to get the program metadata (using the SHA256 hash)
- Sign up an Online Ordering user
- Fetch the user balance of the Online Ordering user (using the SHA1 hash)
Developers and testers can use this code to learn how to properly call Mobile and Online Ordering APIs using standard REST libraries and the x-pch-digest signatures.
Prerequisites
You must have Docker installed and running on your computer for this program to work.
Installation
1. Download the Punchh x-pch-digest Generator zip file here. Access to this file is restricted. Contact your Punchh representative for more information.
2. Extract all files from the zip file.
3. Open the README.md file at the root level and follow the instructions on how to run the program.