toJson method
Converts the DirectChargeRequest instance to a JSON-compatible map.
If the currency is not "ETB", it defaults to "ETB".
Implementation
Map<String, dynamic> toJson() {
return {
"mobile": mobile,
"currency": currency == "ETB" ? currency : "ETB",
"tx_ref": txRef,
"amount": amount,
"first_name": firstName,
"last_name": lastName,
"email": email,
"payment_method": paymentMethod,
};
}