navigateToCard method
Navigate to the card payment screen.
This method launches the card payment interface where users can enter their card details and complete the payment process.
Parameters
locale
- Locale for the payment screen UItransactionId
- Unique identifier for this transactiononPay
- Callback function called when payment is completedlog
- Optional callback for logging payment events
Usage
await cardSdk.navigateToCard(
Locale('en'),
'txn_12345',
(result) {
if (result.isSuccess) {
print('Payment successful: ${result.transactionId}');
} else {
print('Payment failed: ${result.error}');
}
},
(event) => print('Payment event: $event'),
);
Implementation
Future<void> navigateToCard(
Locale locale,
String transactionId,
OnPayCallback onPay,
EventCallback? log,
) async {
await AmwalSdkNavigator.instance.toCardScreen(
locale: locale,
transactionId: transactionId,
onPay: onPay,
log: log,
);
}