toJson method
Map<String, dynamic>
toJson
()
Implementation
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {
"merchantname": this.merchantname,
"merchantcode": this.merchantcode,
"amount": this.amount,
"orderId": this.orderId,
"orderLabel": this.orderLabel,
"partner": this.partner,
"fee": this.fee ?? 0,
"isTestMode": isTestMode ?? true,
};
if (Platform.isIOS) {
json["appScheme"] = appScheme;
}
if (description != null) {
json["description"] = description;
}
if (username != null) {
json["username"] = username;
}
if (merchantnamelabel != null) {
json["merchantnamelabel"] = merchantnamelabel;
}
if (extra != null) {
json["extra"] = extra;
}
return json;
}