toJson method
Implementation
Map<String, dynamic> toJson() => {
'notifyUrl': notifyUrl,
'extOrderId': extOrderId,
'customerIp': customerIp,
'totalAmount': order.products
.map((e) => e.quantity * e.unitPrice)
.reduce((accumulator, current) => accumulator + current),
...order.toJson(),
};