Skip to content

Quick start guide for Java developers using the PassKit SDK

Notifications You must be signed in to change notification settings

canderson1538/passkit-java-quickstart-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PassKit Java Quickstart

License: MIT Maven Central

Overview

This quickstart aims to help get Java developers up and running with the PassKit SDK as quickly as possible.

Prerequisites

You will need the following:

Configuration

  1. Download or clone this quickstart repository, create a folder src/main/resources/credentials and add the following three PassKit credential files:

    • certificate.pem
    • ca-chain.pem
    • key-java.pem

    You can disregard the key.pem credentials file as it is not compatible with Java.

  2. Edit src/main/resources/passkit.properties

    • set credentials.password to the password that you set when requesting your SDK credentials from https://app.passkit.com
    • set other options as required
  3. If you wish to receive enrolment emails, edit lines 190 and 203 of the QuickStartLoyalty class to provide an address where you can receive mail.

Running the tests

Run gradle test --tests QuickstartLoyaltyTest or gradle test --tests QuickstartLEventTicketsTest

The Loyalty tests will create a membership program with 2 tiers, base and VIP. It will enrol two members, one in each tier.

The Event Tickets tests will create a venue, production, and event with 2 ticket types and create 2 tickets with the same order number.

The tests will display URLs to the generated passes and to the enrolment page. It will pause for a period determined in passkit.properties for you to check them.

The tests will then delete and clean-up all assets that it created.

Notes

For implementing in your own projects, use the GrpcConnection class to manage connection to the PassKit gRPC endpoints.

Use the GrpcConnection's ManagedChannel object to create the stubs you require in your implementation.

About

Quick start guide for Java developers using the PassKit SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%