Last updated:
0 purchases
hungtm5 kyc
Kyc Flutter Guide #
Kyc Plugin
Install #
IOS #
infor.plist
<key>NSCameraUsageDescription</key>
<string>Camera permission</string>
<key>NFCReaderUsageDescription</key>
<string>NFC permission</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>00000000000000</string>
<string>A0000002471001</string>
<string>A0000002472001</string>
</array>
copied to clipboard
podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
copied to clipboard
ANDROID #
add permission in AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.NFC" />
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-feature
android:name="android.hardware.nfc"
android:required="false" />
copied to clipboard
Trong build.gradle (project) thêm các cấu hình như sau
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
maven {
url = uri("https://maven.pkg.github.com/pvcbdigibank/SDK-KYC-v2-ANDROID")
credentials {
username = ""
password = "<Access Key>"
}
}
}
}
copied to clipboard
Init #
final kyc = Kyc();
void _setupEventListener() {
kyc.eventStream.listen(
(event) {
},
onError: (error) {
},
);
}
copied to clipboard
Open a bank account #
Open an account instantly with just your phone number and email
Future<void> _startEKyc(email, phone, editable, requireEmail) async {
setState(
() {
kycStatus = "Starting KYC...";
},
);
try {
KycConfig config = KycConfig(
env: Environment.PROD,
debug: true,
appCode: "ONBOARD",
appId: "ONBOARD",
storeAppKey: "",
partnerUserId: "partner.user.id",
email: email,
phone: phone,
requireEmail: requireEmail);
await pvcomBankKyc.eKyc(config);
} catch (e) {
setState(() {
kycStatus = "Error starting KYC: $e";
});
}
}
copied to clipboard
trustData #
Share data into create all services
Future<void> _trustData() async {
setState(() {
kycStatus = "Starting KYC Liveness...";
});
try {
KycConfig config = KycConfig(
env: Environment.UAT,
debug: true,
appCode: "ONBOARD",
appId: "ONBOARD",
storeAppKey: "",
partnerUserId: "partner.user.id",
email: email,
phone: phone,
trustDataConfirm: urlConfirm);
await pvcomBankKyc.eKycTrustData(config);
} catch (e) {
setState(() {
kycStatus = "Error starting KYC Liveness: $e";
});
}
}
copied to clipboard
trustDataV2 #
Share data but do not create pvconnect
Future<void> _trustDataV2() async {
setState(() {
kycStatus = "Starting KYC by Data...";
});
try {
KycConfig config = KycConfig(
env: Environment.PROD,
debug: true,
appCode: "ONBOARD",
appId: "ONBOARD",
storeAppKey: "",
partnerUserId: "partner.user.id",
email: email,
phone: phone,
);
await pvcomBankKyc.eKycTrustDataV2(config);
} catch (e) {
setState(() {
kycStatus = "Error starting KYC by Data: $e";
});
}
}
copied to clipboard
Callback #
void _setupEventListener() {
pvcomBankKyc.eventStream.listen(
(event) {
print('Kyc received event: $event');
if (event is Map<String, dynamic>) {
//TODO: Your code here
}
},
onError: (error) {
print('Kyc error: $error');
setState(() {
kycStatus = "Error: $error";
});
},
);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.