PaymentRequest.fromJson constructor
Create from JSON
Implementation
factory PaymentRequest.fromJson(Map<String, dynamic> json) {
return PaymentRequest(
amount: (json['amount'] as num).toDouble(),
currency: json['currency'] as String,
description: json['description'] as String,
orderId: json['orderId'] as String,
successUrl: json['successUrl'] as String?,
cancelUrl: json['cancelUrl'] as String?,
customerEmail: json['customerEmail'] as String?,
customerName: json['customerName'] as String?,
customerPhone: json['customerPhone'] as String?,
metadata: json['metadata'] != null
? Map<String, dynamic>.from(json['metadata'])
: null,
returnUrl: json['returnUrl'] as String?,
);
}