miyabi / react-native-passkit-wallet

React Native module to handle PassKit.
MIT License
52 stars 37 forks source link

How to create base64EncodedPass #26

Open kolindalanaresh opened 1 year ago

kolindalanaresh commented 1 year ago

Can someone please help us how to create a base64EncodedPass.

DhvaniChavda commented 1 year ago

import { fromByteArray } from 'base64-js'; import { TextEncoder } from 'text-encoding-utf-8';

const passString = JSON.stringify(boardingPass); //boardingPass= your pass const passBytes = fromByteArray(new TextEncoder().encode(passString));