PaymentResponse3DS.fromMap constructor

PaymentResponse3DS.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory PaymentResponse3DS.fromMap(Map<String, dynamic> map) {
  return PaymentResponse3DS(
      id: map['id'] ?? '',
      actionId: map['actionId'] ?? '',
      amount: map['amount']?.toInt() ?? 0,
      approved: map['approved'] ?? false,
      status: map['status'] ?? '',
      responseCode: map['responseCode'] ?? '',
      token: map['token'] ?? '',
      reference: map['reference'] ?? '',
      description: map['description'] ?? '',
      customer: Customer.fromMap(map['customer']),
      currency: map['currency'] ?? '',
      processedOn: map['processedOn'] ?? '',
      redirectUrl: map["_links"]["redirect"]["href"]);
}