vcip_sdk_new 0.0.5
vcip_sdk_new: ^0.0.5 copied to clipboard
A Flutter package for handling VCIP (Video Customer Identification Process) with features for PAN card input and result display.
vcip_sdk_new A Flutter package for handling the Video Customer Identification Process (VCIP) with features for PAN card input and result display.
Features Securely captures PAN card details through a dedicated input screen.
Provides a screen to display the VCIP process results.
Built with a focus on a smooth user experience for identity verification.
Getting started Installation Add vcip_sdk_new to your pubspec.yaml file:
YAML
dependencies: vcip_sdk_new: 0.0.5 Then, run flutter pub get in your terminal to install the package.
Usage To use the screens provided by this package, import the necessary files and navigate to them within your app's navigation flow.
Here is an example of how you can use the PanInputScreen and PanResultScreen:
Dart
import 'package:flutter/material.dart'; import 'package:vcip_sdk_new/screens/pan_input_screen.dart'; import 'package:vcip_sdk_new/screens/pan_result_screen.dart';
void main() { runApp(const MyApp()); }
class MyApp extends StatelessWidget { const MyApp({super.key});
@override Widget build(BuildContext context) { return MaterialApp( home: PanInputScreen(onPanSubmitted: (panNumber) { // Handle the submitted PAN number, then navigate to the result screen print('PAN submitted: $panNumber'); Navigator.of(context).push( MaterialPageRoute( builder: (context) => const PanResultScreen( // Pass a result object to the screen status: 'Success', message: 'PAN verification complete.', ), ), ); }), ); } }
Start KYC Flow #
Use startKycFlow() to initiate the Aadhaar verification process.
Future<void> startKyc() async {
final result = await MySdk.startKycFlow(
context,
mobileNumber: "9876543210",
entityID: 123,
autoSubmitIfPrefilled: true,
companyCode: "ABC001",
applicationId: "com.example.myapp",
appSignature:
"AA:BB:CC:DD:EE:FF:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:22:33:44:55:66:77:88:99:AA:BB",
);
'Result from SDK';
'This result coming from when use ovse option other wise go to else condition';
if (result.intenturl != null) {
final aadhaarResponse =
await NativeBridge.openAadhaarApp(result.intenturl!);
if (aadhaarResponse.containsKey("error")) {
print(aadhaarResponse["error"]);
return;
}
// Submit the Aadhaar App response to OVSE.
final ovseResponse = await MySdk.submitToBackend(
aadhaarResponse["status"],
result.txnId ?? "",
aadhaarResponse["response"],
aadhaarResponse["timestamp"],
);
if (ovseResponse != null) {
print("Response Code: ${ovseResponse.responsecode}");
print("Message: ${ovseResponse.message}");
print("Next Intent URL: ${ovseResponse.intenturl}");
}
}
}
Submit Aadhaar Response to OVSE #
After the user completes Aadhaar verification, the Aadhaar App returns the following values:
statusresponsetimestamp
Pass these values, along with the transaction ID received from startKycFlow(), to the OVSE backend using submitToBackend().
```dart
final ovseResponse = await MySdk.submitToBackend(
aadhaarResponse["status"],
txnId,
aadhaarResponse["response"],
aadhaarResponse["timestamp"],
);
```
Parameters #
| Parameter | Description |
|---|---|
status |
Status returned by the Aadhaar App. |
txnId |
Transaction ID received from startKycFlow(). |
response |
Encrypted token returned by the Aadhaar App. |
timestamp |
Timestamp returned by the Aadhaar App. |
Response #
The SDK returns an OVSE response containing:
| Field | Description |
|---|---|
responsecode |
Response code returned by OVSE. |
message |
Success or error message. |
intenturl |
Next intent URL, if further processing is required. |
Important
The
responsevalue is an encrypted token generated by the Aadhaar App. Pass it to the OVSE backend exactly as received. Do not modify, encode, or decode this value before callingsubmitToBackend(). Additional information We welcome contributions! Please feel free to open an issue or submit a pull request on the GitHub repository.