toJson method

Map<String, dynamic> toJson()

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(),
    };