This is a React Native module designed to simplify the integration of Wallet functionality for both iOS and Android using Expo. It allows you to add, and in the future, interact with all the features available on the iOS Wallet and Google Pay apps, within your React Native application.
To get started, follow this step: Install the module using npm or yarn:
npm install @giulio987/expo-wallet
or
yarn add @giulio987/expo-wallet
iOS: The pass must be a base64 encoded string of the .pkpass file
To add a card to the Wallet app, use the addPass method
const addToWallet = async () => {
try {
const res = await ExpoWallet.addPass(Platform.OS === "ios" ? pass : token);
} catch (error) {
}
};
To verify if the Wallet is available, use the isAvailable method
const isAvailable = async () => {
const res = await ExpoWallet.isAvailable();
if (res) {
alert('Available');
} else {
alert('Not available');
}
};
- Checking if a Card is in Wallet
Feel free to contribute to this project! If you have any feature requests, bug reports, or other contributions, please open an issue or submit a pull request.
This module is released under the GPL-3.0 License.