@tonder.io/rn-sdk 0.1.7-beta.DEV1799.7abf93b → 0.1.7-beta.DEV1799.f93aa5e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -523,7 +523,7 @@ import {
|
|
|
523
523
|
} from '@tonder.io/rn-sdk';
|
|
524
524
|
|
|
525
525
|
export default function EnrollmentLiteScreen() {
|
|
526
|
-
const { create, saveCustomerCard, reset } = useTonder<SDKType.ENROLLMENT>();
|
|
526
|
+
const { create, saveCustomerCard, reset, getCardSummary } = useTonder<SDKType.ENROLLMENT>();
|
|
527
527
|
|
|
528
528
|
const customerData: ICustomer = {
|
|
529
529
|
email: 'test@example.com',
|
|
@@ -554,7 +554,8 @@ export default function EnrollmentLiteScreen() {
|
|
|
554
554
|
return;
|
|
555
555
|
}
|
|
556
556
|
console.log('Card saved successfully:', response);
|
|
557
|
-
|
|
557
|
+
// GET summary card
|
|
558
|
+
await handleGetSummaryCard(response.skyflow_id);
|
|
558
559
|
// Reset and reinitialize for next use
|
|
559
560
|
reset();
|
|
560
561
|
await initializeEnrollment();
|
|
@@ -563,6 +564,17 @@ export default function EnrollmentLiteScreen() {
|
|
|
563
564
|
}
|
|
564
565
|
};
|
|
565
566
|
|
|
567
|
+
const handleGetSummaryCard = async (id: string) => {
|
|
568
|
+
const { response, error } = await getCardSummary(id);
|
|
569
|
+
if (error) {
|
|
570
|
+
//Manage error
|
|
571
|
+
Alert.alert('Error', 'Failed to get summary card');
|
|
572
|
+
console.error('Error get summary card: ', error);
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
console.log('Response get summary: ', response);
|
|
576
|
+
};
|
|
577
|
+
|
|
566
578
|
return (
|
|
567
579
|
<SafeAreaView>
|
|
568
580
|
<CardHolderInput />
|