Software Development

Open Supply Cross Converter for Cellular Wallets



Posted by Stephen McDonald, Developer Applications Engineer, and Nick Alteen, Technical Author, Engineering, Pockets

Every of the cell pockets apps implement their very own technical specification for passes that may be saved to the pockets. Cross construction and configuration varies by each the pockets utility and the particular sort of cross, which means builders must construct and preserve code bases for every platform.

As a part of Developer Relations for Google Pockets, our objective is to make life simpler for individuals who wish to combine passes into their cell or internet purposes. Right this moment, we’re excited to launch the open-source Cross Converter venture. The Cross Converter helps you to take current passes for one pockets utility, convert them, and make them out there in your cell or internet utility for an additional pockets platform.

Moving image of Pass Converter successfully converting an external pkpass file to a Google Wallet pass

The Cross Converter launches with assist for Google Pockets and Apple Pockets apps, with plans so as to add assist for others sooner or later. For instance, should you construct an occasion ticket cross for one pockets, you need to use the converter to routinely create a cross for an additional pockets. The next record of cross varieties are supported for his or her respective platforms:

  • Occasion tickets
  • Generic passes
  • Loyalty/Retailer playing cards
  • Gives/Coupons
  • Flight/Boarding passes
  • Different transit passes

We designed the Cross Converter with flexibility in thoughts. The next options present further customization to your wants.

  • hints.json file will be offered to the Cross Converter to map Google Pockets cross properties to customized properties in different passes.
  • For cross varieties that require certificates signatures, you’ll be able to merely generate the cross construction and hand it off to your current signing course of
  • Since pictures in Google Pockets passes are referenced by URLs, the Cross Converter can host the pictures itself, retailer them in Google Cloud Storage, or ship them to a different picture host you handle.

If you wish to shortly check changing completely different passes, the Cross Converter features a demo mode the place you’ll be able to load a easy webpage to check changing passes. Later, you’ll be able to run the device through the command line to transform current passes you handle. If you’re able to automate cross conversion, the device will be run as an online service inside your atmosphere.

The next command offers a demo internet web page on http://localhost:3000 to check changing passes.

The following command converts passes regionally. If the output path is omitted, the Cross Converter will output JSON to the terminal (for PKPass information, this would be the contents of cross.json).

node app.js <cross enter path> <cross output path>

Lastly, the next command runs the Cross Converter as an online service. This service accepts POST requests to the basis URL (e.g. https://localhost:3000/) with multipart/form-data encoding. The request physique ought to embody a single cross file.

Able to get began? Take a look at the GitHub repository the place you’ll be able to attempt changing your individual passes. We welcome contributions again to the venture as effectively!

What's your reaction?

Leave A Reply

Your email address will not be published. Required fields are marked *