toJson method
Converts this AmwalSdkSettings instance to a JSON map.
This method serializes the settings to a JSON-compatible map, useful for storing configuration or sending to APIs.
Returns
A Map<String, dynamic>
containing the serialized settings.
Example
final settings = AmwalSdkSettings(/* ... */);
final jsonMap = settings.toJson();
print(jsonMap['merchantId']); // Prints the merchant ID
Implementation
Map<String, dynamic> toJson() {
return {
'token': token,
'sessionToken': sessionToken,
'secureHashValue': secureHashValue,
'merchantId': merchantId,
'transactionId': transactionId,
'currency': currency,
'amount': amount,
'merchantName': merchantName,
'locale': locale,
'maxTransactionAmount': maxTransactionAmount,
'isMocked': isMocked,
'countDownInSeconds': countDownInSeconds,
'flavor': flavor,
'isNfc': transactionType == TransactionType.nfc,
'log': log,
'additionValues': additionValues,
};
}