toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'merchantId': merchantId,
'paymentAmount': paymentAmount,
'currencyCode': currencyCode,
'paymentItems': paymentItems.map((e) => e.toJson()).toList(),
if (platformOptions != null) ...platformOptions!.toJson(),
};
}