Skip to content

Commit f3964b7

Browse files
authored
Merge pull request #24 from Expensify/@Skalakid/update-README
Update README
2 parents 1d327eb + 2ed4276 commit f3964b7

2 files changed

Lines changed: 36 additions & 31 deletions

File tree

README.md

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# react-native-wallet
1+
<img src="./assets/hero-image.png" alt="@expensify/react-native-wallet" />
22

33
## Features
4-
- ⚛️ Card Push Provisioning seamless integration
4+
- ⚛️ Card In-App Provisioning seamless integration
55
- ♻️ Universal solution (Apple Wallet and Google Wallet)
66
- 💳 Easy and secure addition of payment cards from your app directly
77

@@ -111,8 +111,8 @@ Here you can find data elements used in the library, essential to work with Goog
111111

112112
### Android
113113
- **Opaque Payment Card** (OPC) - a binary blob of information Google Pay receives from the issuer app that could be presented to TSP to receive a token.
114-
- **Token Service Provider** (TSP) - a service that enhances payment security by replacing a credit card number during transactions with a unique digital identifier - token. The TSP specifies the tokenization service used to create a given token e.g. Visa, MasterCard, American Express.
115-
- **Token Reference ID** - a unique identifying number to refer to a DPAN (Dynamic Personal Account Number). Token Providers will assign each DPAN an issuer token ID at the time of tokenization.
114+
- **Token Service Provider** (TSP) - a service that enhances payment security by replacing a credit card number during transactions with a unique digital identifier - token. The TSP specifies the tokenization service used to create a given token e.g. Visa, MasterCard, American Express.
115+
- **Token Reference ID** - a unique identifying number to refer to a DPAN (Dynamic Personal Account Number). Token Providers will assign each DPAN an issuer token ID at the time of tokenization.
116116

117117
### iOS
118118
- **Nonce** - a one-time nonce value generated by Apple’s servers. This nonce must be included in the add payment request’s encrypted data.
@@ -126,27 +126,27 @@ The library offers five functions for seamless integration and use of the Apple
126126

127127
## Functions
128128

129-
| Function | Description | Parameters | Returns / Type | iOS | Andorid |
129+
| Function | Description | Parameters | Returns / Type | iOS | Android |
130130
|----------|-------------|------------|----------------|:---:|:-------:|
131131
| **getSecureWalletInfo** | Returns necessary platform-specific wallet information for secure transactions. | None | `WalletData` |||
132132
| **checkWalletAvailability** | Checks if the wallet is ready and initializes it if possible. | None | `boolean` |||
133133
| **getCardStatusBySuffix** | Retrieves the current status of a card in the wallet. | `lastDigits: string`<br>(The last few digits of the card number) | `CardStatus` |||
134-
| **getCardStatusByIdentifier** | Returns the state of a card based on a platform-specific identifier. On Android, it's `Token Reference ID` and on iOS, it's `Primary Account Identifier`. | `identifier: string`<br>`tsp: string` | `CardStatus` | ||
135-
| **addCardToGoogleWallet** | Initiates native Push Provisioning flow for adding a card to the Google Wallet. | `data`: `AndroidCardData` | `TokenizationStatus` || |
136-
| **addCardToAppleWallet** | Initiates native Push Provisioning flow for adding a card to the Apple Wallet. | `data`: `IOSCardData`<br>`issuerEncryptPayloadCallback: IOSIssuerCallback` | `void` |||
134+
| **getCardStatusByIdentifier** | Returns the state of a card based on a platform-specific identifier. On Android, it's `Token Reference ID` and on iOS, it's `Primary Account Identifier`. | `identifier: string`,<br>`tsp: string` | `CardStatus` |||
135+
| **addCardToGoogleWallet** | Initiates native Push Provisioning flow for adding a card to the Google Wallet. | `data`: `AndroidCardData` | `TokenizationStatus` |||
136+
| **addCardToAppleWallet** | Initiates native Push Provisioning flow for adding a card to the Apple Wallet. | `data`: `IOSCardData`,<br>`issuerEncrypt-`<br>`PayloadCallback: IOSIssuerCallback` | `void` |||
137137

138138

139139
## Data Types
140140

141141
| Type | Description | Fields |
142142
|------|-------------|--------|
143-
| **AndroidWalletData** | Specific information for Android devices required for wallet transactions. | `deviceID: string`<br>`walletAccountID: string` |
144-
| **AndroidCardData** | Data related to a card that is to be added on Android platform wallets. | `network: string`<br>`opaquePaymentCard: string`<br>`cardHolderName: string`<br>`lastDigits: string`<br>`userAddress: UserAddress` |
145-
| **UserAddress** | Structured address used for cardholder verification. | `name: string`<br>`addressOne: string`<br>`addressTwo: string`<br>`city: string`<br>`administrativeArea: string`<br>`countryCode: string`<br>`postalCode: string`<br>`phoneNumber: string` |
146-
| **IOSCardData** | Data related to a card that is to be added on iOS platform. | `network: string`<br>`activationData: string`<br>`encryptedPassData: string`<br>`ephemeralPublicKey: string`<br>`cardHolderTitle: string`<br>`cardHolderName: string`<br>`lastDigits: string`<br>`cardDescription: string`<br>`cardDescriptionComment: string` |
147-
| **onCardActivatedPayload** | Data used by listener to notice when a card’s status changes. | `tokenId: string`<br> `actionStatus: 'activated' \| 'canceled'`<br> |
148-
| **IOSIssuerCallback** | This callback is invoked with a nonce, its signature, and a certificate array obtained from Apple. It is expected that you will forward these details to your server or the card issuer's API to securely encrypt the payload required for adding cards to the Apple Wallet. | `(nonce: string, nonceSignature: string, certificate: string[]) => IOSEncryptPayload` |
149-
| **IOSEncryptPayload** | An object containing the necessary elements to complete the addition of a card to Apple Wallet. | `encryptedPassData: string`<br>`activationData: string`<br>`ephemeralPublicKey: string` |
143+
| **AndroidWalletData** | Specific information for Android devices required for wallet transactions. | `deviceID: string`,<br>`walletAccountID: string` |
144+
| **AndroidCardData** | Data related to a card that is to be added on Android platform wallets. | `network: string`,<br>`opaquePaymentCard: string`,<br>`cardHolderName: string`,<br>`lastDigits: string`,<br>`userAddress: UserAddress` |
145+
| **UserAddress** | Structured address used for cardholder verification. | `name: string`,<br>`addressOne: string`,<br>`addressTwo: string`,<br>`city: string`,<br>`administrativeArea: string`,<br>`countryCode: string`,<br>`postalCode: string`,<br>`phoneNumber: string` |
146+
| **IOSCardData** | Data related to a card that is to be added on iOS platform. | `network: string`,<br>`activationData: string`,<br>`encryptedPassData: string`,<br>`ephemeralPublicKey: string`,<br>`cardHolderTitle: string`,<br>`cardHolderName: string`,<br>`lastDigits: string`,<br>`cardDescription: string`,<br>`cardDescriptionComment: string` |
147+
| **onCardActivatedPayload** | Data used by listener to notice when a card’s status changes. | `tokenId: string`,<br> `actionStatus: 'activated' \| 'canceled'`<br> |
148+
| **IOSIssuerCallback** | This callback is invoked with a nonce, its signature, and a certificate array obtained from Apple. It is expected that you will forward these details to your server or the card issuer's API to securely encrypt the payload required for adding cards to the Apple Wallet. | `(nonce: string, nonceSignature: string, certificate: string[]) => IOSEncryptPayload` |
149+
| **IOSEncryptPayload** | An object containing the necessary elements to complete the addition of a card to Apple Wallet. | `encryptedPassData: string`,<br>`activationData: string`,<br>`ephemeralPublicKey: string` |
150150

151151
## Card Status
152152

@@ -158,17 +158,19 @@ The library offers five functions for seamless integration and use of the Apple
158158

159159
| Listener | Event Description | Register Function | Unregister Function |
160160
|----------|-------------------|-------------------|---------------------|
161-
| **_cardActivation_** | Notifies when a card's status changes to activated. | `addListener(event: string, callback: (data: onCardActivatedPayload) => void): EmitterSubscription` | `removeListener(subscription: EmitterSubscription): void` |
161+
| **_cardActivation_** | Notifies when a card's status changes to activated. | `addListener(event: string, callback: (data: onCardActivatedPayload) => void): EmitterSubscription` | `removeListener(subscription: EmitterSubscription): void` |
162162

163163
## Components
164164

165165
### `AddToWalletButton`
166166

167167
A ready-to-use component that simplifies the addition of payment cards to Google Wallet and Apple Wallet. The button automatically adapts its appearance according to the platform and language specified.
168+
It uses official assets provided by [Google](https://developers.google.com/wallet/generic/resources/brand-guidelines) and [Apple](https://developer.apple.com/wallet/add-to-apple-wallet-guidelines/) in their Wallet-related branding guidelines.
168169

169-
> [!NOTE]
170-
> Please bear in mind the brand rules provided by [Google](https://developers.google.com/wallet/generic/resources/brand-guidelines) and [Apple](https://developer.apple.com/wallet/add-to-apple-wallet-guidelines/) when adding this component to your application.
170+
> [!IMPORTANT]
171+
> Please bear in mind the brand rules provided by [Google](https://developers.google.com/wallet/generic/resources/brand-guidelines) and [Apple](https://developer.apple.com/wallet/add-to-apple-wallet-guidelines/) when adding this component to your application.
171172
173+
Adhering to these guidelines is crucial not only to comply with legal requirements but also to reassure users of the authenticity and security of your application.
172174

173175
| Property | Type | Required | Description |
174176
|----------|------|----------|-------------|
@@ -188,6 +190,9 @@ A ready-to-use component that simplifies the addition of payment cards to Google
188190
/>
189191
```
190192

193+
| Android | iOS |
194+
|:----:|:---------------:|
195+
| <img src="./assets/buttons/android/en.svg" height="50" /> | <img src="./assets/buttons/apple/en.svg" height="50" /> |
191196

192197
# Publishing your app
193198

@@ -227,27 +232,27 @@ Additionally, when submitting your app to the App Store, you must include:
227232
- A demo account for testing.
228233
- A demo video showcasing the In-App Provisioning experience.
229234

235+
# Compatibility
236+
237+
`@expensify/react-native-wallet` supports the three latest minor releases of react-native (0.76.0+)
238+
230239

231240
# Contributing
232241

233-
Right now, contributions to this library are done under [https://github.com/Expensify/App](https://github.com/Expensify/App). Please refer to that repo and all it's guidelines for contributing.
242+
Contributions to this library are done under [https://github.com/Expensify/App](https://github.com/Expensify/App). Please refer to that repo and all its guidelines for contributing.
234243

235244
## License
236245

237246
MIT
238247

239248
----------
240249

241-
<p align="center">
242-
243-
<picture>
250+
This library is co-developed by [**Software Mansion**](https://swmansion.com/), React Native core contributors and experts in buildind high-performing mobile solutions, in collaboration with [**Expensify**](https://www.expensify.com/), a leader in streamlining business expenses, travel, and invoice management for clearer financial oversight.
244251

245-
<source media="(prefers-color-scheme: light)" srcset="./assets/signature-light.png" />
246-
247-
<source media="(prefers-color-scheme: dark)" srcset="./assets/signature-dark.png" />
248-
249-
<img alt="Brought to you by Software Mansion + Expensify" src="./assets/signature-light.png" width="600" />
250-
251-
</picture>
252-
253-
</p>
252+
<p align="center">
253+
<picture>
254+
<source media="(prefers-color-scheme: light)" srcset="./assets/signature-light.png" />
255+
<source media="(prefers-color-scheme: dark)" srcset="./assets/signature-dark.png" />
256+
<img alt="Brought to you by Software Mansion + Expensify" src="./assets/signature-light.png" width="600" />
257+
</picture>
258+
</p>

assets/hero-image.png

71.5 KB
Loading

0 commit comments

Comments
 (0)