AmwalCardSdk class
Amwal Card Payment SDK for processing card-based transactions.
This SDK provides a comprehensive solution for integrating card payment functionality into Flutter applications. It supports various payment methods including manual card entry, contactless payments, and 3D Secure authentication.
Key Features
- Manual Card Entry: Traditional card number, expiry, and CVV input
- Contactless Payments: NFC-based card payments
- 3D Secure Support: Enhanced security for online transactions
- Token Management: Secure card tokenization for repeat payments
- Multi-terminal Support: Handle multiple payment terminals
- Localization: Support for multiple languages and locales
- Mock Mode: Testing environment for development
- Secure Hash Validation: Additional security layer
Usage Flow
- Initialize the SDK with merchant credentials
- Configure payment parameters and settings
- Navigate to the card payment screen
- Handle payment callbacks and results
Example
// Initialize the SDK
final cardSdk = await AmwalCardSdk.instance.init(
token: 'your_auth_token',
merchantId: 'merchant_123',
terminalIds: ['terminal_1', 'terminal_2'],
transactionRefNo: 'txn_ref_123',
service: networkService,
merchantName: 'Your Store',
isMocked: false,
is3DS: true,
locale: Locale('en'),
);
// Navigate to payment screen
await cardSdk.navigateToCard(
Locale('en'),
'transaction_id',
(result) => print('Payment result: $result'),
(event) => print('Event: $event'),
);
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
init(
{required String token, required String merchantId, required List< String> terminalIds, String? secureHashValue, required String transactionRefNo, required NetworkService service, String? merchantName, bool isMocked = false, bool is3DS = false, Locale? locale}) → Future<AmwalCardSdk> - Initialize the Amwal Card SDK with merchant configuration.
- Navigate to the card payment screen.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → AmwalCardSdk
-
Singleton instance of the Amwal Card SDK.
no setter