AmwalSdkArguments class
Configuration arguments for the Amwal SDK payment screens.
This class encapsulates all the necessary parameters required to initialize and configure payment screens within the SDK.
Key Properties
- Localization: locale for language support
- Transaction: amount, currency, transactionId
- Merchant: merchantId, terminalId
- Callbacks: onPay, getTransactionFunction
Usage Example
final arguments = AmwalSdkArguments(
amount: '100.00',
currency: 'SAR',
currencyId: 512,
merchantId: 12345,
terminalId: 'terminal_1',
onPay: (listener, [transactionId]) {
// Handle payment completion
},
getTransactionFunction: (transactionId) async {
// Fetch transaction details
return await getTransactionDetails(transactionId);
},
);
Constructors
- AmwalSdkArguments.new({void onResponse(String?)?, String? customerId, void customerCallback(String?)?, required GetTransactionFunction getTransactionFunction, required OnPayCallback onPay, OnPayCallback? onCountComplete, Locale locale = const Locale('en'), bool is3DS = false, required String amount, required String terminalId, required String currency, required int currencyId, required int merchantId, String? transactionId})
- Creates a new AmwalSdkArguments instance.
Properties
- amount → String
-
The payment amount as a string.
final
- currency → String
-
The currency code for the payment transaction.
final
- currencyId → int
-
The numeric currency identifier.
final
- customerCallback → void Function(String?)?
-
Optional callback function for customer-specific actions.
final
- customerId → String?
-
Optional customer identifier for the transaction.
final
- getTransactionFunction → GetTransactionFunction
-
Function to retrieve transaction details by ID.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- is3DS → bool
-
Whether to enable 3D Secure authentication for the transaction.
final
- locale → Locale
-
The locale setting for internationalization support.
final
- merchantId → int
-
The merchant identifier for the payment transaction.
final
- onCountComplete → OnPayCallback?
-
Optional callback function for countdown completion events.
final
- onPay → OnPayCallback
-
Callback function executed when payment is completed.
final
- onResponse → void Function(String?)?
-
Optional callback function for payment response handling.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- terminalId → String
-
The terminal identifier for the payment transaction.
final
- transactionId → String?
-
Optional transaction identifier for tracking purposes.
final
Methods
-
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