Extract relevant data from InstaPay QR code.
| iOS | Android | Web | Windows | macOS | |
|---|---|---|---|---|---|
| Expo | ✅ | ✅ | ✅ | 🚫 | 🚫 |
| Native | ✅ | ✅ | ✅ | ❌ | ❌ |
yarn add react-native-instapay-qr
npx pod-install # iOS OnlyAdd the following to your AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />Add the following to your Info.plist:
<key>NSCameraUsageDescription</key>
<string/>expo install react-native-instapay-qr expo-camera expo-barcode-scanner
npx pod-install # iOS Only💡 If you use the Expo managed workflow you will see "CocoaPods is not supported in this project" - this is fine, it's not necessary.
import { useState } from 'react';
import InstaPayQr from 'react-native-instapay-qr';
function App() {
const [scanning, setScanning] = useState(true);
const onRead = (data, errors) {
if (errors.length > 0) return;
console.log(data);
setScanning(false);
};
return (
<InstaPayQr
style={{ height: 300, width: 300 }}
cameraStyle={{ flex: 1 }}
onRead={onRead}
scanning={scanning}
/>
);
}{
countryCode: 'PH',
city: 'Makati',
name: 'Account Name',
accountNumber: 'XXXXXXXXXXXX',
swiftCode: 'UBPHPHMMXXX',
bankName: 'UNION BANK OF THE PHILIPPINES',
}| Attribute | Type | Default |
|---|---|---|
| style | React Native Style | {} |
| cameraStyle | React Native Style | {} |
| onRead | Function | () => null |
| scanning | Boolean | true |
| children | Node | null |
See UPGRADING.md
See CHANGELOGS.md
See CONTRIBUTING.md
Copyright © 2022 David Angulo, released under the MIT license, see LICENSE.